// AUTO GENERATED FILE, DO NOT EDIT.
//
// Generated by "ffi-gen".

library acter;

import "dart:async";
import "dart:convert";
import "dart:ffi" as ffi;
import "dart:io" show Platform, File, Directory;
import "dart:isolate";
import "dart:typed_data";

class _DartApiEntry extends ffi.Struct {
  external ffi.Pointer<ffi.Uint8> name;
  external ffi.Pointer<ffi.Void> ptr;
}

class _DartApi extends ffi.Struct {
  @ffi.Int32()
  external int major;

  @ffi.Int32()
  external int minor;

  external ffi.Pointer<_DartApiEntry> functions;
}

ffi.Pointer<T> _lookupDartSymbol<T extends ffi.NativeType>(String symbol) {
  final ffi.Pointer<_DartApi> api = ffi.NativeApi.initializeApiDLData.cast();
  final ffi.Pointer<_DartApiEntry> functions = api.ref.functions;
  final maxInt = double.maxFinite.toInt();
  for (var i = 0; i < maxInt; i++) {
    final func = functions.elementAt(i).ref;
    var symbol2 = "";
    var j = 0;
    while (func.name.elementAt(j).value != 0) {
      symbol2 += String.fromCharCode(func.name.elementAt(j).value);
      j += 1;
    }
    if (symbol == symbol2) {
      return func.ptr.cast();
    }
  }
  throw "symbol not found";
}

class _Box {
  final Api _api;
  final ffi.Pointer<ffi.Void> _ptr;
  final String _dropSymbol;
  bool _dropped;
  bool _moved;
  ffi.Pointer<ffi.Void> _finalizer = ffi.Pointer.fromAddress(0);
  final Object? _context;

  _Box(this._api, this._ptr, this._dropSymbol, {Object? context})
      : _dropped = false,
        _moved = false,
        _context = context;

  late final _dropPtr = _api._lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>>(_dropSymbol);

  late final _drop = _dropPtr.asFunction<
      void Function(ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.Void>)>();

  int borrow() {
    if (_dropped) {
      throw StateError("use after free");
    }
    if (_moved) {
      throw StateError("use after move");
    }
    return _ptr.address;
  }

  int move() {
    if (_dropped) {
      throw StateError("use after free");
    }
    if (_moved) {
      throw StateError("can't move value twice");
    }
    _moved = true;
    _api._unregisterFinalizer(this);
    return _ptr.address;
  }

  void drop() {
    if (_dropped) {
      throw StateError("double free");
    }
    if (_moved) {
      throw StateError("can't drop moved value");
    }
    _dropped = true;
    return;
    _api._unregisterFinalizer(this);
    _drop(ffi.Pointer.fromAddress(0), _ptr);
  }
}

void debugAllocation(String name, int address, int len) {
  print("$name - address: $address ; len: $len");
}

class FfiBufferInt8 {
  final Api _api;
  final _Box _box;

  FfiBufferInt8._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferInt8. This Int8List must not live longer than the creating FfiBufferInt8
  Int8List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 1;
    return ffi.Pointer<ffi.Int8>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferUint8 {
  final Api _api;
  final _Box _box;

  FfiBufferUint8._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferUint8. This Uint8List must not live longer than the creating FfiBufferUint8
  Uint8List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 1;
    return ffi.Pointer<ffi.Uint8>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferInt16 {
  final Api _api;
  final _Box _box;

  FfiBufferInt16._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferInt16. This Int16List must not live longer than the creating FfiBufferInt16
  Int16List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 2;
    return ffi.Pointer<ffi.Int16>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferUint16 {
  final Api _api;
  final _Box _box;

  FfiBufferUint16._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferUint16. This Uint16List must not live longer than the creating FfiBufferUint16
  Uint16List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 2;
    return ffi.Pointer<ffi.Uint16>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferInt32 {
  final Api _api;
  final _Box _box;

  FfiBufferInt32._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferInt32. This Int32List must not live longer than the creating FfiBufferInt32
  Int32List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 4;
    return ffi.Pointer<ffi.Int32>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferUint32 {
  final Api _api;
  final _Box _box;

  FfiBufferUint32._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferUint32. This Uint32List must not live longer than the creating FfiBufferUint32
  Uint32List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 4;
    return ffi.Pointer<ffi.Uint32>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferInt64 {
  final Api _api;
  final _Box _box;

  FfiBufferInt64._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferInt64. This Int64List must not live longer than the creating FfiBufferInt64
  Int64List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 8;
    return ffi.Pointer<ffi.Int64>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferUint64 {
  final Api _api;
  final _Box _box;

  FfiBufferUint64._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferUint64. This Uint64List must not live longer than the creating FfiBufferUint64
  Uint64List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 8;
    return ffi.Pointer<ffi.Uint64>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferFloat32 {
  final Api _api;
  final _Box _box;

  FfiBufferFloat32._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferFloat32. This Float32List must not live longer than the creating FfiBufferFloat32
  Float32List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 4;
    return ffi.Pointer<ffi.Float>.fromAddress(addressRaw).asTypedList(size);
  }
}

class FfiBufferFloat64 {
  final Api _api;
  final _Box _box;

  FfiBufferFloat64._(this._api, this._box);

  void drop() {
    _box.drop();
  }

  /// Returns a typed view of this buffer.
  /// Note: The lifetime of this view is tied to the lifetime of this FfiBufferFloat64. This Float64List must not live longer than the creating FfiBufferFloat64
  Float64List asTypedList() {
    final buffer = _box.borrow();
    final addressRaw = _api._ffiBufferAddress(buffer);
    final size = _api._ffiBufferSize(buffer) ~/ 8;
    return ffi.Pointer<ffi.Double>.fromAddress(addressRaw).asTypedList(size);
  }
}

/// Implements Iterable and Iterator for a rust iterator.
class Iter<T> extends Iterable<T> implements Iterator<T> {
  final _Box _box;
  final T? Function(int) _next;

  Iter._(this._box, this._next);

  @override
  Iterator<T> get iterator => this;

  T? _current;

  @override
  T get current => _current!;

  @override
  bool moveNext() {
    final next = _next(_box.borrow());
    if (next == null) {
      return false;
    } else {
      _current = next;
      return true;
    }
  }

  void drop() {
    _box.drop();
  }
}

abstract class CustomIterable<T> {
  int get length;
  T elementAt(int index);
}

class CustomIterator<T, U extends CustomIterable<T>> implements Iterator<T> {
  final U _iterable;
  int _currentIndex = -1;

  CustomIterator(this._iterable);

  @override
  T get current => _iterable.elementAt(_currentIndex);

  @override
  bool moveNext() {
    _currentIndex++;
    return _currentIndex < _iterable.length;
  }
}

Future<T> _nativeFuture<T>(_Box box, T? Function(int, int, int) nativePoll) {
  final completer = Completer<T>();
  final rx = ReceivePort();
  void poll() {
    try {
      final ret = nativePoll(
        box.borrow(),
        ffi.NativeApi.postCObject.address,
        rx.sendPort.nativePort,
      );
      if (ret == null) {
        return;
      }
      completer.complete(ret);
    } catch (err) {
      completer.completeError(err);
    }
    rx.close();
    box.drop();
  }

  rx.listen((dynamic _message) => poll());
  poll();
  return completer.future;
}

Stream<T> _nativeStream<T>(
  _Box box,
  T? Function(int, int, int, int) nativePoll,
) {
  final controller = StreamController<T>();
  final rx = ReceivePort();
  final done = ReceivePort();
  void poll() {
    try {
      final ret = nativePoll(
        box.borrow(),
        ffi.NativeApi.postCObject.address,
        rx.sendPort.nativePort,
        done.sendPort.nativePort,
      );
      if (ret != null) {
        controller.add(ret);
      }
    } catch (err) {
      controller.addError(err);
    }
  }

  void close() {
    rx.close();
    done.close();
    box.drop();
  }

  controller.onCancel = close;
  rx.listen((dynamic _message) => poll());
  done.listen((dynamic _message) => controller.close());
  poll();
  return controller.stream;
}

class FfiString {
  final Api _api;
  final _Box _box;

  FfiString._(this._api, this._box);

  String toDartString() {
    final parts = _api._ffiStringIntoParts(_box.borrow());
    final ffi.Pointer<ffi.Uint8> tmp2_0 = ffi.Pointer.fromAddress(parts.addr);
    debugAllocation("ffistring", parts.addr, parts.len);
    final tmp1 = utf8.decode(
      tmp2_0.asTypedList(parts.len),
      allowMalformed: true,
    );
    if (parts.capacity > 0) {
      final ffi.Pointer<ffi.Void> tmp2_0;
      tmp2_0 = ffi.Pointer.fromAddress(parts.addr);
      _api.__deallocate(tmp2_0, parts.capacity * 1, 1);
    }
    return tmp1;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class _FfiStringParts extends ffi.Struct {
  @ffi.IntPtr()
  external int addr;
  @ffi.UintPtr()
  external int len;
  @ffi.UintPtr()
  external int capacity;
}

class _EnumWrapper extends ffi.Struct {
  @ffi.Uint32()
  external int tag;
  @ffi.IntPtr()
  external int inner;
}

/// Main entry point to library.
class Api {
  /// Holds the symbol lookup function.
  final ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName)
      _lookup;

  /// The symbols are looked up in [dynamicLibrary].
  Api(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup;

  /// The symbols are looked up with [lookup].
  Api.fromLookup(
    ffi.Pointer<T> Function<T extends ffi.NativeType>(String symbolName) lookup,
  ) : _lookup = lookup;

  /// The library is loaded from the executable.
  factory Api.loadStatic() {
    return Api(ffi.DynamicLibrary.executable());
  }

  /// The library is dynamically loaded.
  factory Api.loadDynamic(String name) {
    return Api(ffi.DynamicLibrary.open(name));
  }

  /// The library is loaded based on platform conventions.
  factory Api.load() {
    String? name;
    if (Platform.isLinux) name = "libacter.so";
    if (Platform.isAndroid) name = "libacter.so";
    if (Platform.isMacOS) name = "libacter.dylib";
    if (Platform.isIOS) name = "";
    if (Platform.isWindows) name = "acter.dll";
    if (name == null) {
      throw UnsupportedError("This platform is not supported.");
    }
    if (name == "") {
      return Api.loadStatic();
    } else {
      return Api.loadDynamic(name);
    }
  }

  late final _registerPtr = _lookupDartSymbol<
      ffi.NativeFunction<
          ffi.Pointer<ffi.Void> Function(
            ffi.Handle,
            ffi.Pointer<ffi.Void>,
            ffi.IntPtr,
            ffi.Pointer<ffi.Void>,
          )>>("Dart_NewFinalizableHandle");

  late final _register = _registerPtr.asFunction<
      ffi.Pointer<ffi.Void> Function(
        Object,
        ffi.Pointer<ffi.Void>,
        int,
        ffi.Pointer<ffi.Void>,
      )>();

  ffi.Pointer<ffi.Void> _registerFinalizer(_Box boxed) {
    return _register(boxed, boxed._ptr, 42, boxed._dropPtr.cast());
  }

  late final _unregisterPtr = _lookupDartSymbol<
      ffi.NativeFunction<
          ffi.Void Function(ffi.Pointer<ffi.Void>,
              ffi.Handle)>>("Dart_DeleteFinalizableHandle");

  late final _unregister =
      _unregisterPtr.asFunction<void Function(ffi.Pointer<ffi.Void>, _Box)>();

  void _unregisterFinalizer(_Box boxed) {
    _unregister(boxed._finalizer, boxed);
  }

  ffi.Pointer<T> __allocate<T extends ffi.NativeType>(
    int byteCount,
    int alignment,
  ) {
    return _allocate(byteCount, alignment).cast();
  }

  void __deallocate<T extends ffi.NativeType>(
    ffi.Pointer pointer,
    int byteCount,
    int alignment,
  ) {
    _deallocate(pointer.cast(), byteCount, alignment);
  }

  /// Initialize logging
  void initLogging(String logDir, String filter) {
    final tmp0 = logDir;
    final tmp4 = filter;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8 = _initLogging(tmp1, tmp2, tmp3, tmp5, tmp6, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    final tmp12 = tmp8.arg2;
    final tmp13 = tmp8.arg3;
    if (tmp10 == 0) {
      debugAllocation("handle error", tmp11, tmp12);
      final ffi.Pointer<ffi.Uint8> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
      final tmp10_0 = utf8.decode(
        tmp11_0.asTypedList(tmp12),
        allowMalformed: true,
      );
      if (tmp12 > 0) {
        final ffi.Pointer<ffi.Void> tmp11_0;
        tmp11_0 = ffi.Pointer.fromAddress(tmp11);
        this.__deallocate(tmp11_0, tmp13, 1);
      }
      throw tmp10_0;
    }
    return;
  }

  /// Set the global proxy to the given string. Will only apply to client initialized after calling this.
  void setProxy(String? proxy) {
    final tmp0 = proxy;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    if (tmp0 == null) {
      tmp1 = 0;
    } else {
      tmp1 = 1;
      final tmp2 = tmp0;
      final tmp2_0 = utf8.encode(tmp2);
      tmp4 = tmp2_0.length;

      final ffi.Pointer<ffi.Uint8> tmp3_0 = this.__allocate(tmp4 * 1, 1);
      final Uint8List tmp3_1 = tmp3_0.asTypedList(tmp4);
      tmp3_1.setAll(0, tmp2_0);
      tmp3 = tmp3_0.address;
      tmp5 = tmp4;
    }
    _setProxy(tmp1, tmp3, tmp4, tmp5);
    return;
  }

  /// Rotate the logging file
  String rotateLogFile() {
    final tmp0 = _rotateLogFile();
    final tmp2 = tmp0.arg0;
    final tmp3 = tmp0.arg1;
    final tmp4 = tmp0.arg2;
    final tmp5 = tmp0.arg3;
    final tmp6 = tmp0.arg4;
    final tmp7 = tmp0.arg5;
    final tmp8 = tmp0.arg6;
    if (tmp2 == 0) {
      debugAllocation("handle error", tmp3, tmp4);
      final ffi.Pointer<ffi.Uint8> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      final tmp2_0 = utf8.decode(
        tmp3_0.asTypedList(tmp4),
        allowMalformed: true,
      );
      if (tmp4 > 0) {
        final ffi.Pointer<ffi.Void> tmp3_0;
        tmp3_0 = ffi.Pointer.fromAddress(tmp3);
        this.__deallocate(tmp3_0, tmp5, 1);
      }
      throw tmp2_0;
    }
    if (tmp7 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp6_ptr = ffi.Pointer.fromAddress(tmp6);
    List<int> tmp6_buf = [];
    final tmp6_precast = tmp6_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp7; i++) {
      int char = tmp6_precast.elementAt(i).value;
      tmp6_buf.add(char);
    }
    final tmp1 = utf8.decode(tmp6_buf, allowMalformed: true);
    if (tmp8 > 0) {
      final ffi.Pointer<ffi.Void> tmp6_0;
      tmp6_0 = ffi.Pointer.fromAddress(tmp6);
      this.__deallocate(tmp6_0, tmp8 * 1, 1);
    }
    return tmp1;
  }

  bool wouldLog(String target, String level) {
    final tmp0 = target;
    final tmp4 = level;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8 = _wouldLog(tmp1, tmp2, tmp3, tmp5, tmp6, tmp7);
    final tmp10 = tmp8;
    final tmp9 = tmp10 > 0;
    return tmp9;
  }

  /// Log the entry to the rust logging
  void writeLog(
    String target,
    String level,
    String message,
    String? file,
    int? line,
    String? modulePath,
  ) {
    final tmp0 = target;
    final tmp4 = level;
    final tmp8 = message;
    final tmp12 = file;
    final tmp18 = line;
    final tmp22 = modulePath;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp15 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp19 = 0;
    var tmp21 = 0;
    var tmp23 = 0;
    var tmp25 = 0;
    var tmp26 = 0;
    var tmp27 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    if (tmp12 == null) {
      tmp13 = 0;
    } else {
      tmp13 = 1;
      final tmp14 = tmp12;
      final tmp14_0 = utf8.encode(tmp14);
      tmp16 = tmp14_0.length;

      final ffi.Pointer<ffi.Uint8> tmp15_0 = this.__allocate(tmp16 * 1, 1);
      final Uint8List tmp15_1 = tmp15_0.asTypedList(tmp16);
      tmp15_1.setAll(0, tmp14_0);
      tmp15 = tmp15_0.address;
      tmp17 = tmp16;
    }
    if (tmp18 == null) {
      tmp19 = 0;
    } else {
      tmp19 = 1;
      final tmp20 = tmp18;
      tmp21 = tmp20;
    }
    if (tmp22 == null) {
      tmp23 = 0;
    } else {
      tmp23 = 1;
      final tmp24 = tmp22;
      final tmp24_0 = utf8.encode(tmp24);
      tmp26 = tmp24_0.length;

      final ffi.Pointer<ffi.Uint8> tmp25_0 = this.__allocate(tmp26 * 1, 1);
      final Uint8List tmp25_1 = tmp25_0.asTypedList(tmp26);
      tmp25_1.setAll(0, tmp24_0);
      tmp25 = tmp25_0.address;
      tmp27 = tmp26;
    }
    _writeLog(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp15,
      tmp16,
      tmp17,
      tmp19,
      tmp21,
      tmp23,
      tmp25,
      tmp26,
      tmp27,
    );
    return;
  }

  /// Create a new client for homeserver at url with storage at data_path
  Future<Client> loginNewClient(
    String basePath,
    String mediaCacheBasePath,
    String username,
    String password,
    String defaultHomeserverName,
    String defaultHomeserverUrl,
    String? deviceName,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp8 = username;
    final tmp12 = password;
    final tmp16 = defaultHomeserverName;
    final tmp20 = defaultHomeserverUrl;
    final tmp24 = deviceName;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp21 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    var tmp25 = 0;
    var tmp27 = 0;
    var tmp28 = 0;
    var tmp29 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12_0 = utf8.encode(tmp12);
    tmp14 = tmp12_0.length;

    final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
    final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
    tmp13_1.setAll(0, tmp12_0);
    tmp13 = tmp13_0.address;
    tmp15 = tmp14;
    final tmp16_0 = utf8.encode(tmp16);
    tmp18 = tmp16_0.length;

    final ffi.Pointer<ffi.Uint8> tmp17_0 = this.__allocate(tmp18 * 1, 1);
    final Uint8List tmp17_1 = tmp17_0.asTypedList(tmp18);
    tmp17_1.setAll(0, tmp16_0);
    tmp17 = tmp17_0.address;
    tmp19 = tmp18;
    final tmp20_0 = utf8.encode(tmp20);
    tmp22 = tmp20_0.length;

    final ffi.Pointer<ffi.Uint8> tmp21_0 = this.__allocate(tmp22 * 1, 1);
    final Uint8List tmp21_1 = tmp21_0.asTypedList(tmp22);
    tmp21_1.setAll(0, tmp20_0);
    tmp21 = tmp21_0.address;
    tmp23 = tmp22;
    if (tmp24 == null) {
      tmp25 = 0;
    } else {
      tmp25 = 1;
      final tmp26 = tmp24;
      final tmp26_0 = utf8.encode(tmp26);
      tmp28 = tmp26_0.length;

      final ffi.Pointer<ffi.Uint8> tmp27_0 = this.__allocate(tmp28 * 1, 1);
      final Uint8List tmp27_1 = tmp27_0.asTypedList(tmp28);
      tmp27_1.setAll(0, tmp26_0);
      tmp27 = tmp27_0.address;
      tmp29 = tmp28;
    }
    final tmp30 = _loginNewClient(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp14,
      tmp15,
      tmp17,
      tmp18,
      tmp19,
      tmp21,
      tmp22,
      tmp23,
      tmp25,
      tmp27,
      tmp28,
      tmp29,
    );
    final tmp32 = tmp30;
    final ffi.Pointer<ffi.Void> tmp32_0 = ffi.Pointer.fromAddress(tmp32);
    final tmp32_1 = _Box(this, tmp32_0, "__login_new_client_future_drop");
    tmp32_1._finalizer = this._registerFinalizer(tmp32_1);
    final tmp31 = _nativeFuture(tmp32_1, this.__loginNewClientFuturePoll);
    return tmp31;
  }

  /// Create a new client from the restore token
  Future<Client> loginWithToken(
    String basePath,
    String mediaCacheBasePath,
    String restoreToken,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp8 = restoreToken;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12 = _loginWithToken(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
    );
    final tmp14 = tmp12;
    final ffi.Pointer<ffi.Void> tmp14_0 = ffi.Pointer.fromAddress(tmp14);
    final tmp14_1 = _Box(this, tmp14_0, "__login_with_token_future_drop");
    tmp14_1._finalizer = this._registerFinalizer(tmp14_1);
    final tmp13 = _nativeFuture(tmp14_1, this.__loginWithTokenFuturePoll);
    return tmp13;
  }

  /// Create an anonymous client connecting to the homeserver
  Future<Client> guestClient(
    String basePath,
    String mediaCacheBasePath,
    String defaultHomeserverName,
    String defaultHomeserverUrl,
    String? deviceName,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp8 = defaultHomeserverName;
    final tmp12 = defaultHomeserverUrl;
    final tmp16 = deviceName;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp17 = 0;
    var tmp19 = 0;
    var tmp20 = 0;
    var tmp21 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12_0 = utf8.encode(tmp12);
    tmp14 = tmp12_0.length;

    final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
    final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
    tmp13_1.setAll(0, tmp12_0);
    tmp13 = tmp13_0.address;
    tmp15 = tmp14;
    if (tmp16 == null) {
      tmp17 = 0;
    } else {
      tmp17 = 1;
      final tmp18 = tmp16;
      final tmp18_0 = utf8.encode(tmp18);
      tmp20 = tmp18_0.length;

      final ffi.Pointer<ffi.Uint8> tmp19_0 = this.__allocate(tmp20 * 1, 1);
      final Uint8List tmp19_1 = tmp19_0.asTypedList(tmp20);
      tmp19_1.setAll(0, tmp18_0);
      tmp19 = tmp19_0.address;
      tmp21 = tmp20;
    }
    final tmp22 = _guestClient(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp14,
      tmp15,
      tmp17,
      tmp19,
      tmp20,
      tmp21,
    );
    final tmp24 = tmp22;
    final ffi.Pointer<ffi.Void> tmp24_0 = ffi.Pointer.fromAddress(tmp24);
    final tmp24_1 = _Box(this, tmp24_0, "__guest_client_future_drop");
    tmp24_1._finalizer = this._registerFinalizer(tmp24_1);
    final tmp23 = _nativeFuture(tmp24_1, this.__guestClientFuturePoll);
    return tmp23;
  }

  /// Create a new client from the registration token
  Future<Client> registerWithToken(
    String basePath,
    String mediaCacheBasePath,
    String username,
    String password,
    String registrationToken,
    String defaultHomeserverName,
    String defaultHomeserverUrl,
    String deviceName,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp8 = username;
    final tmp12 = password;
    final tmp16 = registrationToken;
    final tmp20 = defaultHomeserverName;
    final tmp24 = defaultHomeserverUrl;
    final tmp28 = deviceName;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp21 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    var tmp25 = 0;
    var tmp26 = 0;
    var tmp27 = 0;
    var tmp29 = 0;
    var tmp30 = 0;
    var tmp31 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12_0 = utf8.encode(tmp12);
    tmp14 = tmp12_0.length;

    final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
    final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
    tmp13_1.setAll(0, tmp12_0);
    tmp13 = tmp13_0.address;
    tmp15 = tmp14;
    final tmp16_0 = utf8.encode(tmp16);
    tmp18 = tmp16_0.length;

    final ffi.Pointer<ffi.Uint8> tmp17_0 = this.__allocate(tmp18 * 1, 1);
    final Uint8List tmp17_1 = tmp17_0.asTypedList(tmp18);
    tmp17_1.setAll(0, tmp16_0);
    tmp17 = tmp17_0.address;
    tmp19 = tmp18;
    final tmp20_0 = utf8.encode(tmp20);
    tmp22 = tmp20_0.length;

    final ffi.Pointer<ffi.Uint8> tmp21_0 = this.__allocate(tmp22 * 1, 1);
    final Uint8List tmp21_1 = tmp21_0.asTypedList(tmp22);
    tmp21_1.setAll(0, tmp20_0);
    tmp21 = tmp21_0.address;
    tmp23 = tmp22;
    final tmp24_0 = utf8.encode(tmp24);
    tmp26 = tmp24_0.length;

    final ffi.Pointer<ffi.Uint8> tmp25_0 = this.__allocate(tmp26 * 1, 1);
    final Uint8List tmp25_1 = tmp25_0.asTypedList(tmp26);
    tmp25_1.setAll(0, tmp24_0);
    tmp25 = tmp25_0.address;
    tmp27 = tmp26;
    final tmp28_0 = utf8.encode(tmp28);
    tmp30 = tmp28_0.length;

    final ffi.Pointer<ffi.Uint8> tmp29_0 = this.__allocate(tmp30 * 1, 1);
    final Uint8List tmp29_1 = tmp29_0.asTypedList(tmp30);
    tmp29_1.setAll(0, tmp28_0);
    tmp29 = tmp29_0.address;
    tmp31 = tmp30;
    final tmp32 = _registerWithToken(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp14,
      tmp15,
      tmp17,
      tmp18,
      tmp19,
      tmp21,
      tmp22,
      tmp23,
      tmp25,
      tmp26,
      tmp27,
      tmp29,
      tmp30,
      tmp31,
    );
    final tmp34 = tmp32;
    final ffi.Pointer<ffi.Void> tmp34_0 = ffi.Pointer.fromAddress(tmp34);
    final tmp34_1 = _Box(this, tmp34_0, "__register_with_token_future_drop");
    tmp34_1._finalizer = this._registerFinalizer(tmp34_1);
    final tmp33 = _nativeFuture(tmp34_1, this.__registerWithTokenFuturePoll);
    return tmp33;
  }

  /// Request the registration token via email
  Future<RegistrationTokenViaEmailResponse> requestRegistrationTokenViaEmail(
    String basePath,
    String mediaCacheBasePath,
    String username,
    String defaultHomeserverName,
    String defaultHomeserverUrl,
    String email,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp8 = username;
    final tmp12 = defaultHomeserverName;
    final tmp16 = defaultHomeserverUrl;
    final tmp20 = email;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp21 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12_0 = utf8.encode(tmp12);
    tmp14 = tmp12_0.length;

    final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
    final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
    tmp13_1.setAll(0, tmp12_0);
    tmp13 = tmp13_0.address;
    tmp15 = tmp14;
    final tmp16_0 = utf8.encode(tmp16);
    tmp18 = tmp16_0.length;

    final ffi.Pointer<ffi.Uint8> tmp17_0 = this.__allocate(tmp18 * 1, 1);
    final Uint8List tmp17_1 = tmp17_0.asTypedList(tmp18);
    tmp17_1.setAll(0, tmp16_0);
    tmp17 = tmp17_0.address;
    tmp19 = tmp18;
    final tmp20_0 = utf8.encode(tmp20);
    tmp22 = tmp20_0.length;

    final ffi.Pointer<ffi.Uint8> tmp21_0 = this.__allocate(tmp22 * 1, 1);
    final Uint8List tmp21_1 = tmp21_0.asTypedList(tmp22);
    tmp21_1.setAll(0, tmp20_0);
    tmp21 = tmp21_0.address;
    tmp23 = tmp22;
    final tmp24 = _requestRegistrationTokenViaEmail(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp14,
      tmp15,
      tmp17,
      tmp18,
      tmp19,
      tmp21,
      tmp22,
      tmp23,
    );
    final tmp26 = tmp24;
    final ffi.Pointer<ffi.Void> tmp26_0 = ffi.Pointer.fromAddress(tmp26);
    final tmp26_1 = _Box(
      this,
      tmp26_0,
      "__request_registration_token_via_email_future_drop",
    );
    tmp26_1._finalizer = this._registerFinalizer(tmp26_1);
    final tmp25 = _nativeFuture(
      tmp26_1,
      this.__requestRegistrationTokenViaEmailFuturePoll,
    );
    return tmp25;
  }

  /// Request the password change token via email
  Future<PasswordChangeEmailTokenResponse> requestPasswordChangeTokenViaEmail(
    String defaultHomeserverUrl,
    String email,
  ) {
    final tmp0 = defaultHomeserverUrl;
    final tmp4 = email;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8 = _requestPasswordChangeTokenViaEmail(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
    );
    final tmp10 = tmp8;
    final ffi.Pointer<ffi.Void> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
    final tmp10_1 = _Box(
      this,
      tmp10_0,
      "__request_password_change_token_via_email_future_drop",
    );
    tmp10_1._finalizer = this._registerFinalizer(tmp10_1);
    final tmp9 = _nativeFuture(
      tmp10_1,
      this.__requestPasswordChangeTokenViaEmailFuturePoll,
    );
    return tmp9;
  }

  /// Finish password reset without login
  Future<bool> resetPassword(
    String defaultHomeserverUrl,
    String sid,
    String clientSecret,
    String newVal,
  ) {
    final tmp0 = defaultHomeserverUrl;
    final tmp4 = sid;
    final tmp8 = clientSecret;
    final tmp12 = newVal;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    final tmp4_0 = utf8.encode(tmp4);
    tmp6 = tmp4_0.length;

    final ffi.Pointer<ffi.Uint8> tmp5_0 = this.__allocate(tmp6 * 1, 1);
    final Uint8List tmp5_1 = tmp5_0.asTypedList(tmp6);
    tmp5_1.setAll(0, tmp4_0);
    tmp5 = tmp5_0.address;
    tmp7 = tmp6;
    final tmp8_0 = utf8.encode(tmp8);
    tmp10 = tmp8_0.length;

    final ffi.Pointer<ffi.Uint8> tmp9_0 = this.__allocate(tmp10 * 1, 1);
    final Uint8List tmp9_1 = tmp9_0.asTypedList(tmp10);
    tmp9_1.setAll(0, tmp8_0);
    tmp9 = tmp9_0.address;
    tmp11 = tmp10;
    final tmp12_0 = utf8.encode(tmp12);
    tmp14 = tmp12_0.length;

    final ffi.Pointer<ffi.Uint8> tmp13_0 = this.__allocate(tmp14 * 1, 1);
    final Uint8List tmp13_1 = tmp13_0.asTypedList(tmp14);
    tmp13_1.setAll(0, tmp12_0);
    tmp13 = tmp13_0.address;
    tmp15 = tmp14;
    final tmp16 = _resetPassword(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp6,
      tmp7,
      tmp9,
      tmp10,
      tmp11,
      tmp13,
      tmp14,
      tmp15,
    );
    final tmp18 = tmp16;
    final ffi.Pointer<ffi.Void> tmp18_0 = ffi.Pointer.fromAddress(tmp18);
    final tmp18_1 = _Box(this, tmp18_0, "__reset_password_future_drop");
    tmp18_1._finalizer = this._registerFinalizer(tmp18_1);
    final tmp17 = _nativeFuture(tmp18_1, this.__resetPasswordFuturePoll);
    return tmp17;
  }

  /// destroy the local data of a session
  Future<bool> destroyLocalData(
    String basePath,
    String? mediaCacheBasePath,
    String username,
    String defaultHomeserverName,
  ) {
    final tmp0 = basePath;
    final tmp4 = mediaCacheBasePath;
    final tmp10 = username;
    final tmp14 = defaultHomeserverName;
    var tmp1 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp15 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    final tmp0_0 = utf8.encode(tmp0);
    tmp2 = tmp0_0.length;

    final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
    final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
    tmp1_1.setAll(0, tmp0_0);
    tmp1 = tmp1_0.address;
    tmp3 = tmp2;
    if (tmp4 == null) {
      tmp5 = 0;
    } else {
      tmp5 = 1;
      final tmp6 = tmp4;
      final tmp6_0 = utf8.encode(tmp6);
      tmp8 = tmp6_0.length;

      final ffi.Pointer<ffi.Uint8> tmp7_0 = this.__allocate(tmp8 * 1, 1);
      final Uint8List tmp7_1 = tmp7_0.asTypedList(tmp8);
      tmp7_1.setAll(0, tmp6_0);
      tmp7 = tmp7_0.address;
      tmp9 = tmp8;
    }
    final tmp10_0 = utf8.encode(tmp10);
    tmp12 = tmp10_0.length;

    final ffi.Pointer<ffi.Uint8> tmp11_0 = this.__allocate(tmp12 * 1, 1);
    final Uint8List tmp11_1 = tmp11_0.asTypedList(tmp12);
    tmp11_1.setAll(0, tmp10_0);
    tmp11 = tmp11_0.address;
    tmp13 = tmp12;
    final tmp14_0 = utf8.encode(tmp14);
    tmp16 = tmp14_0.length;

    final ffi.Pointer<ffi.Uint8> tmp15_0 = this.__allocate(tmp16 * 1, 1);
    final Uint8List tmp15_1 = tmp15_0.asTypedList(tmp16);
    tmp15_1.setAll(0, tmp14_0);
    tmp15 = tmp15_0.address;
    tmp17 = tmp16;
    final tmp18 = _destroyLocalData(
      tmp1,
      tmp2,
      tmp3,
      tmp5,
      tmp7,
      tmp8,
      tmp9,
      tmp11,
      tmp12,
      tmp13,
      tmp15,
      tmp16,
      tmp17,
    );
    final tmp20 = tmp18;
    final ffi.Pointer<ffi.Void> tmp20_0 = ffi.Pointer.fromAddress(tmp20);
    final tmp20_1 = _Box(this, tmp20_0, "__destroy_local_data_future_drop");
    tmp20_1._finalizer = this._registerFinalizer(tmp20_1);
    final tmp19 = _nativeFuture(tmp20_1, this.__destroyLocalDataFuturePoll);
    return tmp19;
  }

  EfkDuration durationFromSecs(int secs) {
    final tmp0 = secs;
    var tmp1 = 0;
    tmp1 = tmp0;
    final tmp2 = _durationFromSecs(tmp1);
    final tmp4 = tmp2;
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(this, tmp4_0, "drop_box_EfkDuration");
    tmp4_1._finalizer = this._registerFinalizer(tmp4_1);
    final tmp3 = EfkDuration._(this, tmp4_1);
    return tmp3;
  }

  /// create size object to be used for thumbnail download
  ThumbnailSize newThumbSize(int width, int height) {
    final tmp0 = width;
    final tmp2 = height;
    var tmp1 = 0;
    var tmp3 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    final tmp4 = _newThumbSize(tmp1, tmp3);
    final tmp6 = tmp4.arg0;
    final tmp7 = tmp4.arg1;
    final tmp8 = tmp4.arg2;
    final tmp9 = tmp4.arg3;
    final tmp10 = tmp4.arg4;
    if (tmp6 == 0) {
      debugAllocation("handle error", tmp7, tmp8);
      final ffi.Pointer<ffi.Uint8> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
      final tmp6_0 = utf8.decode(
        tmp7_0.asTypedList(tmp8),
        allowMalformed: true,
      );
      if (tmp8 > 0) {
        final ffi.Pointer<ffi.Void> tmp7_0;
        tmp7_0 = ffi.Pointer.fromAddress(tmp7);
        this.__deallocate(tmp7_0, tmp9, 1);
      }
      throw tmp6_0;
    }
    final ffi.Pointer<ffi.Void> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
    final tmp10_1 = _Box(this, tmp10_0, "drop_box_ThumbnailSize");
    tmp10_1._finalizer = this._registerFinalizer(tmp10_1);
    final tmp5 = ThumbnailSize._(this, tmp10_1);
    return tmp5;
  }

  /// create a colorize builder
  ColorizeBuilder newColorizeBuilder(int? color, int? background, int? link) {
    final tmp0 = color;
    final tmp4 = background;
    final tmp8 = link;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    var tmp9 = 0;
    var tmp11 = 0;
    if (tmp0 == null) {
      tmp1 = 0;
    } else {
      tmp1 = 1;
      final tmp2 = tmp0;
      tmp3 = tmp2;
    }
    if (tmp4 == null) {
      tmp5 = 0;
    } else {
      tmp5 = 1;
      final tmp6 = tmp4;
      tmp7 = tmp6;
    }
    if (tmp8 == null) {
      tmp9 = 0;
    } else {
      tmp9 = 1;
      final tmp10 = tmp8;
      tmp11 = tmp10;
    }
    final tmp12 = _newColorizeBuilder(tmp1, tmp3, tmp5, tmp7, tmp9, tmp11);
    final tmp14 = tmp12.arg0;
    final tmp15 = tmp12.arg1;
    final tmp16 = tmp12.arg2;
    final tmp17 = tmp12.arg3;
    final tmp18 = tmp12.arg4;
    if (tmp14 == 0) {
      debugAllocation("handle error", tmp15, tmp16);
      final ffi.Pointer<ffi.Uint8> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
      final tmp14_0 = utf8.decode(
        tmp15_0.asTypedList(tmp16),
        allowMalformed: true,
      );
      if (tmp16 > 0) {
        final ffi.Pointer<ffi.Void> tmp15_0;
        tmp15_0 = ffi.Pointer.fromAddress(tmp15);
        this.__deallocate(tmp15_0, tmp17, 1);
      }
      throw tmp14_0;
    }
    final ffi.Pointer<ffi.Void> tmp18_0 = ffi.Pointer.fromAddress(tmp18);
    final tmp18_1 = _Box(this, tmp18_0, "drop_box_ColorizeBuilder");
    tmp18_1._finalizer = this._registerFinalizer(tmp18_1);
    final tmp13 = ColorizeBuilder._(this, tmp18_1);
    return tmp13;
  }

  /// create a display builder
  DisplayBuilder newDisplayBuilder() {
    final tmp0 = _newDisplayBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_DisplayBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = DisplayBuilder._(this, tmp2_1);
    return tmp1;
  }

  /// create object reference
  /// position: top-left/top-middle/top-right/center-left/center-middle/center-right/bottom-left/bottom-middle/bottom-right
  ObjRefBuilder newObjRefBuilder(String? position, RefDetails reference) {
    final tmp0 = position;
    final tmp6 = reference;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    if (tmp0 == null) {
      tmp1 = 0;
    } else {
      tmp1 = 1;
      final tmp2 = tmp0;
      final tmp2_0 = utf8.encode(tmp2);
      tmp4 = tmp2_0.length;

      final ffi.Pointer<ffi.Uint8> tmp3_0 = this.__allocate(tmp4 * 1, 1);
      final Uint8List tmp3_1 = tmp3_0.asTypedList(tmp4);
      tmp3_1.setAll(0, tmp2_0);
      tmp3 = tmp3_0.address;
      tmp5 = tmp4;
    }
    tmp7 = tmp6._box.move();
    final tmp8 = _newObjRefBuilder(tmp1, tmp3, tmp4, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    final tmp12 = tmp8.arg2;
    final tmp13 = tmp8.arg3;
    final tmp14 = tmp8.arg4;
    if (tmp10 == 0) {
      debugAllocation("handle error", tmp11, tmp12);
      final ffi.Pointer<ffi.Uint8> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
      final tmp10_0 = utf8.decode(
        tmp11_0.asTypedList(tmp12),
        allowMalformed: true,
      );
      if (tmp12 > 0) {
        final ffi.Pointer<ffi.Void> tmp11_0;
        tmp11_0 = ffi.Pointer.fromAddress(tmp11);
        this.__deallocate(tmp11_0, tmp13, 1);
      }
      throw tmp10_0;
    }
    final ffi.Pointer<ffi.Void> tmp14_0 = ffi.Pointer.fromAddress(tmp14);
    final tmp14_1 = _Box(this, tmp14_0, "drop_box_ObjRefBuilder");
    tmp14_1._finalizer = this._registerFinalizer(tmp14_1);
    final tmp9 = ObjRefBuilder._(this, tmp14_1);
    return tmp9;
  }

  VecStringBuilder newVecStringBuilder() {
    final tmp0 = _newVecStringBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_VecStringBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = VecStringBuilder._(this, tmp2_1);
    return tmp1;
  }

  /// Rotate the logging file
  JoinRuleBuilder newJoinRuleBuilder() {
    final tmp0 = _newJoinRuleBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_JoinRuleBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = JoinRuleBuilder._(this, tmp2_1);
    return tmp1;
  }

  /// make app permissions builder
  AppPermissionsBuilder newAppPermissionsBuilder() {
    final tmp0 = _newAppPermissionsBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_AppPermissionsBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = AppPermissionsBuilder._(this, tmp2_1);
    return tmp1;
  }

  /// make convo settings builder
  CreateConvoSettingsBuilder newConvoSettingsBuilder() {
    final tmp0 = _newConvoSettingsBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_CreateConvoSettingsBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = CreateConvoSettingsBuilder._(this, tmp2_1);
    return tmp1;
  }

  /// make space settings builder
  CreateSpaceSettingsBuilder newSpaceSettingsBuilder() {
    final tmp0 = _newSpaceSettingsBuilder();
    final tmp2 = tmp0;
    final ffi.Pointer<ffi.Void> tmp2_0 = ffi.Pointer.fromAddress(tmp2);
    final tmp2_1 = _Box(this, tmp2_0, "drop_box_CreateSpaceSettingsBuilder");
    tmp2_1._finalizer = this._registerFinalizer(tmp2_1);
    final tmp1 = CreateSpaceSettingsBuilder._(this, tmp2_1);
    return tmp1;
  }

  late final _allocatePtr = _lookup<
      ffi.NativeFunction<
          ffi.Pointer<ffi.Uint8> Function(ffi.IntPtr, ffi.IntPtr)>>("allocate");

  late final _allocate =
      _allocatePtr.asFunction<ffi.Pointer<ffi.Uint8> Function(int, int)>();

  late final _deallocatePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Pointer<ffi.Uint8>, ffi.IntPtr, ffi.IntPtr)>>("deallocate");

  late final _deallocate = _deallocatePtr
      .asFunction<void Function(ffi.Pointer<ffi.Uint8>, int, int)>();

  late final _ffiBufferAddressPtr =
      _lookup<ffi.NativeFunction<ffi.UintPtr Function(ffi.IntPtr)>>(
    "__ffi_buffer_address",
  );

  late final _ffiBufferAddress =
      _ffiBufferAddressPtr.asFunction<int Function(int)>();

  late final _ffiBufferSizePtr =
      _lookup<ffi.NativeFunction<ffi.UintPtr Function(ffi.IntPtr)>>(
    "__ffi_buffer_size",
  );

  late final _ffiBufferSize = _ffiBufferSizePtr.asFunction<int Function(int)>();

  late final _ffiStringIntoPartsPtr =
      _lookup<ffi.NativeFunction<_FfiStringParts Function(ffi.IntPtr)>>(
    "__ffi_string_into_parts",
  );

  late final _ffiStringIntoParts =
      _ffiStringIntoPartsPtr.asFunction<_FfiStringParts Function(int)>();

  Client? __loginNewClientFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _loginNewClientFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Client");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Client._(this, tmp13_1);
    return tmp7;
  }

  Client? __loginWithTokenFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _loginWithTokenFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Client");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Client._(this, tmp13_1);
    return tmp7;
  }

  Client? __guestClientFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _guestClientFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Client");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Client._(this, tmp13_1);
    return tmp7;
  }

  Client? __registerWithTokenFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _registerWithTokenFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Client");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Client._(this, tmp13_1);
    return tmp7;
  }

  RegistrationTokenViaEmailResponse?
      __requestRegistrationTokenViaEmailFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _requestRegistrationTokenViaEmailFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      this,
      tmp13_0,
      "drop_box_RegistrationTokenViaEmailResponse",
    );
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RegistrationTokenViaEmailResponse._(this, tmp13_1);
    return tmp7;
  }

  PasswordChangeEmailTokenResponse?
      __requestPasswordChangeTokenViaEmailFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _requestPasswordChangeTokenViaEmailFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      this,
      tmp13_0,
      "drop_box_PasswordChangeEmailTokenResponse",
    );
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = PasswordChangeEmailTokenResponse._(this, tmp13_1);
    return tmp7;
  }

  bool? __resetPasswordFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _resetPasswordFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __destroyLocalDataFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _destroyLocalDataFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __refDetailsGenerateExternalLinkFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _refDetailsGenerateExternalLinkFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  OptionBuffer? __userProfileGetAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _userProfileGetAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  FfiBufferUint8? __newsSlideSourceBinaryFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsSlideSourceBinaryFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __newsEntryCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  ReactionManager? __newsEntryReactionsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryReactionsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReactionManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReactionManager._(this, tmp13_1);
    return tmp7;
  }

  ReadReceiptsManager? __newsEntryReadReceiptsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryReadReceiptsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReadReceiptsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReadReceiptsManager._(this, tmp13_1);
    return tmp7;
  }

  CommentsManager? __newsEntryCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  RefDetails? __newsEntryRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  EventId? __newsEntryDraftSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __newsEntryUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _newsEntryUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  FfiBufferUint8? __storySlideSourceBinaryFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storySlideSourceBinaryFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __storyCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  ReactionManager? __storyReactionsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyReactionsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReactionManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReactionManager._(this, tmp13_1);
    return tmp7;
  }

  ReadReceiptsManager? __storyReadReceiptsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyReadReceiptsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReadReceiptsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReadReceiptsManager._(this, tmp13_1);
    return tmp7;
  }

  CommentsManager? __storyCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __storyDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __storyUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _storyUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __pinDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _pinDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  RefDetails? __acterPinRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterPinRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  ActerPin? __acterPinRefreshFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterPinRefreshFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ActerPin");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ActerPin._(this, tmp13_1);
    return tmp7;
  }

  bool? __acterPinCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterPinCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  CommentsManager? __acterPinCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterPinCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  AttachmentsManager? __acterPinAttachmentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterPinAttachmentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __pinUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _pinUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  RsvpManager? __calendarEventRsvpsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventRsvpsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RsvpManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RsvpManager._(this, tmp13_1);
    return tmp7;
  }

  ReactionManager? __calendarEventReactionsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventReactionsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReactionManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReactionManager._(this, tmp13_1);
    return tmp7;
  }

  OptionRsvpStatus? __calendarEventRespondedByMeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventRespondedByMeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionRsvpStatus");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionRsvpStatus._(this, tmp13_1);
    return tmp7;
  }

  FfiListFfiString? __calendarEventParticipantsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventParticipantsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __calendarEventCanRedactFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  CommentsManager? __calendarEventCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  AttachmentsManager? __calendarEventAttachmentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventAttachmentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentsManager._(this, tmp13_1);
    return tmp7;
  }

  RefDetails? __calendarEventRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  EventId? __calendarEventUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __calendarEventDraftSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _calendarEventDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  FfiListRsvp? __rsvpManagerRsvpEntriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _rsvpManagerRsvpEntriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListRsvp");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListRsvp._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  OptionRsvpStatus? __rsvpManagerRespondedByMeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _rsvpManagerRespondedByMeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionRsvpStatus");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionRsvpStatus._(this, tmp13_1);
    return tmp7;
  }

  int? __rsvpManagerCountAtStatusFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _rsvpManagerCountAtStatusFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13;
    return tmp7;
  }

  FfiListUserId? __rsvpManagerUsersAtStatusFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _rsvpManagerUsersAtStatusFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListUserId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListUserId._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  EventId? __rsvpDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _rsvpDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  FfiListReaction? __reactionManagerReactionEntriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerReactionEntriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListReaction");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListReaction._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  EventId? __reactionManagerSendLikeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerSendLikeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __reactionManagerSendReactionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerSendReactionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __reactionManagerRedactLikeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerRedactLikeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __reactionManagerRedactReactionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerRedactReactionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  ReactionManager? __reactionManagerReloadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _reactionManagerReloadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReactionManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReactionManager._(this, tmp13_1);
    return tmp7;
  }

  bool? __readReceiptsManagerAnnounceReadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _readReceiptsManagerAnnounceReadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  ReadReceiptsManager? __readReceiptsManagerReloadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _readReceiptsManagerReloadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ReadReceiptsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ReadReceiptsManager._(this, tmp13_1);
    return tmp7;
  }

  bool? __eventSendStateAbortFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _eventSendStateAbortFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  OptionBuffer? __roomAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  OptionString? __roomDisplayNameFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomDisplayNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  bool? __roomSetJoinRuleFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomSetJoinRuleFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  SpaceRelations? __roomSpaceRelationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomSpaceRelationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_SpaceRelations");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = SpaceRelations._(this, tmp13_1);
    return tmp7;
  }

  bool? __roomIsDirectFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomIsDirectFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __roomAddParentRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomAddParentRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __roomRemoveParentRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomRemoveParentRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __roomAddChildRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomAddChildRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __roomRemoveChildRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomRemoveChildRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  Member? __roomGetMyMembershipFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomGetMyMembershipFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  FfiListFfiString? __roomActiveMembersIdsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomActiveMembersIdsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __roomActiveMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomActiveMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __roomInvitedMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomInvitedMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Member? __roomGetMemberFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomGetMemberFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  bool? __roomInviteUserFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomInviteUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __roomNotificationModeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomNotificationModeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  String? __roomDefaultNotificationModeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomDefaultNotificationModeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __roomUnmuteFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomUnmuteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __roomSetNotificationModeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomSetNotificationModeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  EventId? __roomUpdatePowerLevelFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomUpdatePowerLevelFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  MxcUri? __roomUploadAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomUploadAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_MxcUri");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = MxcUri._(this, tmp13_1);
    return tmp7;
  }

  EventId? __roomRemoveAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomRemoveAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __roomSetTopicFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomSetTopicFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __roomSetNameFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomSetNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  bool? __roomLeaveFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomLeaveFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  UserRoomSettings? __roomUserSettingsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomUserSettingsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_UserRoomSettings");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = UserRoomSettings._(this, tmp13_1);
    return tmp7;
  }

  bool? __userRoomSettingsSetHasSeenSuggestedFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _userRoomSettingsSetHasSeenSuggestedFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __userRoomSettingsSetIncludeCalSyncFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _userRoomSettingsSetIncludeCalSyncFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  TimelineItem? __timelineStreamGetMessageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamGetMessageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_TimelineItem");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = TimelineItem._(this, tmp13_1);
    return tmp7;
  }

  bool? __timelineStreamFetchDetailsForEventFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamFetchDetailsForEventFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamPaginateBackwardsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamPaginateBackwardsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamSendMessageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamSendMessageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamEditMessageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamEditMessageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamReplyMessageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamReplyMessageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamMarkAsReadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamMarkAsReadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __timelineStreamToggleReactionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _timelineStreamToggleReactionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  SpaceRelations? __convoSpaceRelationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSpaceRelationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_SpaceRelations");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = SpaceRelations._(this, tmp13_1);
    return tmp7;
  }

  MxcUri? __convoUploadAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoUploadAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_MxcUri");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = MxcUri._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoRemoveAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoRemoveAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetNameFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetTopicFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetTopicFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  FfiListFfiString? __convoActiveMembersIdsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoActiveMembersIdsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __convoActiveMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoActiveMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __convoInvitedMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoInvitedMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Member? __convoGetMemberFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoGetMemberFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  Member? __convoGetMyMembershipFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoGetMyMembershipFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  bool? __convoTypingNoticeFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoTypingNoticeFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiBufferUint8? __convoMediaBinaryFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoMediaBinaryFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __convoSetBookmarkedFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetBookmarkedFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __convoInviteUserFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoInviteUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __convoPermalinkFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoPermalinkFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __convoJoinFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoJoinFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __convoLeaveFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoLeaveFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListMember? __convoGetInviteesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoGetInviteesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  OptionString? __convoDownloadMediaFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoDownloadMediaFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  OptionString? __convoMediaPathFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoMediaPathFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  bool? __convoIsEncryptedFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoIsEncryptedFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  EventId? __convoRedactMessageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoRedactMessageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoUpdatePowerLevelFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoUpdatePowerLevelFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  bool? __convoReportContentFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoReportContentFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  EventId? __convoRedactContentFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoRedactContentFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  OptionComposeDraft? __convoMsgDraftFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoMsgDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionComposeDraft");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionComposeDraft._(this, tmp13_1);
    return tmp7;
  }

  bool? __convoSaveMsgDraftFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSaveMsgDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __convoClearMsgDraftFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoClearMsgDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  RefDetails? __convoRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPolicyRuleRoomFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPolicyRuleRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPolicyRuleServerFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPolicyRuleServerFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPolicyRuleUserFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPolicyRuleUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetEncryptionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetEncryptionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetGuestAccessFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetGuestAccessFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetHistoryVisibilityFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetHistoryVisibilityFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetJoinRulesFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetJoinRulesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPinnedEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPinnedEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsBanFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsBanFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsEventsDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsEventsDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsInviteFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsInviteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsKickFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsKickFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsRedactFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsStateDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsStateDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsUsersDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsUsersDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetPowerLevelsNotificationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetPowerLevelsNotificationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetServerAclFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetServerAclFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __convoSetTombstoneFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _convoSetTombstoneFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __commentDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _commentDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  bool? __commentCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _commentCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListComment? __commentsManagerCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _commentsManagerCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListComment");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListComment._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  CommentsManager? __commentsManagerReloadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _commentsManagerReloadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  String? __objectInvitationsManagerInviteFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _objectInvitationsManagerInviteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  ObjectInvitationsManager? __objectInvitationsManagerReloadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _objectInvitationsManagerReloadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ObjectInvitationsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ObjectInvitationsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __attachmentDraftSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  OptionString? __attachmentDownloadMediaFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentDownloadMediaFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  OptionString? __attachmentMediaPathFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentMediaPathFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  bool? __attachmentCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListAttachment? __attachmentsManagerAttachmentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerAttachmentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListAttachment");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListAttachment._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  AttachmentDraft? __attachmentsManagerContentDraftFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerContentDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentDraft");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentDraft._(this, tmp13_1);
    return tmp7;
  }

  AttachmentDraft? __attachmentsManagerLinkDraftFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerLinkDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentDraft");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentDraft._(this, tmp13_1);
    return tmp7;
  }

  AttachmentDraft? __attachmentsManagerReferenceDraftFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerReferenceDraftFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentDraft");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentDraft._(this, tmp13_1);
    return tmp7;
  }

  AttachmentsManager? __attachmentsManagerReloadFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerReloadFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __attachmentsManagerRedactFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _attachmentsManagerRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskAssignSelfFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskAssignSelfFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskUnassignSelfFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskUnassignSelfFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  Task? __taskRefreshFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskRefreshFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Task");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Task._(this, tmp13_1);
    return tmp7;
  }

  bool? __taskCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  CommentsManager? __taskCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  AttachmentsManager? __taskAttachmentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskAttachmentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentsManager._(this, tmp13_1);
    return tmp7;
  }

  ObjectInvitationsManager? __taskInvitationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskInvitationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ObjectInvitationsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ObjectInvitationsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  FfiListTask? __taskListTasksFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListTasksFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListTask");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListTask._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Task? __taskListTaskFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListTaskFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Task");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Task._(this, tmp13_1);
    return tmp7;
  }

  TaskList? __taskListRefreshFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListRefreshFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_TaskList");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = TaskList._(this, tmp13_1);
    return tmp7;
  }

  bool? __taskListCanRedactFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListCanRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  RefDetails? __taskListRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  CommentsManager? __taskListCommentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListCommentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CommentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CommentsManager._(this, tmp13_1);
    return tmp7;
  }

  AttachmentsManager? __taskListAttachmentsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListAttachmentsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_AttachmentsManager");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = AttachmentsManager._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskListDraftSendFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListDraftSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __taskListUpdateBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _taskListUpdateBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  OptionBuffer? __spaceHierarchyRoomInfoGetAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceHierarchyRoomInfoGetAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  FfiListSpaceHierarchyRoomInfo? __spaceRelationsQueryHierarchyFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceRelationsQueryHierarchyFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      this,
      tmp13_0,
      "drop_box_FfiListSpaceHierarchyRoomInfo",
    );
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListSpaceHierarchyRoomInfo._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListFfiString? __activitiesGetIdsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _activitiesGetIdsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  OptionBuffer? __roomPreviewAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomPreviewAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceCreateOnboardingDataFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceCreateOnboardingDataFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  SpaceRelations? __spaceSpaceRelationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSpaceRelationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_SpaceRelations");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = SpaceRelations._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceIsChildSpaceOfFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceIsChildSpaceOfFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    if (tmp8 == 0) {
      return null;
    }
    final tmp7 = tmp9 > 0;
    return tmp7;
  }

  String? __spaceAddChildRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceAddChildRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __spaceRemoveChildRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceRemoveChildRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  MxcUri? __spaceUploadAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceUploadAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_MxcUri");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = MxcUri._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceSetActerSpaceStatesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetActerSpaceStatesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  EventId? __spaceRemoveAvatarFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceRemoveAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetTopicFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetTopicFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetNameFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceSetBookmarkedFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetBookmarkedFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListFfiString? __spaceActiveMembersIdsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceActiveMembersIdsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __spaceActiveMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceActiveMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListMember? __spaceInvitedMembersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceInvitedMembersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListMember");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListMember._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __spaceInviteUserFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceInviteUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  Member? __spaceGetMemberFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceGetMemberFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  Member? __spaceGetMyMembershipFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceGetMyMembershipFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Member");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Member._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceIsEncryptedFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceIsEncryptedFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __spaceIsActerSpaceFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceIsActerSpaceFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListTaskList? __spaceTaskListsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceTaskListsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListTaskList");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListTaskList._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListNewsEntry? __spaceLatestNewsEntriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceLatestNewsEntriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListNewsEntry");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListNewsEntry._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListStory? __spaceLatestStoriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceLatestStoriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListStory");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListStory._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListCalendarEvent? __spaceCalendarEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceCalendarEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListCalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListCalendarEvent._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListActerPin? __spacePinsFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spacePinsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListActerPin");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListActerPin._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __spaceJoinFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceJoinFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __spaceLeaveFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceLeaveFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  RoomPowerLevels? __spacePowerLevelsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spacePowerLevelsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RoomPowerLevels");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RoomPowerLevels._(this, tmp13_1);
    return tmp7;
  }

  ActerAppSettings? __spaceAppSettingsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceAppSettingsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ActerAppSettings");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ActerAppSettings._(this, tmp13_1);
    return tmp7;
  }

  String? __spaceUpdateAppSettingsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceUpdateAppSettingsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __spaceUpdateFeaturePowerLevelsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceUpdateFeaturePowerLevelsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __spaceUpdateRegularPowerLevelsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceUpdateRegularPowerLevelsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __spaceReportContentFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceReportContentFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  EventId? __spaceRedactContentFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceRedactContentFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  Categories? __spaceCategoriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceCategoriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Categories");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Categories._(this, tmp13_1);
    return tmp7;
  }

  bool? __spaceSetCategoriesFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetCategoriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  RefDetails? __spaceRefDetailsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceRefDetailsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RefDetails");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RefDetails._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPolicyRuleRoomFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPolicyRuleRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPolicyRuleServerFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPolicyRuleServerFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPolicyRuleUserFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPolicyRuleUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetEncryptionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetEncryptionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetGuestAccessFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetGuestAccessFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetHistoryVisibilityFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetHistoryVisibilityFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetJoinRulesFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetJoinRulesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPinnedEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPinnedEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsBanFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsBanFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsEventsDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsEventsDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsInviteFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsInviteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsKickFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsKickFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsRedactFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsRedactFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsStateDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsStateDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsUsersDefaultFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsUsersDefaultFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetPowerLevelsNotificationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetPowerLevelsNotificationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetServerAclFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetServerAclFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  EventId? __spaceSetTombstoneFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _spaceSetTombstoneFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_EventId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = EventId._(this, tmp13_1);
    return tmp7;
  }

  bool? __memberIgnoreFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _memberIgnoreFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __memberUnignoreFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _memberUnignoreFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __memberKickFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _memberKickFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __memberBanFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _memberBanFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __memberUnbanFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _memberUnbanFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __acterUserAppSettingsBuilderSendFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _acterUserAppSettingsBuilderSendFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  OptionString? __accountDisplayNameFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountDisplayNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  bool? __accountSetDisplayNameFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountSetDisplayNameFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  OptionBuffer? __accountAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  MxcUri? __accountUploadAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountUploadAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_MxcUri");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = MxcUri._(this, tmp13_1);
    return tmp7;
  }

  FfiListUserId? __accountIgnoredUsersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountIgnoredUsersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListUserId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListUserId._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __accountIgnoreUserFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountIgnoreUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __accountUnignoreUserFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountUnignoreUserFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  ActerUserAppSettings? __accountActerAppSettingsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountActerAppSettingsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ActerUserAppSettings");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ActerUserAppSettings._(this, tmp13_1);
    return tmp7;
  }

  bool? __accountDeactivateFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountDeactivateFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __accountChangePasswordFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountChangePasswordFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListFfiString? __accountConfirmedEmailAddressesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountConfirmedEmailAddressesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListFfiString? __accountRequestedEmailAddressesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountRequestedEmailAddressesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  ThreePidEmailTokenResponse?
      __accountRequest3pidManagementTokenViaEmailFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountRequest3pidManagementTokenViaEmailFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ThreePidEmailTokenResponse");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ThreePidEmailTokenResponse._(this, tmp13_1);
    return tmp7;
  }

  FfiListExternalId? __accountExternalIdsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountExternalIdsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListExternalId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListExternalId._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __accountTryConfirmEmailStatusFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountTryConfirmEmailStatusFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __accountSubmitTokenFromEmailFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountSubmitTokenFromEmailFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __accountRemoveEmailAddressFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountRemoveEmailAddressFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  Bookmarks? __accountBookmarksFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _accountBookmarksFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Bookmarks");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Bookmarks._(this, tmp13_1);
    return tmp7;
  }

  bool? __bookmarksAddFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _bookmarksAddFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __bookmarksRemoveFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _bookmarksRemoveFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  OptionBuffer? __publicSearchResultItemGetAvatarFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _publicSearchResultItemGetAvatarFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionBuffer._(this, tmp13_1);
    return tmp7;
  }

  FfiBufferUint8? __notificationSenderImageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSenderImageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiBufferUint8? __notificationRoomImageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationRoomImageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiBufferUint8? __notificationItemImageFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationItemImageFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiBuffer");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiBufferUint8._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  String? __notificationItemImagePathFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationItemImagePathFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __pusherDeleteFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _pusherDeleteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListRoomInvitation? __invitationsManagerRoomInvitationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _invitationsManagerRoomInvitationsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListRoomInvitation");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListRoomInvitation._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListFfiString? __invitationsManagerObjectInvitationsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _invitationsManagerObjectInvitationsFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  String? __clientRestoreTokenFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientRestoreTokenFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  Room? __clientRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Room");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Room._(this, tmp13_1);
    return tmp7;
  }

  Convo? __clientConvoFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientConvoFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Convo");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Convo._(this, tmp13_1);
    return tmp7;
  }

  bool? __clientHasConvoFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientHasConvoFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    if (tmp8 == 0) {
      return null;
    }
    final tmp7 = tmp9 > 0;
    return tmp7;
  }

  Convo? __clientConvoWithRetryFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientConvoWithRetryFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Convo");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Convo._(this, tmp13_1);
    return tmp7;
  }

  MxcUri? __clientUploadMediaFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientUploadMediaFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_MxcUri");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = MxcUri._(this, tmp13_1);
    return tmp7;
  }

  FfiListSpace? __clientSpacesFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientSpacesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListSpace");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListSpace._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Room? __clientJoinRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientJoinRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Room");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Room._(this, tmp13_1);
    return tmp7;
  }

  Space? __clientSpaceFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientSpaceFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Space");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Space._(this, tmp13_1);
    return tmp7;
  }

  FfiListUserProfile? __clientSuggestedUsersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientSuggestedUsersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListUserProfile");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListUserProfile._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListUserProfile? __clientSearchUsersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientSearchUsersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListUserProfile");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListUserProfile._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  PublicSearchResult? __clientSearchPublicRoomFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientSearchPublicRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_PublicSearchResult");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = PublicSearchResult._(this, tmp13_1);
    return tmp7;
  }

  bool? __clientVerifiedDeviceFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientVerifiedDeviceFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __clientLogoutFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientLogoutFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  VerificationEvent? __clientRequestVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientRequestVerificationFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_VerificationEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = VerificationEvent._(this, tmp13_1);
    return tmp7;
  }

  bool? __clientInstallRequestEventHandlerFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientInstallRequestEventHandlerFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __clientInstallSasEventHandlerFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientInstallSasEventHandlerFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  RoomId? __clientCreateConvoFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientCreateConvoFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RoomId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RoomId._(this, tmp13_1);
    return tmp7;
  }

  RoomId? __clientCreateActerSpaceFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientCreateActerSpaceFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RoomId");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RoomId._(this, tmp13_1);
    return tmp7;
  }

  bool? __clientWaitForRoomFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForRoomFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  Comment? __clientWaitForCommentFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForCommentFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Comment");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Comment._(this, tmp13_1);
    return tmp7;
  }

  NewsEntry? __clientWaitForNewsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForNewsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_NewsEntry");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = NewsEntry._(this, tmp13_1);
    return tmp7;
  }

  FfiListNewsEntry? __clientLatestNewsEntriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientLatestNewsEntriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListNewsEntry");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListNewsEntry._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Story? __clientWaitForStoryFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForStoryFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Story");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Story._(this, tmp13_1);
    return tmp7;
  }

  FfiListStory? __clientLatestStoriesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientLatestStoriesFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListStory");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListStory._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  ActerPin? __clientWaitForPinFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForPinFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ActerPin");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ActerPin._(this, tmp13_1);
    return tmp7;
  }

  FfiListActerPin? __clientPinsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientPinsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListActerPin");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListActerPin._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  ActerPin? __clientPinFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientPinFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_ActerPin");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = ActerPin._(this, tmp13_1);
    return tmp7;
  }

  TaskList? __clientTaskListFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientTaskListFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_TaskList");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = TaskList._(this, tmp13_1);
    return tmp7;
  }

  FfiListTaskList? __clientTaskListsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientTaskListsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListTaskList");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListTaskList._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  Task? __clientWaitForTaskFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForTaskFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Task");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Task._(this, tmp13_1);
    return tmp7;
  }

  FfiListTask? __clientMyOpenTasksFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientMyOpenTasksFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListTask");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListTask._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListCalendarEvent? __clientCalendarEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientCalendarEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListCalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListCalendarEvent._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  CalendarEvent? __clientCalendarEventFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientCalendarEventFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CalendarEvent._(this, tmp13_1);
    return tmp7;
  }

  CalendarEvent? __clientWaitForCalendarEventFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForCalendarEventFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_CalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = CalendarEvent._(this, tmp13_1);
    return tmp7;
  }

  Reaction? __clientWaitForReactionFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForReactionFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Reaction");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Reaction._(this, tmp13_1);
    return tmp7;
  }

  Rsvp? __clientWaitForRsvpFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientWaitForRsvpFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Rsvp");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Rsvp._(this, tmp13_1);
    return tmp7;
  }

  bool? __clientInstallDefaultActerPushRulesFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientInstallDefaultActerPushRulesFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListPusher? __clientPushersFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientPushersFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListPusher");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListPusher._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __clientAddPusherFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientAddPusherFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __clientAddEmailPusherFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientAddEmailPusherFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  NotificationItem? __clientGetNotificationItemFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientGetNotificationItemFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_NotificationItem");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = NotificationItem._(this, tmp13_1);
    return tmp7;
  }

  FfiListCalendarEvent? __clientAllUpcomingEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientAllUpcomingEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListCalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListCalendarEvent._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListCalendarEvent? __clientMyUpcomingEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientMyUpcomingEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListCalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListCalendarEvent._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  FfiListCalendarEvent? __clientMyPastEventsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientMyPastEventsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListCalendarEvent");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListCalendarEvent._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  NotificationSettings? __clientNotificationSettingsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientNotificationSettingsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_NotificationSettings");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = NotificationSettings._(this, tmp13_1);
    return tmp7;
  }

  FfiListDeviceRecord? __clientDeviceRecordsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientDeviceRecordsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListDeviceRecord");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListDeviceRecord._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  RoomPreview? __clientRoomPreviewFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientRoomPreviewFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_RoomPreview");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = RoomPreview._(this, tmp13_1);
    return tmp7;
  }

  Activity? __clientActivityFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientActivityFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_Activity");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = Activity._(this, tmp13_1);
    return tmp7;
  }

  LocalUrlPreview? __clientUrlPreviewFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _clientUrlPreviewFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_LocalUrlPreview");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = LocalUrlPreview._(this, tmp13_1);
    return tmp7;
  }

  String? __notificationSettingsDefaultNotificationModeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsDefaultNotificationModeFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __notificationSettingsSetDefaultNotificationModeFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsSetDefaultNotificationModeFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __notificationSettingsGlobalContentSettingFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsGlobalContentSettingFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __notificationSettingsSetGlobalContentSettingFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsSetGlobalContentSettingFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __notificationSettingsObjectPushSubscriptionStatusStrFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsObjectPushSubscriptionStatusStrFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __notificationSettingsSubscribeObjectPushFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsSubscribeObjectPushFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __notificationSettingsUnsubscribeObjectPushFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _notificationSettingsUnsubscribeObjectPushFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __roomInvitationAcceptFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomInvitationAcceptFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __roomInvitationRejectFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _roomInvitationRejectFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListSuperInviteToken? __superInvitesTokensFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _superInvitesTokensFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListSuperInviteToken");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListSuperInviteToken._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  SuperInviteToken? __superInvitesCreateOrUpdateTokenFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _superInvitesCreateOrUpdateTokenFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_SuperInviteToken");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = SuperInviteToken._(this, tmp13_1);
    return tmp7;
  }

  bool? __superInvitesDeleteFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _superInvitesDeleteFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListFfiString? __superInvitesRedeemFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _superInvitesRedeemFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListFfiString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListFfiString._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  SuperInviteInfo? __superInvitesInfoFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _superInvitesInfoFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_SuperInviteInfo");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = SuperInviteInfo._(this, tmp13_1);
    return tmp7;
  }

  FfiListVerificationEmoji? __verificationEventGetEmojisFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventGetEmojisFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListVerificationEmoji");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListVerificationEmoji._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __verificationEventAcceptVerificationRequestFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventAcceptVerificationRequestFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventCancelVerificationRequestFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventCancelVerificationRequestFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventAcceptVerificationRequestWithMethodFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 =
        _verificationEventAcceptVerificationRequestWithMethodFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventStartSasVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventStartSasVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventAcceptSasVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventAcceptSasVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventCancelSasVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventCancelSasVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventConfirmSasVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventConfirmSasVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __verificationEventMismatchSasVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _verificationEventMismatchSasVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  FfiListDeviceRecord? __sessionManagerAllSessionsFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _sessionManagerAllSessionsFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_FfiListDeviceRecord");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp14 = FfiListDeviceRecord._(this, tmp13_1);
    final tmp7 = tmp14;
    return tmp7;
  }

  bool? __sessionManagerDeleteDeviceFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _sessionManagerDeleteDeviceFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __sessionManagerRequestVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _sessionManagerRequestVerificationFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __sessionManagerTerminateVerificationFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _sessionManagerTerminateVerificationFuturePoll(
      tmp1,
      tmp3,
      tmp5,
    );
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  String? __backupManagerEnableFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerEnableFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  String? __backupManagerResetKeyFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerResetKeyFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  String? __backupManagerResetIdentityFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerResetIdentityFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    final tmp14 = tmp6.arg6;
    final tmp15 = tmp6.arg7;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    if (tmp14 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp13_ptr = ffi.Pointer.fromAddress(tmp13);
    List<int> tmp13_buf = [];
    final tmp13_precast = tmp13_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp14; i++) {
      int char = tmp13_precast.elementAt(i).value;
      tmp13_buf.add(char);
    }
    final tmp7 = utf8.decode(tmp13_buf, allowMalformed: true);
    if (tmp15 > 0) {
      final ffi.Pointer<ffi.Void> tmp13_0;
      tmp13_0 = ffi.Pointer.fromAddress(tmp13);
      this.__deallocate(tmp13_0, tmp15 * 1, 1);
    }
    return tmp7;
  }

  bool? __backupManagerDisableFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerDisableFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __backupManagerRecoverFuturePoll(int boxed, int postCobject, int port) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerRecoverFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  OptionString? __backupManagerStoredEncKeyFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerStoredEncKeyFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(this, tmp13_0, "drop_box_OptionString");
    tmp13_1._finalizer = this._registerFinalizer(tmp13_1);
    final tmp7 = OptionString._(this, tmp13_1);
    return tmp7;
  }

  int? __backupManagerStoredEncKeyWhenFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerStoredEncKeyWhenFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13;
    return tmp7;
  }

  bool? __backupManagerDestroyStoredEncKeyFuturePoll(
    int boxed,
    int postCobject,
    int port,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    final tmp6 = _backupManagerDestroyStoredEncKeyFuturePoll(tmp1, tmp3, tmp5);
    final tmp8 = tmp6.arg0;
    final tmp9 = tmp6.arg1;
    final tmp10 = tmp6.arg2;
    final tmp11 = tmp6.arg3;
    final tmp12 = tmp6.arg4;
    final tmp13 = tmp6.arg5;
    if (tmp8 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      debugAllocation("handle error", tmp10, tmp11);
      final ffi.Pointer<ffi.Uint8> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
      final tmp9_0 = utf8.decode(
        tmp10_0.asTypedList(tmp11),
        allowMalformed: true,
      );
      if (tmp11 > 0) {
        final ffi.Pointer<ffi.Void> tmp10_0;
        tmp10_0 = ffi.Pointer.fromAddress(tmp10);
        this.__deallocate(tmp10_0, tmp12, 1);
      }
      throw tmp9_0;
    }
    final tmp7 = tmp13 > 0;
    return tmp7;
  }

  bool? __acterPinSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _acterPinSubscribeStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __rsvpManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _rsvpManagerSubscribeStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __reactionManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _reactionManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __readReceiptsManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _readReceiptsManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __roomSubscribeToUpdatesStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _roomSubscribeToUpdatesStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __userRoomSettingsSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _userRoomSettingsSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  TimelineItemDiff? __timelineStreamMessagesStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _timelineStreamMessagesStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_TimelineItemDiff");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = TimelineItemDiff._(this, tmp11_1);
    return tmp9;
  }

  bool? __commentsManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _commentsManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __objectInvitationsManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _objectInvitationsManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __attachmentsManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _attachmentsManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __taskSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _taskSubscribeStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __taskListSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _taskListSubscribeStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __activitiesSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _activitiesSubscribeStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __accountSubscribeAppSettingsStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _accountSubscribeAppSettingsStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __syncStateFirstSyncedRxStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _syncStateFirstSyncedRxStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  String? __syncStateSyncErrorRxStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _syncStateSyncErrorRxStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    final tmp12 = tmp8.arg2;
    final tmp13 = tmp8.arg3;
    if (tmp10 == 0) {
      return null;
    }
    if (tmp12 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp11_ptr = ffi.Pointer.fromAddress(tmp11);
    List<int> tmp11_buf = [];
    final tmp11_precast = tmp11_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp12; i++) {
      int char = tmp11_precast.elementAt(i).value;
      tmp11_buf.add(char);
    }
    final tmp9 = utf8.decode(tmp11_buf, allowMalformed: true);
    if (tmp13 > 0) {
      final ffi.Pointer<ffi.Void> tmp11_0;
      tmp11_0 = ffi.Pointer.fromAddress(tmp11);
      this.__deallocate(tmp11_0, tmp13 * 1, 1);
    }
    return tmp9;
  }

  bool? __invitationsManagerSubscribeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _invitationsManagerSubscribeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  ConvoDiff? __clientConvosStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientConvosStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_ConvoDiff");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = ConvoDiff._(this, tmp11_1);
    return tmp9;
  }

  SpaceDiff? __clientSpacesStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSpacesStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_SpaceDiff");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = SpaceDiff._(this, tmp11_1);
    return tmp9;
  }

  VerificationEvent? __clientVerificationEventRxStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientVerificationEventRxStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_VerificationEvent");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = VerificationEvent._(this, tmp11_1);
    return tmp9;
  }

  DeviceEvent? __clientDeviceEventRxStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientDeviceEventRxStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_DeviceEvent");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = DeviceEvent._(this, tmp11_1);
    return tmp9;
  }

  TypingEvent? __clientSubscribeToTypingEventStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeToTypingEventStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(this, tmp11_0, "drop_box_TypingEvent");
    tmp11_1._finalizer = this._registerFinalizer(tmp11_1);
    final tmp9 = TypingEvent._(this, tmp11_1);
    return tmp9;
  }

  bool? __clientSubscribeSectionStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeSectionStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeModelStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeModelStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeModelObjectsStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeModelObjectsStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeModelParamStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeModelParamStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeRoomStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeRoomStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeRoomParamStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeRoomParamStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeRoomSectionStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeRoomSectionStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeEventTypeStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeEventTypeStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeAccountDataStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeAccountDataStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeRoomAccountDataStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeRoomAccountDataStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __clientSubscribeMyOpenTasksStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _clientSubscribeMyOpenTasksStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  bool? __notificationSettingsChangesStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _notificationSettingsChangesStreamStreamPoll(
      tmp1,
      tmp3,
      tmp5,
      tmp7,
    );
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    if (tmp10 == 0) {
      return null;
    }
    final tmp9 = tmp11 > 0;
    return tmp9;
  }

  String? __backupManagerStateStreamStreamPoll(
    int boxed,
    int postCobject,
    int port,
    int done,
  ) {
    final tmp0 = boxed;
    final tmp2 = postCobject;
    final tmp4 = port;
    final tmp6 = done;
    var tmp1 = 0;
    var tmp3 = 0;
    var tmp5 = 0;
    var tmp7 = 0;
    tmp1 = tmp0;
    tmp3 = tmp2;
    tmp5 = tmp4;
    tmp7 = tmp6;
    final tmp8 = _backupManagerStateStreamStreamPoll(tmp1, tmp3, tmp5, tmp7);
    final tmp10 = tmp8.arg0;
    final tmp11 = tmp8.arg1;
    final tmp12 = tmp8.arg2;
    final tmp13 = tmp8.arg3;
    if (tmp10 == 0) {
      return null;
    }
    if (tmp12 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp11_ptr = ffi.Pointer.fromAddress(tmp11);
    List<int> tmp11_buf = [];
    final tmp11_precast = tmp11_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp12; i++) {
      int char = tmp11_precast.elementAt(i).value;
      tmp11_buf.add(char);
    }
    final tmp9 = utf8.decode(tmp11_buf, allowMalformed: true);
    if (tmp13 > 0) {
      final ffi.Pointer<ffi.Void> tmp11_0;
      tmp11_0 = ffi.Pointer.fromAddress(tmp11);
      this.__deallocate(tmp11_0, tmp13 * 1, 1);
    }
    return tmp9;
  }

  late final _initLoggingPtr = _lookup<
      ffi.NativeFunction<
          _InitLoggingReturn Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__init_logging");

  late final _initLogging = _initLoggingPtr
      .asFunction<_InitLoggingReturn Function(int, int, int, int, int, int)>();
  late final _setProxyPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.Uint8, ffi.IntPtr, ffi.UintPtr, ffi.UintPtr)>>("__set_proxy");

  late final _setProxy =
      _setProxyPtr.asFunction<void Function(int, int, int, int)>();
  late final _rotateLogFilePtr =
      _lookup<ffi.NativeFunction<_RotateLogFileReturn Function()>>(
    "__rotate_log_file",
  );

  late final _rotateLogFile =
      _rotateLogFilePtr.asFunction<_RotateLogFileReturn Function()>();
  late final _wouldLogPtr = _lookup<
      ffi.NativeFunction<
          ffi.Uint8 Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__would_log");

  late final _wouldLog =
      _wouldLogPtr.asFunction<int Function(int, int, int, int, int, int)>();
  late final _writeLogPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint32,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__write_log");

  late final _writeLog = _writeLogPtr.asFunction<
      void Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _loginNewClientPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__login_new_client");

  late final _loginNewClient = _loginNewClientPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _loginWithTokenPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__login_with_token");

  late final _loginWithToken = _loginWithTokenPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int, int)>();
  late final _guestClientPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__guest_client");

  late final _guestClient = _guestClientPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _registerWithTokenPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__register_with_token");

  late final _registerWithToken = _registerWithTokenPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _requestRegistrationTokenViaEmailPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__request_registration_token_via_email");

  late final _requestRegistrationTokenViaEmail =
      _requestRegistrationTokenViaEmailPtr.asFunction<
          int Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _requestPasswordChangeTokenViaEmailPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__request_password_change_token_via_email");

  late final _requestPasswordChangeTokenViaEmail =
      _requestPasswordChangeTokenViaEmailPtr
          .asFunction<int Function(int, int, int, int, int, int)>();
  late final _resetPasswordPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__reset_password");

  late final _resetPassword = _resetPasswordPtr.asFunction<
      int Function(
          int, int, int, int, int, int, int, int, int, int, int, int)>();
  late final _destroyLocalDataPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__destroy_local_data");

  late final _destroyLocalData = _destroyLocalDataPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _durationFromSecsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.Uint64)>>(
    "__duration_from_secs",
  );

  late final _durationFromSecs =
      _durationFromSecsPtr.asFunction<int Function(int)>();
  late final _newThumbSizePtr = _lookup<
      ffi.NativeFunction<
          _NewThumbSizeReturn Function(
              ffi.Uint64, ffi.Uint64)>>("__new_thumb_size");

  late final _newThumbSize =
      _newThumbSizePtr.asFunction<_NewThumbSizeReturn Function(int, int)>();
  late final _newColorizeBuilderPtr = _lookup<
      ffi.NativeFunction<
          _NewColorizeBuilderReturn Function(
            ffi.Uint8,
            ffi.Uint32,
            ffi.Uint8,
            ffi.Uint32,
            ffi.Uint8,
            ffi.Uint32,
          )>>("__new_colorize_builder");

  late final _newColorizeBuilder = _newColorizeBuilderPtr.asFunction<
      _NewColorizeBuilderReturn Function(int, int, int, int, int, int)>();
  late final _newDisplayBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_display_builder",
  );

  late final _newDisplayBuilder =
      _newDisplayBuilderPtr.asFunction<int Function()>();
  late final _newObjRefBuilderPtr = _lookup<
      ffi.NativeFunction<
          _NewObjRefBuilderReturn Function(
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__new_obj_ref_builder");

  late final _newObjRefBuilder = _newObjRefBuilderPtr
      .asFunction<_NewObjRefBuilderReturn Function(int, int, int, int, int)>();
  late final _newVecStringBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_vec_string_builder",
  );

  late final _newVecStringBuilder =
      _newVecStringBuilderPtr.asFunction<int Function()>();
  late final _newJoinRuleBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_join_rule_builder",
  );

  late final _newJoinRuleBuilder =
      _newJoinRuleBuilderPtr.asFunction<int Function()>();
  late final _newAppPermissionsBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_app_permissions_builder",
  );

  late final _newAppPermissionsBuilder =
      _newAppPermissionsBuilderPtr.asFunction<int Function()>();
  late final _newConvoSettingsBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_convo_settings_builder",
  );

  late final _newConvoSettingsBuilder =
      _newConvoSettingsBuilderPtr.asFunction<int Function()>();
  late final _newSpaceSettingsBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__new_space_settings_builder",
  );

  late final _newSpaceSettingsBuilder =
      _newSpaceSettingsBuilderPtr.asFunction<int Function()>();
  late final _utcDateTimeTimestampPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__UtcDateTime_timestamp",
  );

  late final _utcDateTimeTimestamp =
      _utcDateTimeTimestampPtr.asFunction<int Function(int)>();
  late final _utcDateTimeToRfc2822Ptr = _lookup<
          ffi.NativeFunction<_UtcDateTimeToRfc2822Return Function(ffi.IntPtr)>>(
      "__UtcDateTime_to_rfc2822");

  late final _utcDateTimeToRfc2822 = _utcDateTimeToRfc2822Ptr
      .asFunction<_UtcDateTimeToRfc2822Return Function(int)>();
  late final _utcDateTimeToRfc3339Ptr = _lookup<
          ffi.NativeFunction<_UtcDateTimeToRfc3339Return Function(ffi.IntPtr)>>(
      "__UtcDateTime_to_rfc3339");

  late final _utcDateTimeToRfc3339 = _utcDateTimeToRfc3339Ptr
      .asFunction<_UtcDateTimeToRfc3339Return Function(int)>();
  late final _utcDateTimeTimestampMillisPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__UtcDateTime_timestamp_millis",
  );

  late final _utcDateTimeTimestampMillis =
      _utcDateTimeTimestampMillisPtr.asFunction<int Function(int)>();
  late final _refDetailsTargetIdStrPtr = _lookup<
          ffi
          .NativeFunction<_RefDetailsTargetIdStrReturn Function(ffi.IntPtr)>>(
      "__RefDetails_target_id_str");

  late final _refDetailsTargetIdStr = _refDetailsTargetIdStrPtr
      .asFunction<_RefDetailsTargetIdStrReturn Function(int)>();
  late final _refDetailsRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_RefDetailsRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__RefDetails_room_id_str");

  late final _refDetailsRoomIdStr = _refDetailsRoomIdStrPtr
      .asFunction<_RefDetailsRoomIdStrReturn Function(int)>();
  late final _refDetailsTypeStrPtr = _lookup<
          ffi.NativeFunction<_RefDetailsTypeStrReturn Function(ffi.IntPtr)>>(
      "__RefDetails_type_str");

  late final _refDetailsTypeStr = _refDetailsTypeStrPtr
      .asFunction<_RefDetailsTypeStrReturn Function(int)>();
  late final _refDetailsEmbedActionStrPtr = _lookup<
      ffi.NativeFunction<
          _RefDetailsEmbedActionStrReturn Function(
              ffi.IntPtr)>>("__RefDetails_embed_action_str");

  late final _refDetailsEmbedActionStr = _refDetailsEmbedActionStrPtr
      .asFunction<_RefDetailsEmbedActionStrReturn Function(int)>();
  late final _refDetailsTaskListIdStrPtr = _lookup<
          ffi
          .NativeFunction<_RefDetailsTaskListIdStrReturn Function(ffi.IntPtr)>>(
      "__RefDetails_task_list_id_str");

  late final _refDetailsTaskListIdStr = _refDetailsTaskListIdStrPtr
      .asFunction<_RefDetailsTaskListIdStrReturn Function(int)>();
  late final _refDetailsTitlePtr =
      _lookup<ffi.NativeFunction<_RefDetailsTitleReturn Function(ffi.IntPtr)>>(
    "__RefDetails_title",
  );

  late final _refDetailsTitle =
      _refDetailsTitlePtr.asFunction<_RefDetailsTitleReturn Function(int)>();
  late final _refDetailsRoomDisplayNamePtr = _lookup<
      ffi.NativeFunction<
          _RefDetailsRoomDisplayNameReturn Function(
              ffi.IntPtr)>>("__RefDetails_room_display_name");

  late final _refDetailsRoomDisplayName = _refDetailsRoomDisplayNamePtr
      .asFunction<_RefDetailsRoomDisplayNameReturn Function(int)>();
  late final _refDetailsParticipantsPtr = _lookup<
          ffi
          .NativeFunction<_RefDetailsParticipantsReturn Function(ffi.IntPtr)>>(
      "__RefDetails_participants");

  late final _refDetailsParticipants = _refDetailsParticipantsPtr
      .asFunction<_RefDetailsParticipantsReturn Function(int)>();
  late final _refDetailsUtcStartPtr = _lookup<
          ffi.NativeFunction<_RefDetailsUtcStartReturn Function(ffi.IntPtr)>>(
      "__RefDetails_utc_start");

  late final _refDetailsUtcStart = _refDetailsUtcStartPtr
      .asFunction<_RefDetailsUtcStartReturn Function(int)>();
  late final _refDetailsUriPtr =
      _lookup<ffi.NativeFunction<_RefDetailsUriReturn Function(ffi.IntPtr)>>(
    "__RefDetails_uri",
  );

  late final _refDetailsUri =
      _refDetailsUriPtr.asFunction<_RefDetailsUriReturn Function(int)>();
  late final _refDetailsViaServersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RefDetails_via_servers",
  );

  late final _refDetailsViaServers =
      _refDetailsViaServersPtr.asFunction<int Function(int)>();
  late final _refDetailsGenerateInternalLinkPtr = _lookup<
      ffi.NativeFunction<
          _RefDetailsGenerateInternalLinkReturn Function(
              ffi.IntPtr, ffi.Uint8)>>("__RefDetails_generate_internal_link");

  late final _refDetailsGenerateInternalLink =
      _refDetailsGenerateInternalLinkPtr.asFunction<
          _RefDetailsGenerateInternalLinkReturn Function(int, int)>();
  late final _refDetailsGenerateExternalLinkPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RefDetails_generate_external_link",
  );

  late final _refDetailsGenerateExternalLink =
      _refDetailsGenerateExternalLinkPtr.asFunction<int Function(int)>();
  late final _urlPreviewUrlPtr =
      _lookup<ffi.NativeFunction<_UrlPreviewUrlReturn Function(ffi.IntPtr)>>(
    "__UrlPreview_url",
  );

  late final _urlPreviewUrl =
      _urlPreviewUrlPtr.asFunction<_UrlPreviewUrlReturn Function(int)>();
  late final _urlPreviewTitlePtr =
      _lookup<ffi.NativeFunction<_UrlPreviewTitleReturn Function(ffi.IntPtr)>>(
    "__UrlPreview_title",
  );

  late final _urlPreviewTitle =
      _urlPreviewTitlePtr.asFunction<_UrlPreviewTitleReturn Function(int)>();
  late final _urlPreviewDescriptionPtr = _lookup<
          ffi
          .NativeFunction<_UrlPreviewDescriptionReturn Function(ffi.IntPtr)>>(
      "__UrlPreview_description");

  late final _urlPreviewDescription = _urlPreviewDescriptionPtr
      .asFunction<_UrlPreviewDescriptionReturn Function(int)>();
  late final _urlPreviewHasImagePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__UrlPreview_has_image",
  );

  late final _urlPreviewHasImage =
      _urlPreviewHasImagePtr.asFunction<int Function(int)>();
  late final _urlPreviewImageSourcePtr = _lookup<
          ffi
          .NativeFunction<_UrlPreviewImageSourceReturn Function(ffi.IntPtr)>>(
      "__UrlPreview_image_source");

  late final _urlPreviewImageSource = _urlPreviewImageSourcePtr
      .asFunction<_UrlPreviewImageSourceReturn Function(int)>();
  late final _localUrlPreviewUrlPtr = _lookup<
          ffi.NativeFunction<_LocalUrlPreviewUrlReturn Function(ffi.IntPtr)>>(
      "__LocalUrlPreview_url");

  late final _localUrlPreviewUrl = _localUrlPreviewUrlPtr
      .asFunction<_LocalUrlPreviewUrlReturn Function(int)>();
  late final _localUrlPreviewTitlePtr = _lookup<
          ffi.NativeFunction<_LocalUrlPreviewTitleReturn Function(ffi.IntPtr)>>(
      "__LocalUrlPreview_title");

  late final _localUrlPreviewTitle = _localUrlPreviewTitlePtr
      .asFunction<_LocalUrlPreviewTitleReturn Function(int)>();
  late final _localUrlPreviewDescriptionPtr = _lookup<
      ffi.NativeFunction<
          _LocalUrlPreviewDescriptionReturn Function(
              ffi.IntPtr)>>("__LocalUrlPreview_description");

  late final _localUrlPreviewDescription = _localUrlPreviewDescriptionPtr
      .asFunction<_LocalUrlPreviewDescriptionReturn Function(int)>();
  late final _localUrlPreviewHasImagePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__LocalUrlPreview_has_image",
  );

  late final _localUrlPreviewHasImage =
      _localUrlPreviewHasImagePtr.asFunction<int Function(int)>();
  late final _localUrlPreviewImageUrlPtr = _lookup<
          ffi
          .NativeFunction<_LocalUrlPreviewImageUrlReturn Function(ffi.IntPtr)>>(
      "__LocalUrlPreview_image_url");

  late final _localUrlPreviewImageUrl = _localUrlPreviewImageUrlPtr
      .asFunction<_LocalUrlPreviewImageUrlReturn Function(int)>();
  late final _objRefPositionStrPtr = _lookup<
          ffi.NativeFunction<_ObjRefPositionStrReturn Function(ffi.IntPtr)>>(
      "__ObjRef_position_str");

  late final _objRefPositionStr = _objRefPositionStrPtr
      .asFunction<_ObjRefPositionStrReturn Function(int)>();
  late final _objRefRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ObjRef_ref_details",
  );

  late final _objRefRefDetails =
      _objRefRefDetailsPtr.asFunction<int Function(int)>();
  late final _objRefBuilderPositionPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__ObjRefBuilder_position");

  late final _objRefBuilderPosition =
      _objRefBuilderPositionPtr.asFunction<void Function(int, int, int, int)>();
  late final _objRefBuilderUnsetPositionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__ObjRefBuilder_unset_position",
  );

  late final _objRefBuilderUnsetPosition =
      _objRefBuilderUnsetPositionPtr.asFunction<void Function(int)>();
  late final _objRefBuilderBuildPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ObjRefBuilder_build",
  );

  late final _objRefBuilderBuild =
      _objRefBuilderBuildPtr.asFunction<int Function(int)>();
  late final _colorizeColorPtr =
      _lookup<ffi.NativeFunction<_ColorizeColorReturn Function(ffi.IntPtr)>>(
    "__Colorize_color",
  );

  late final _colorizeColor =
      _colorizeColorPtr.asFunction<_ColorizeColorReturn Function(int)>();
  late final _colorizeBackgroundPtr = _lookup<
          ffi.NativeFunction<_ColorizeBackgroundReturn Function(ffi.IntPtr)>>(
      "__Colorize_background");

  late final _colorizeBackground = _colorizeBackgroundPtr
      .asFunction<_ColorizeBackgroundReturn Function(int)>();
  late final _colorizeLinkPtr =
      _lookup<ffi.NativeFunction<_ColorizeLinkReturn Function(ffi.IntPtr)>>(
    "__Colorize_link",
  );

  late final _colorizeLink =
      _colorizeLinkPtr.asFunction<_ColorizeLinkReturn Function(int)>();
  late final _colorizeBuilderColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__ColorizeBuilder_color",
  );

  late final _colorizeBuilderColor =
      _colorizeBuilderColorPtr.asFunction<void Function(int, int)>();
  late final _colorizeBuilderUnsetColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__ColorizeBuilder_unset_color",
  );

  late final _colorizeBuilderUnsetColor =
      _colorizeBuilderUnsetColorPtr.asFunction<void Function(int)>();
  late final _colorizeBuilderBackgroundPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__ColorizeBuilder_background",
  );

  late final _colorizeBuilderBackground =
      _colorizeBuilderBackgroundPtr.asFunction<void Function(int, int)>();
  late final _colorizeBuilderUnsetBackgroundPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__ColorizeBuilder_unset_background",
  );

  late final _colorizeBuilderUnsetBackground =
      _colorizeBuilderUnsetBackgroundPtr.asFunction<void Function(int)>();
  late final _colorizeBuilderLinkPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__ColorizeBuilder_link",
  );

  late final _colorizeBuilderLink =
      _colorizeBuilderLinkPtr.asFunction<void Function(int, int)>();
  late final _colorizeBuilderUnsetLinkPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__ColorizeBuilder_unset_link",
  );

  late final _colorizeBuilderUnsetLink =
      _colorizeBuilderUnsetLinkPtr.asFunction<void Function(int)>();
  late final _vecStringBuilderAddPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__VecStringBuilder_add");

  late final _vecStringBuilderAdd =
      _vecStringBuilderAddPtr.asFunction<void Function(int, int, int, int)>();
  late final _optionStringTextPtr =
      _lookup<ffi.NativeFunction<_OptionStringTextReturn Function(ffi.IntPtr)>>(
    "__OptionString_text",
  );

  late final _optionStringText =
      _optionStringTextPtr.asFunction<_OptionStringTextReturn Function(int)>();
  late final _optionBufferDataPtr =
      _lookup<ffi.NativeFunction<_OptionBufferDataReturn Function(ffi.IntPtr)>>(
    "__OptionBuffer_data",
  );

  late final _optionBufferData =
      _optionBufferDataPtr.asFunction<_OptionBufferDataReturn Function(int)>();
  late final _optionRsvpStatusStatusPtr = _lookup<
          ffi
          .NativeFunction<_OptionRsvpStatusStatusReturn Function(ffi.IntPtr)>>(
      "__OptionRsvpStatus_status");

  late final _optionRsvpStatusStatus = _optionRsvpStatusStatusPtr
      .asFunction<_OptionRsvpStatusStatusReturn Function(int)>();
  late final _optionRsvpStatusStatusStrPtr = _lookup<
      ffi.NativeFunction<
          _OptionRsvpStatusStatusStrReturn Function(
              ffi.IntPtr)>>("__OptionRsvpStatus_status_str");

  late final _optionRsvpStatusStatusStr = _optionRsvpStatusStatusStrPtr
      .asFunction<_OptionRsvpStatusStatusStrReturn Function(int)>();
  late final _optionComposeDraftDraftPtr = _lookup<
          ffi
          .NativeFunction<_OptionComposeDraftDraftReturn Function(ffi.IntPtr)>>(
      "__OptionComposeDraft_draft");

  late final _optionComposeDraftDraft = _optionComposeDraftDraftPtr
      .asFunction<_OptionComposeDraftDraftReturn Function(int)>();
  late final _userProfileUserIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__UserProfile_user_id",
  );

  late final _userProfileUserId =
      _userProfileUserIdPtr.asFunction<int Function(int)>();
  late final _userProfileHasAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__UserProfile_has_avatar",
  );

  late final _userProfileHasAvatar =
      _userProfileHasAvatarPtr.asFunction<int Function(int)>();
  late final _userProfileGetAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.IntPtr)>>("__UserProfile_get_avatar");

  late final _userProfileGetAvatar =
      _userProfileGetAvatarPtr.asFunction<int Function(int, int, int)>();
  late final _userProfileDisplayNamePtr = _lookup<
          ffi
          .NativeFunction<_UserProfileDisplayNameReturn Function(ffi.IntPtr)>>(
      "__UserProfile_display_name");

  late final _userProfileDisplayName = _userProfileDisplayNamePtr
      .asFunction<_UserProfileDisplayNameReturn Function(int)>();
  late final _userProfileSharedRoomsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__UserProfile_shared_rooms",
  );

  late final _userProfileSharedRooms =
      _userProfileSharedRoomsPtr.asFunction<int Function(int)>();
  late final _typingEventUserIdsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TypingEvent_user_ids",
  );

  late final _typingEventUserIds =
      _typingEventUserIdsPtr.asFunction<int Function(int)>();
  late final _textMessageContentBodyPtr = _lookup<
          ffi
          .NativeFunction<_TextMessageContentBodyReturn Function(ffi.IntPtr)>>(
      "__TextMessageContent_body");

  late final _textMessageContentBody = _textMessageContentBodyPtr
      .asFunction<_TextMessageContentBodyReturn Function(int)>();
  late final _textMessageContentFormattedPtr = _lookup<
      ffi.NativeFunction<
          _TextMessageContentFormattedReturn Function(
              ffi.IntPtr)>>("__TextMessageContent_formatted");

  late final _textMessageContentFormatted = _textMessageContentFormattedPtr
      .asFunction<_TextMessageContentFormattedReturn Function(int)>();
  late final _mediaSourceUrlPtr =
      _lookup<ffi.NativeFunction<_MediaSourceUrlReturn Function(ffi.IntPtr)>>(
    "__MediaSource_url",
  );

  late final _mediaSourceUrl =
      _mediaSourceUrlPtr.asFunction<_MediaSourceUrlReturn Function(int)>();
  late final _thumbnailInfoMimetypePtr = _lookup<
          ffi
          .NativeFunction<_ThumbnailInfoMimetypeReturn Function(ffi.IntPtr)>>(
      "__ThumbnailInfo_mimetype");

  late final _thumbnailInfoMimetype = _thumbnailInfoMimetypePtr
      .asFunction<_ThumbnailInfoMimetypeReturn Function(int)>();
  late final _thumbnailInfoSizePtr = _lookup<
          ffi.NativeFunction<_ThumbnailInfoSizeReturn Function(ffi.IntPtr)>>(
      "__ThumbnailInfo_size");

  late final _thumbnailInfoSize = _thumbnailInfoSizePtr
      .asFunction<_ThumbnailInfoSizeReturn Function(int)>();
  late final _thumbnailInfoWidthPtr = _lookup<
          ffi.NativeFunction<_ThumbnailInfoWidthReturn Function(ffi.IntPtr)>>(
      "__ThumbnailInfo_width");

  late final _thumbnailInfoWidth = _thumbnailInfoWidthPtr
      .asFunction<_ThumbnailInfoWidthReturn Function(int)>();
  late final _thumbnailInfoHeightPtr = _lookup<
          ffi.NativeFunction<_ThumbnailInfoHeightReturn Function(ffi.IntPtr)>>(
      "__ThumbnailInfo_height");

  late final _thumbnailInfoHeight = _thumbnailInfoHeightPtr
      .asFunction<_ThumbnailInfoHeightReturn Function(int)>();
  late final _deviceIdToStringPtr =
      _lookup<ffi.NativeFunction<_DeviceIdToStringReturn Function(ffi.IntPtr)>>(
    "__DeviceId_to_string",
  );

  late final _deviceIdToString =
      _deviceIdToStringPtr.asFunction<_DeviceIdToStringReturn Function(int)>();
  late final _eventIdToStringPtr =
      _lookup<ffi.NativeFunction<_EventIdToStringReturn Function(ffi.IntPtr)>>(
    "__EventId_to_string",
  );

  late final _eventIdToString =
      _eventIdToStringPtr.asFunction<_EventIdToStringReturn Function(int)>();
  late final _mxcUriToStringPtr =
      _lookup<ffi.NativeFunction<_MxcUriToStringReturn Function(ffi.IntPtr)>>(
    "__MxcUri_to_string",
  );

  late final _mxcUriToString =
      _mxcUriToStringPtr.asFunction<_MxcUriToStringReturn Function(int)>();
  late final _composeDraftPlainTextPtr = _lookup<
          ffi
          .NativeFunction<_ComposeDraftPlainTextReturn Function(ffi.IntPtr)>>(
      "__ComposeDraft_plain_text");

  late final _composeDraftPlainText = _composeDraftPlainTextPtr
      .asFunction<_ComposeDraftPlainTextReturn Function(int)>();
  late final _composeDraftHtmlTextPtr = _lookup<
          ffi.NativeFunction<_ComposeDraftHtmlTextReturn Function(ffi.IntPtr)>>(
      "__ComposeDraft_html_text");

  late final _composeDraftHtmlText = _composeDraftHtmlTextPtr
      .asFunction<_ComposeDraftHtmlTextReturn Function(int)>();
  late final _composeDraftEventIdPtr = _lookup<
          ffi.NativeFunction<_ComposeDraftEventIdReturn Function(ffi.IntPtr)>>(
      "__ComposeDraft_event_id");

  late final _composeDraftEventId = _composeDraftEventIdPtr
      .asFunction<_ComposeDraftEventIdReturn Function(int)>();
  late final _composeDraftDraftTypePtr = _lookup<
          ffi
          .NativeFunction<_ComposeDraftDraftTypeReturn Function(ffi.IntPtr)>>(
      "__ComposeDraft_draft_type");

  late final _composeDraftDraftType = _composeDraftDraftTypePtr
      .asFunction<_ComposeDraftDraftTypeReturn Function(int)>();
  late final _roomIdToStringPtr =
      _lookup<ffi.NativeFunction<_RoomIdToStringReturn Function(ffi.IntPtr)>>(
    "__RoomId_to_string",
  );

  late final _roomIdToString =
      _roomIdToStringPtr.asFunction<_RoomIdToStringReturn Function(int)>();
  late final _userIdToStringPtr =
      _lookup<ffi.NativeFunction<_UserIdToStringReturn Function(ffi.IntPtr)>>(
    "__UserId_to_string",
  );

  late final _userIdToString =
      _userIdToStringPtr.asFunction<_UserIdToStringReturn Function(int)>();
  late final _registrationTokenViaEmailResponseSidPtr = _lookup<
      ffi.NativeFunction<
          _RegistrationTokenViaEmailResponseSidReturn Function(
              ffi.IntPtr)>>("__RegistrationTokenViaEmailResponse_sid");

  late final _registrationTokenViaEmailResponseSid =
      _registrationTokenViaEmailResponseSidPtr.asFunction<
          _RegistrationTokenViaEmailResponseSidReturn Function(int)>();
  late final _registrationTokenViaEmailResponseSubmitUrlPtr = _lookup<
      ffi.NativeFunction<
          _RegistrationTokenViaEmailResponseSubmitUrlReturn Function(
              ffi.IntPtr)>>("__RegistrationTokenViaEmailResponse_submit_url");

  late final _registrationTokenViaEmailResponseSubmitUrl =
      _registrationTokenViaEmailResponseSubmitUrlPtr.asFunction<
          _RegistrationTokenViaEmailResponseSubmitUrlReturn Function(int)>();
  late final _passwordChangeEmailTokenResponseClientSecretPtr = _lookup<
      ffi.NativeFunction<
          _PasswordChangeEmailTokenResponseClientSecretReturn Function(
            ffi.IntPtr,
          )>>("__PasswordChangeEmailTokenResponse_client_secret");

  late final _passwordChangeEmailTokenResponseClientSecret =
      _passwordChangeEmailTokenResponseClientSecretPtr.asFunction<
          _PasswordChangeEmailTokenResponseClientSecretReturn Function(int)>();
  late final _passwordChangeEmailTokenResponseSidPtr = _lookup<
      ffi.NativeFunction<
          _PasswordChangeEmailTokenResponseSidReturn Function(
              ffi.IntPtr)>>("__PasswordChangeEmailTokenResponse_sid");

  late final _passwordChangeEmailTokenResponseSid =
      _passwordChangeEmailTokenResponseSidPtr.asFunction<
          _PasswordChangeEmailTokenResponseSidReturn Function(int)>();
  late final _passwordChangeEmailTokenResponseSubmitUrlPtr = _lookup<
      ffi.NativeFunction<
          _PasswordChangeEmailTokenResponseSubmitUrlReturn Function(
              ffi.IntPtr)>>("__PasswordChangeEmailTokenResponse_submit_url");

  late final _passwordChangeEmailTokenResponseSubmitUrl =
      _passwordChangeEmailTokenResponseSubmitUrlPtr.asFunction<
          _PasswordChangeEmailTokenResponseSubmitUrlReturn Function(int)>();
  late final _newsSlideTypeStrPtr =
      _lookup<ffi.NativeFunction<_NewsSlideTypeStrReturn Function(ffi.IntPtr)>>(
    "__NewsSlide_type_str",
  );

  late final _newsSlideTypeStr =
      _newsSlideTypeStrPtr.asFunction<_NewsSlideTypeStrReturn Function(int)>();
  late final _newsSlideUniqueIdPtr = _lookup<
          ffi.NativeFunction<_NewsSlideUniqueIdReturn Function(ffi.IntPtr)>>(
      "__NewsSlide_unique_id");

  late final _newsSlideUniqueId = _newsSlideUniqueIdPtr
      .asFunction<_NewsSlideUniqueIdReturn Function(int)>();
  late final _newsSlideReferencesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsSlide_references",
  );

  late final _newsSlideReferences =
      _newsSlideReferencesPtr.asFunction<int Function(int)>();
  late final _newsSlideColorsPtr =
      _lookup<ffi.NativeFunction<_NewsSlideColorsReturn Function(ffi.IntPtr)>>(
    "__NewsSlide_colors",
  );

  late final _newsSlideColors =
      _newsSlideColorsPtr.asFunction<_NewsSlideColorsReturn Function(int)>();
  late final _newsSlideMsgContentPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsSlide_msg_content",
  );

  late final _newsSlideMsgContent =
      _newsSlideMsgContentPtr.asFunction<int Function(int)>();
  late final _newsSlideSourceBinaryPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.IntPtr)>>("__NewsSlide_source_binary");

  late final _newsSlideSourceBinary =
      _newsSlideSourceBinaryPtr.asFunction<int Function(int, int, int)>();
  late final _newsSlideDraftAddReferencePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__NewsSlideDraft_add_reference",
  );

  late final _newsSlideDraftAddReference =
      _newsSlideDraftAddReferencePtr.asFunction<void Function(int, int)>();
  late final _newsSlideDraftColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__NewsSlideDraft_color",
  );

  late final _newsSlideDraftColor =
      _newsSlideDraftColorPtr.asFunction<void Function(int, int)>();
  late final _newsSlideDraftUnsetReferencesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__NewsSlideDraft_unset_references",
  );

  late final _newsSlideDraftUnsetReferences =
      _newsSlideDraftUnsetReferencesPtr.asFunction<void Function(int)>();
  late final _newsEntrySlidesCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NewsEntry_slides_count",
  );

  late final _newsEntrySlidesCount =
      _newsEntrySlidesCountPtr.asFunction<int Function(int)>();
  late final _newsEntryGetSlidePtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryGetSlideReturn Function(
              ffi.IntPtr, ffi.Uint8)>>("__NewsEntry_get_slide");

  late final _newsEntryGetSlide = _newsEntryGetSlidePtr
      .asFunction<_NewsEntryGetSlideReturn Function(int, int)>();
  late final _newsEntrySlidesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_slides",
  );

  late final _newsEntrySlides =
      _newsEntrySlidesPtr.asFunction<int Function(int)>();
  late final _newsEntryRoomIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_room_id",
  );

  late final _newsEntryRoomId =
      _newsEntryRoomIdPtr.asFunction<int Function(int)>();
  late final _newsEntrySenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_sender",
  );

  late final _newsEntrySender =
      _newsEntrySenderPtr.asFunction<int Function(int)>();
  late final _newsEntryEventIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_event_id",
  );

  late final _newsEntryEventId =
      _newsEntryEventIdPtr.asFunction<int Function(int)>();
  late final _newsEntryOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__NewsEntry_origin_server_ts",
  );

  late final _newsEntryOriginServerTs =
      _newsEntryOriginServerTsPtr.asFunction<int Function(int)>();
  late final _newsEntryUpdateBuilderPtr = _lookup<
          ffi
          .NativeFunction<_NewsEntryUpdateBuilderReturn Function(ffi.IntPtr)>>(
      "__NewsEntry_update_builder");

  late final _newsEntryUpdateBuilder = _newsEntryUpdateBuilderPtr
      .asFunction<_NewsEntryUpdateBuilderReturn Function(int)>();
  late final _newsEntryCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_can_redact",
  );

  late final _newsEntryCanRedact =
      _newsEntryCanRedactPtr.asFunction<int Function(int)>();
  late final _newsEntryReactionsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_reactions",
  );

  late final _newsEntryReactions =
      _newsEntryReactionsPtr.asFunction<int Function(int)>();
  late final _newsEntryReadReceiptsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_read_receipts",
  );

  late final _newsEntryReadReceipts =
      _newsEntryReadReceiptsPtr.asFunction<int Function(int)>();
  late final _newsEntryCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_comments",
  );

  late final _newsEntryComments =
      _newsEntryCommentsPtr.asFunction<int Function(int)>();
  late final _newsEntryRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntry_ref_details",
  );

  late final _newsEntryRefDetails =
      _newsEntryRefDetailsPtr.asFunction<int Function(int)>();
  late final _newsEntryDraftAddSlidePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__NewsEntryDraft_add_slide",
  );

  late final _newsEntryDraftAddSlide =
      _newsEntryDraftAddSlidePtr.asFunction<void Function(int, int)>();
  late final _newsEntryDraftSwapSlidesPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryDraftSwapSlidesReturn Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__NewsEntryDraft_swap_slides");

  late final _newsEntryDraftSwapSlides = _newsEntryDraftSwapSlidesPtr
      .asFunction<_NewsEntryDraftSwapSlidesReturn Function(int, int, int)>();
  late final _newsEntryDraftSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntryDraft_slides",
  );

  late final _newsEntryDraftSlides =
      _newsEntryDraftSlidesPtr.asFunction<int Function(int)>();
  late final _newsEntryDraftUnsetSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__NewsEntryDraft_unset_slides",
  );

  late final _newsEntryDraftUnsetSlides =
      _newsEntryDraftUnsetSlidesPtr.asFunction<void Function(int)>();
  late final _newsEntryDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntryDraft_send",
  );

  late final _newsEntryDraftSend =
      _newsEntryDraftSendPtr.asFunction<int Function(int)>();
  late final _newsEntryUpdateBuilderAddSlidePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__NewsEntryUpdateBuilder_add_slide",
  );

  late final _newsEntryUpdateBuilderAddSlide =
      _newsEntryUpdateBuilderAddSlidePtr.asFunction<void Function(int, int)>();
  late final _newsEntryUpdateBuilderUnsetSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__NewsEntryUpdateBuilder_unset_slides",
  );

  late final _newsEntryUpdateBuilderUnsetSlides =
      _newsEntryUpdateBuilderUnsetSlidesPtr.asFunction<void Function(int)>();
  late final _newsEntryUpdateBuilderUnsetSlidesUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__NewsEntryUpdateBuilder_unset_slides_update",
  );

  late final _newsEntryUpdateBuilderUnsetSlidesUpdate =
      _newsEntryUpdateBuilderUnsetSlidesUpdatePtr
          .asFunction<void Function(int)>();
  late final _newsEntryUpdateBuilderSwapSlidesPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryUpdateBuilderSwapSlidesReturn Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__NewsEntryUpdateBuilder_swap_slides");

  late final _newsEntryUpdateBuilderSwapSlides =
      _newsEntryUpdateBuilderSwapSlidesPtr.asFunction<
          _NewsEntryUpdateBuilderSwapSlidesReturn Function(int, int, int)>();
  late final _newsEntryUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsEntryUpdateBuilder_send",
  );

  late final _newsEntryUpdateBuilderSend =
      _newsEntryUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _storySlideTypeStrPtr = _lookup<
          ffi.NativeFunction<_StorySlideTypeStrReturn Function(ffi.IntPtr)>>(
      "__StorySlide_type_str");

  late final _storySlideTypeStr = _storySlideTypeStrPtr
      .asFunction<_StorySlideTypeStrReturn Function(int)>();
  late final _storySlideUniqueIdPtr = _lookup<
          ffi.NativeFunction<_StorySlideUniqueIdReturn Function(ffi.IntPtr)>>(
      "__StorySlide_unique_id");

  late final _storySlideUniqueId = _storySlideUniqueIdPtr
      .asFunction<_StorySlideUniqueIdReturn Function(int)>();
  late final _storySlideReferencesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StorySlide_references",
  );

  late final _storySlideReferences =
      _storySlideReferencesPtr.asFunction<int Function(int)>();
  late final _storySlideColorsPtr =
      _lookup<ffi.NativeFunction<_StorySlideColorsReturn Function(ffi.IntPtr)>>(
    "__StorySlide_colors",
  );

  late final _storySlideColors =
      _storySlideColorsPtr.asFunction<_StorySlideColorsReturn Function(int)>();
  late final _storySlideMsgContentPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StorySlide_msg_content",
  );

  late final _storySlideMsgContent =
      _storySlideMsgContentPtr.asFunction<int Function(int)>();
  late final _storySlideSourceBinaryPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__StorySlide_source_binary");

  late final _storySlideSourceBinary =
      _storySlideSourceBinaryPtr.asFunction<int Function(int, int, int)>();
  late final _storySlideDraftAddReferencePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__StorySlideDraft_add_reference",
  );

  late final _storySlideDraftAddReference =
      _storySlideDraftAddReferencePtr.asFunction<void Function(int, int)>();
  late final _storySlideDraftColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__StorySlideDraft_color",
  );

  late final _storySlideDraftColor =
      _storySlideDraftColorPtr.asFunction<void Function(int, int)>();
  late final _storySlideDraftUnsetReferencesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__StorySlideDraft_unset_references",
  );

  late final _storySlideDraftUnsetReferences =
      _storySlideDraftUnsetReferencesPtr.asFunction<void Function(int)>();
  late final _storySlidesCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Story_slides_count",
  );

  late final _storySlidesCount =
      _storySlidesCountPtr.asFunction<int Function(int)>();
  late final _storyGetSlidePtr = _lookup<
      ffi.NativeFunction<
          _StoryGetSlideReturn Function(
              ffi.IntPtr, ffi.Uint8)>>("__Story_get_slide");

  late final _storyGetSlide =
      _storyGetSlidePtr.asFunction<_StoryGetSlideReturn Function(int, int)>();
  late final _storySlidesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_slides",
  );

  late final _storySlides = _storySlidesPtr.asFunction<int Function(int)>();
  late final _storyRoomIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_room_id",
  );

  late final _storyRoomId = _storyRoomIdPtr.asFunction<int Function(int)>();
  late final _storySenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_sender",
  );

  late final _storySender = _storySenderPtr.asFunction<int Function(int)>();
  late final _storyEventIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_event_id",
  );

  late final _storyEventId = _storyEventIdPtr.asFunction<int Function(int)>();
  late final _storyOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Story_origin_server_ts",
  );

  late final _storyOriginServerTs =
      _storyOriginServerTsPtr.asFunction<int Function(int)>();
  late final _storyUpdateBuilderPtr = _lookup<
          ffi.NativeFunction<_StoryUpdateBuilderReturn Function(ffi.IntPtr)>>(
      "__Story_update_builder");

  late final _storyUpdateBuilder = _storyUpdateBuilderPtr
      .asFunction<_StoryUpdateBuilderReturn Function(int)>();
  late final _storyCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_can_redact",
  );

  late final _storyCanRedact =
      _storyCanRedactPtr.asFunction<int Function(int)>();
  late final _storyReactionsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_reactions",
  );

  late final _storyReactions =
      _storyReactionsPtr.asFunction<int Function(int)>();
  late final _storyReadReceiptsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_read_receipts",
  );

  late final _storyReadReceipts =
      _storyReadReceiptsPtr.asFunction<int Function(int)>();
  late final _storyCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Story_comments",
  );

  late final _storyComments = _storyCommentsPtr.asFunction<int Function(int)>();
  late final _storyDraftAddSlidePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__StoryDraft_add_slide",
  );

  late final _storyDraftAddSlide =
      _storyDraftAddSlidePtr.asFunction<void Function(int, int)>();
  late final _storyDraftSwapSlidesPtr = _lookup<
      ffi.NativeFunction<
          _StoryDraftSwapSlidesReturn Function(
              ffi.IntPtr, ffi.Uint8, ffi.Uint8)>>("__StoryDraft_swap_slides");

  late final _storyDraftSwapSlides = _storyDraftSwapSlidesPtr
      .asFunction<_StoryDraftSwapSlidesReturn Function(int, int, int)>();
  late final _storyDraftSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StoryDraft_slides",
  );

  late final _storyDraftSlides =
      _storyDraftSlidesPtr.asFunction<int Function(int)>();
  late final _storyDraftUnsetSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__StoryDraft_unset_slides",
  );

  late final _storyDraftUnsetSlides =
      _storyDraftUnsetSlidesPtr.asFunction<void Function(int)>();
  late final _storyDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StoryDraft_send",
  );

  late final _storyDraftSend =
      _storyDraftSendPtr.asFunction<int Function(int)>();
  late final _storyUpdateBuilderAddSlidePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__StoryUpdateBuilder_add_slide",
  );

  late final _storyUpdateBuilderAddSlide =
      _storyUpdateBuilderAddSlidePtr.asFunction<void Function(int, int)>();
  late final _storyUpdateBuilderUnsetSlidesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__StoryUpdateBuilder_unset_slides",
  );

  late final _storyUpdateBuilderUnsetSlides =
      _storyUpdateBuilderUnsetSlidesPtr.asFunction<void Function(int)>();
  late final _storyUpdateBuilderUnsetSlidesUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__StoryUpdateBuilder_unset_slides_update",
  );

  late final _storyUpdateBuilderUnsetSlidesUpdate =
      _storyUpdateBuilderUnsetSlidesUpdatePtr.asFunction<void Function(int)>();
  late final _storyUpdateBuilderSwapSlidesPtr = _lookup<
      ffi.NativeFunction<
          _StoryUpdateBuilderSwapSlidesReturn Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__StoryUpdateBuilder_swap_slides");

  late final _storyUpdateBuilderSwapSlides =
      _storyUpdateBuilderSwapSlidesPtr.asFunction<
          _StoryUpdateBuilderSwapSlidesReturn Function(int, int, int)>();
  late final _storyUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StoryUpdateBuilder_send",
  );

  late final _storyUpdateBuilderSend =
      _storyUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _pinDraftTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinDraft_title");

  late final _pinDraftTitle =
      _pinDraftTitlePtr.asFunction<void Function(int, int, int, int)>();
  late final _pinDraftContentTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinDraft_content_text");

  late final _pinDraftContentText =
      _pinDraftContentTextPtr.asFunction<void Function(int, int, int, int)>();
  late final _pinDraftContentMarkdownPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinDraft_content_markdown");

  late final _pinDraftContentMarkdown = _pinDraftContentMarkdownPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _pinDraftContentHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__PinDraft_content_html");

  late final _pinDraftContentHtml = _pinDraftContentHtmlPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _pinDraftUnsetContentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinDraft_unset_content",
  );

  late final _pinDraftUnsetContent =
      _pinDraftUnsetContentPtr.asFunction<void Function(int)>();
  late final _pinDraftUrlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinDraft_url");

  late final _pinDraftUrl =
      _pinDraftUrlPtr.asFunction<void Function(int, int, int, int)>();
  late final _pinDraftUnsetUrlPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinDraft_unset_url",
  );

  late final _pinDraftUnsetUrl =
      _pinDraftUnsetUrlPtr.asFunction<void Function(int)>();
  late final _pinDraftDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__PinDraft_display",
  );

  late final _pinDraftDisplay =
      _pinDraftDisplayPtr.asFunction<void Function(int, int)>();
  late final _pinDraftUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinDraft_unset_display",
  );

  late final _pinDraftUnsetDisplay =
      _pinDraftUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _pinDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__PinDraft_send",
  );

  late final _pinDraftSend = _pinDraftSendPtr.asFunction<int Function(int)>();
  late final _acterPinTitlePtr =
      _lookup<ffi.NativeFunction<_ActerPinTitleReturn Function(ffi.IntPtr)>>(
    "__ActerPin_title",
  );

  late final _acterPinTitle =
      _acterPinTitlePtr.asFunction<_ActerPinTitleReturn Function(int)>();
  late final _acterPinContentPtr =
      _lookup<ffi.NativeFunction<_ActerPinContentReturn Function(ffi.IntPtr)>>(
    "__ActerPin_content",
  );

  late final _acterPinContent =
      _acterPinContentPtr.asFunction<_ActerPinContentReturn Function(int)>();
  late final _acterPinContentFormattedPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinContentFormattedReturn Function(
              ffi.IntPtr)>>("__ActerPin_content_formatted");

  late final _acterPinContentFormatted = _acterPinContentFormattedPtr
      .asFunction<_ActerPinContentFormattedReturn Function(int)>();
  late final _acterPinHasFormattedTextPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ActerPin_has_formatted_text",
  );

  late final _acterPinHasFormattedText =
      _acterPinHasFormattedTextPtr.asFunction<int Function(int)>();
  late final _acterPinIsLinkPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ActerPin_is_link",
  );

  late final _acterPinIsLink =
      _acterPinIsLinkPtr.asFunction<int Function(int)>();
  late final _acterPinUrlPtr =
      _lookup<ffi.NativeFunction<_ActerPinUrlReturn Function(ffi.IntPtr)>>(
    "__ActerPin_url",
  );

  late final _acterPinUrl =
      _acterPinUrlPtr.asFunction<_ActerPinUrlReturn Function(int)>();
  late final _acterPinDisplayPtr =
      _lookup<ffi.NativeFunction<_ActerPinDisplayReturn Function(ffi.IntPtr)>>(
    "__ActerPin_display",
  );

  late final _acterPinDisplay =
      _acterPinDisplayPtr.asFunction<_ActerPinDisplayReturn Function(int)>();
  late final _acterPinEventIdStrPtr = _lookup<
          ffi.NativeFunction<_ActerPinEventIdStrReturn Function(ffi.IntPtr)>>(
      "__ActerPin_event_id_str");

  late final _acterPinEventIdStr = _acterPinEventIdStrPtr
      .asFunction<_ActerPinEventIdStrReturn Function(int)>();
  late final _acterPinRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_ActerPinRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__ActerPin_room_id_str");

  late final _acterPinRoomIdStr = _acterPinRoomIdStrPtr
      .asFunction<_ActerPinRoomIdStrReturn Function(int)>();
  late final _acterPinRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_ref_details",
  );

  late final _acterPinRefDetails =
      _acterPinRefDetailsPtr.asFunction<int Function(int)>();
  late final _acterPinSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_sender",
  );

  late final _acterPinSender =
      _acterPinSenderPtr.asFunction<int Function(int)>();
  late final _acterPinUpdateBuilderPtr = _lookup<
          ffi
          .NativeFunction<_ActerPinUpdateBuilderReturn Function(ffi.IntPtr)>>(
      "__ActerPin_update_builder");

  late final _acterPinUpdateBuilder = _acterPinUpdateBuilderPtr
      .asFunction<_ActerPinUpdateBuilderReturn Function(int)>();
  late final _acterPinSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_subscribe_stream",
  );

  late final _acterPinSubscribeStream =
      _acterPinSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _acterPinRefreshPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_refresh",
  );

  late final _acterPinRefresh =
      _acterPinRefreshPtr.asFunction<int Function(int)>();
  late final _acterPinCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_can_redact",
  );

  late final _acterPinCanRedact =
      _acterPinCanRedactPtr.asFunction<int Function(int)>();
  late final _acterPinCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_comments",
  );

  late final _acterPinComments =
      _acterPinCommentsPtr.asFunction<int Function(int)>();
  late final _acterPinAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerPin_attachments",
  );

  late final _acterPinAttachments =
      _acterPinAttachmentsPtr.asFunction<int Function(int)>();
  late final _pinUpdateBuilderTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinUpdateBuilder_title");

  late final _pinUpdateBuilderTitle =
      _pinUpdateBuilderTitlePtr.asFunction<void Function(int, int, int, int)>();
  late final _pinUpdateBuilderUnsetTitleUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_title_update",
  );

  late final _pinUpdateBuilderUnsetTitleUpdate =
      _pinUpdateBuilderUnsetTitleUpdatePtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderContentTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinUpdateBuilder_content_text");

  late final _pinUpdateBuilderContentText = _pinUpdateBuilderContentTextPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _pinUpdateBuilderContentMarkdownPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinUpdateBuilder_content_markdown");

  late final _pinUpdateBuilderContentMarkdown =
      _pinUpdateBuilderContentMarkdownPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _pinUpdateBuilderContentHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__PinUpdateBuilder_content_html");

  late final _pinUpdateBuilderContentHtml = _pinUpdateBuilderContentHtmlPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _pinUpdateBuilderUnsetContentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_content",
  );

  late final _pinUpdateBuilderUnsetContent =
      _pinUpdateBuilderUnsetContentPtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderUnsetContentUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_content_update",
  );

  late final _pinUpdateBuilderUnsetContentUpdate =
      _pinUpdateBuilderUnsetContentUpdatePtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderUrlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__PinUpdateBuilder_url");

  late final _pinUpdateBuilderUrl =
      _pinUpdateBuilderUrlPtr.asFunction<void Function(int, int, int, int)>();
  late final _pinUpdateBuilderUnsetUrlPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_url",
  );

  late final _pinUpdateBuilderUnsetUrl =
      _pinUpdateBuilderUnsetUrlPtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderUnsetUrlUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_url_update",
  );

  late final _pinUpdateBuilderUnsetUrlUpdate =
      _pinUpdateBuilderUnsetUrlUpdatePtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__PinUpdateBuilder_display",
  );

  late final _pinUpdateBuilderDisplay =
      _pinUpdateBuilderDisplayPtr.asFunction<void Function(int, int)>();
  late final _pinUpdateBuilderUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_display",
  );

  late final _pinUpdateBuilderUnsetDisplay =
      _pinUpdateBuilderUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderUnsetDisplayUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_unset_display_update",
  );

  late final _pinUpdateBuilderUnsetDisplayUpdate =
      _pinUpdateBuilderUnsetDisplayUpdatePtr.asFunction<void Function(int)>();
  late final _pinUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__PinUpdateBuilder_send",
  );

  late final _pinUpdateBuilderSend =
      _pinUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _calendarEventTitlePtr = _lookup<
          ffi.NativeFunction<_CalendarEventTitleReturn Function(ffi.IntPtr)>>(
      "__CalendarEvent_title");

  late final _calendarEventTitle = _calendarEventTitlePtr
      .asFunction<_CalendarEventTitleReturn Function(int)>();
  late final _calendarEventDescriptionPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDescriptionReturn Function(
              ffi.IntPtr)>>("__CalendarEvent_description");

  late final _calendarEventDescription = _calendarEventDescriptionPtr
      .asFunction<_CalendarEventDescriptionReturn Function(int)>();
  late final _calendarEventUtcStartPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_utc_start",
  );

  late final _calendarEventUtcStart =
      _calendarEventUtcStartPtr.asFunction<int Function(int)>();
  late final _calendarEventUtcEndPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_utc_end",
  );

  late final _calendarEventUtcEnd =
      _calendarEventUtcEndPtr.asFunction<int Function(int)>();
  late final _calendarEventShowWithoutTimePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__CalendarEvent_show_without_time",
  );

  late final _calendarEventShowWithoutTime =
      _calendarEventShowWithoutTimePtr.asFunction<int Function(int)>();
  late final _calendarEventEventIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_event_id",
  );

  late final _calendarEventEventId =
      _calendarEventEventIdPtr.asFunction<int Function(int)>();
  late final _calendarEventRoomIdStrPtr = _lookup<
          ffi
          .NativeFunction<_CalendarEventRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__CalendarEvent_room_id_str");

  late final _calendarEventRoomIdStr = _calendarEventRoomIdStrPtr
      .asFunction<_CalendarEventRoomIdStrReturn Function(int)>();
  late final _calendarEventSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_sender",
  );

  late final _calendarEventSender =
      _calendarEventSenderPtr.asFunction<int Function(int)>();
  late final _calendarEventUpdateBuilderPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderReturn Function(
              ffi.IntPtr)>>("__CalendarEvent_update_builder");

  late final _calendarEventUpdateBuilder = _calendarEventUpdateBuilderPtr
      .asFunction<_CalendarEventUpdateBuilderReturn Function(int)>();
  late final _calendarEventRsvpsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_rsvps",
  );

  late final _calendarEventRsvps =
      _calendarEventRsvpsPtr.asFunction<int Function(int)>();
  late final _calendarEventReactionsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_reactions",
  );

  late final _calendarEventReactions =
      _calendarEventReactionsPtr.asFunction<int Function(int)>();
  late final _calendarEventRespondedByMePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_responded_by_me",
  );

  late final _calendarEventRespondedByMe =
      _calendarEventRespondedByMePtr.asFunction<int Function(int)>();
  late final _calendarEventParticipantsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_participants",
  );

  late final _calendarEventParticipants =
      _calendarEventParticipantsPtr.asFunction<int Function(int)>();
  late final _calendarEventCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_can_redact",
  );

  late final _calendarEventCanRedact =
      _calendarEventCanRedactPtr.asFunction<int Function(int)>();
  late final _calendarEventCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_comments",
  );

  late final _calendarEventComments =
      _calendarEventCommentsPtr.asFunction<int Function(int)>();
  late final _calendarEventAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_attachments",
  );

  late final _calendarEventAttachments =
      _calendarEventAttachmentsPtr.asFunction<int Function(int)>();
  late final _calendarEventIcalForSharingPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventIcalForSharingReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEvent_ical_for_sharing");

  late final _calendarEventIcalForSharing =
      _calendarEventIcalForSharingPtr.asFunction<
          _CalendarEventIcalForSharingReturn Function(int, int, int, int)>();
  late final _calendarEventPhysicalLocationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_physical_locations",
  );

  late final _calendarEventPhysicalLocations =
      _calendarEventPhysicalLocationsPtr.asFunction<int Function(int)>();
  late final _calendarEventVirtualLocationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_virtual_locations",
  );

  late final _calendarEventVirtualLocations =
      _calendarEventVirtualLocationsPtr.asFunction<int Function(int)>();
  late final _calendarEventLocationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_locations",
  );

  late final _calendarEventLocations =
      _calendarEventLocationsPtr.asFunction<int Function(int)>();
  late final _calendarEventRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEvent_ref_details",
  );

  late final _calendarEventRefDetails =
      _calendarEventRefDetailsPtr.asFunction<int Function(int)>();
  late final _calendarEventUpdateBuilderTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CalendarEventUpdateBuilder_title");

  late final _calendarEventUpdateBuilderTitle =
      _calendarEventUpdateBuilderTitlePtr
          .asFunction<void Function(int, int, int, int)>();
  late final _calendarEventUpdateBuilderDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CalendarEventUpdateBuilder_description_text");

  late final _calendarEventUpdateBuilderDescriptionText =
      _calendarEventUpdateBuilderDescriptionTextPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _calendarEventUpdateBuilderDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_description_html");

  late final _calendarEventUpdateBuilderDescriptionHtml =
      _calendarEventUpdateBuilderDescriptionHtmlPtr
          .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _calendarEventUpdateBuilderUtcStartFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcStartFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_start_from_rfc3339");

  late final _calendarEventUpdateBuilderUtcStartFromRfc3339 =
      _calendarEventUpdateBuilderUtcStartFromRfc3339Ptr.asFunction<
          _CalendarEventUpdateBuilderUtcStartFromRfc3339Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUtcStartFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcStartFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_start_from_rfc2822");

  late final _calendarEventUpdateBuilderUtcStartFromRfc2822 =
      _calendarEventUpdateBuilderUtcStartFromRfc2822Ptr.asFunction<
          _CalendarEventUpdateBuilderUtcStartFromRfc2822Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUtcStartFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcStartFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_start_from_format");

  late final _calendarEventUpdateBuilderUtcStartFromFormat =
      _calendarEventUpdateBuilderUtcStartFromFormatPtr.asFunction<
          _CalendarEventUpdateBuilderUtcStartFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUtcEndFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcEndFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_end_from_rfc3339");

  late final _calendarEventUpdateBuilderUtcEndFromRfc3339 =
      _calendarEventUpdateBuilderUtcEndFromRfc3339Ptr.asFunction<
          _CalendarEventUpdateBuilderUtcEndFromRfc3339Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUtcEndFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcEndFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_end_from_rfc2822");

  late final _calendarEventUpdateBuilderUtcEndFromRfc2822 =
      _calendarEventUpdateBuilderUtcEndFromRfc2822Ptr.asFunction<
          _CalendarEventUpdateBuilderUtcEndFromRfc2822Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUtcEndFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderUtcEndFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_utc_end_from_format");

  late final _calendarEventUpdateBuilderUtcEndFromFormat =
      _calendarEventUpdateBuilderUtcEndFromFormatPtr.asFunction<
          _CalendarEventUpdateBuilderUtcEndFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderAddPhysicalLocationPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_add_physical_location");

  late final _calendarEventUpdateBuilderAddPhysicalLocation =
      _calendarEventUpdateBuilderAddPhysicalLocationPtr.asFunction<
          void Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderAddVirtualLocationPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventUpdateBuilder_add_virtual_location");

  late final _calendarEventUpdateBuilderAddVirtualLocation =
      _calendarEventUpdateBuilderAddVirtualLocationPtr.asFunction<
          void Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventUpdateBuilderUnsetLocationsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__CalendarEventUpdateBuilder_unset_locations",
  );

  late final _calendarEventUpdateBuilderUnsetLocations =
      _calendarEventUpdateBuilderUnsetLocationsPtr
          .asFunction<void Function(int)>();
  late final _calendarEventUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEventUpdateBuilder_send",
  );

  late final _calendarEventUpdateBuilderSend =
      _calendarEventUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _calendarEventDraftTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CalendarEventDraft_title");

  late final _calendarEventDraftTitle = _calendarEventDraftTitlePtr
      .asFunction<void Function(int, int, int, int)>();
  late final _calendarEventDraftDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CalendarEventDraft_description_text");

  late final _calendarEventDraftDescriptionText =
      _calendarEventDraftDescriptionTextPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _calendarEventDraftDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_description_html");

  late final _calendarEventDraftDescriptionHtml =
      _calendarEventDraftDescriptionHtmlPtr
          .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _calendarEventDraftUnsetDescriptionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__CalendarEventDraft_unset_description",
  );

  late final _calendarEventDraftUnsetDescription =
      _calendarEventDraftUnsetDescriptionPtr.asFunction<void Function(int)>();
  late final _calendarEventDraftUtcStartFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcStartFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_start_from_rfc3339");

  late final _calendarEventDraftUtcStartFromRfc3339 =
      _calendarEventDraftUtcStartFromRfc3339Ptr.asFunction<
          _CalendarEventDraftUtcStartFromRfc3339Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftUtcStartFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcStartFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_start_from_rfc2822");

  late final _calendarEventDraftUtcStartFromRfc2822 =
      _calendarEventDraftUtcStartFromRfc2822Ptr.asFunction<
          _CalendarEventDraftUtcStartFromRfc2822Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftUtcStartFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcStartFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_start_from_format");

  late final _calendarEventDraftUtcStartFromFormat =
      _calendarEventDraftUtcStartFromFormatPtr.asFunction<
          _CalendarEventDraftUtcStartFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftUtcEndFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcEndFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_end_from_rfc3339");

  late final _calendarEventDraftUtcEndFromRfc3339 =
      _calendarEventDraftUtcEndFromRfc3339Ptr.asFunction<
          _CalendarEventDraftUtcEndFromRfc3339Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftUtcEndFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcEndFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_end_from_rfc2822");

  late final _calendarEventDraftUtcEndFromRfc2822 =
      _calendarEventDraftUtcEndFromRfc2822Ptr.asFunction<
          _CalendarEventDraftUtcEndFromRfc2822Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftUtcEndFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftUtcEndFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_utc_end_from_format");

  late final _calendarEventDraftUtcEndFromFormat =
      _calendarEventDraftUtcEndFromFormatPtr.asFunction<
          _CalendarEventDraftUtcEndFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftAddPhysicalLocationPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_add_physical_location");

  late final _calendarEventDraftAddPhysicalLocation =
      _calendarEventDraftAddPhysicalLocationPtr.asFunction<
          void Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftAddVirtualLocationPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CalendarEventDraft_add_virtual_location");

  late final _calendarEventDraftAddVirtualLocation =
      _calendarEventDraftAddVirtualLocationPtr.asFunction<
          void Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CalendarEventDraft_send",
  );

  late final _calendarEventDraftSend =
      _calendarEventDraftSendPtr.asFunction<int Function(int)>();
  late final _eventLocationInfoLocationTypePtr = _lookup<
      ffi.NativeFunction<
          _EventLocationInfoLocationTypeReturn Function(
              ffi.IntPtr)>>("__EventLocationInfo_location_type");

  late final _eventLocationInfoLocationType = _eventLocationInfoLocationTypePtr
      .asFunction<_EventLocationInfoLocationTypeReturn Function(int)>();
  late final _eventLocationInfoNamePtr = _lookup<
          ffi
          .NativeFunction<_EventLocationInfoNameReturn Function(ffi.IntPtr)>>(
      "__EventLocationInfo_name");

  late final _eventLocationInfoName = _eventLocationInfoNamePtr
      .asFunction<_EventLocationInfoNameReturn Function(int)>();
  late final _eventLocationInfoDescriptionPtr = _lookup<
      ffi.NativeFunction<
          _EventLocationInfoDescriptionReturn Function(
              ffi.IntPtr)>>("__EventLocationInfo_description");

  late final _eventLocationInfoDescription = _eventLocationInfoDescriptionPtr
      .asFunction<_EventLocationInfoDescriptionReturn Function(int)>();
  late final _eventLocationInfoCoordinatesPtr = _lookup<
      ffi.NativeFunction<
          _EventLocationInfoCoordinatesReturn Function(
              ffi.IntPtr)>>("__EventLocationInfo_coordinates");

  late final _eventLocationInfoCoordinates = _eventLocationInfoCoordinatesPtr
      .asFunction<_EventLocationInfoCoordinatesReturn Function(int)>();
  late final _eventLocationInfoUriPtr = _lookup<
          ffi.NativeFunction<_EventLocationInfoUriReturn Function(ffi.IntPtr)>>(
      "__EventLocationInfo_uri");

  late final _eventLocationInfoUri = _eventLocationInfoUriPtr
      .asFunction<_EventLocationInfoUriReturn Function(int)>();
  late final _eventLocationInfoAddressPtr = _lookup<
      ffi.NativeFunction<
          _EventLocationInfoAddressReturn Function(
              ffi.IntPtr)>>("__EventLocationInfo_address");

  late final _eventLocationInfoAddress = _eventLocationInfoAddressPtr
      .asFunction<_EventLocationInfoAddressReturn Function(int)>();
  late final _eventLocationInfoNotesPtr = _lookup<
          ffi
          .NativeFunction<_EventLocationInfoNotesReturn Function(ffi.IntPtr)>>(
      "__EventLocationInfo_notes");

  late final _eventLocationInfoNotes = _eventLocationInfoNotesPtr
      .asFunction<_EventLocationInfoNotesReturn Function(int)>();
  late final _rsvpManagerHasRsvpEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__RsvpManager_has_rsvp_entries",
  );

  late final _rsvpManagerHasRsvpEntries =
      _rsvpManagerHasRsvpEntriesPtr.asFunction<int Function(int)>();
  late final _rsvpManagerTotalRsvpCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__RsvpManager_total_rsvp_count",
  );

  late final _rsvpManagerTotalRsvpCount =
      _rsvpManagerTotalRsvpCountPtr.asFunction<int Function(int)>();
  late final _rsvpManagerRsvpEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RsvpManager_rsvp_entries",
  );

  late final _rsvpManagerRsvpEntries =
      _rsvpManagerRsvpEntriesPtr.asFunction<int Function(int)>();
  late final _rsvpManagerRespondedByMePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RsvpManager_responded_by_me",
  );

  late final _rsvpManagerRespondedByMe =
      _rsvpManagerRespondedByMePtr.asFunction<int Function(int)>();
  late final _rsvpManagerCountAtStatusPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__RsvpManager_count_at_status");

  late final _rsvpManagerCountAtStatus = _rsvpManagerCountAtStatusPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _rsvpManagerUsersAtStatusPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__RsvpManager_users_at_status");

  late final _rsvpManagerUsersAtStatus = _rsvpManagerUsersAtStatusPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _rsvpManagerRsvpDraftPtr = _lookup<
          ffi.NativeFunction<_RsvpManagerRsvpDraftReturn Function(ffi.IntPtr)>>(
      "__RsvpManager_rsvp_draft");

  late final _rsvpManagerRsvpDraft = _rsvpManagerRsvpDraftPtr
      .asFunction<_RsvpManagerRsvpDraftReturn Function(int)>();
  late final _rsvpManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RsvpManager_subscribe_stream",
  );

  late final _rsvpManagerSubscribeStream =
      _rsvpManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _rsvpDraftStatusPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__RsvpDraft_status");

  late final _rsvpDraftStatus =
      _rsvpDraftStatusPtr.asFunction<void Function(int, int, int, int)>();
  late final _rsvpDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RsvpDraft_send",
  );

  late final _rsvpDraftSend = _rsvpDraftSendPtr.asFunction<int Function(int)>();
  late final _rsvpSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Rsvp_sender",
  );

  late final _rsvpSender = _rsvpSenderPtr.asFunction<int Function(int)>();
  late final _rsvpOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Rsvp_origin_server_ts",
  );

  late final _rsvpOriginServerTs =
      _rsvpOriginServerTsPtr.asFunction<int Function(int)>();
  late final _rsvpStatusPtr =
      _lookup<ffi.NativeFunction<_RsvpStatusReturn Function(ffi.IntPtr)>>(
    "__Rsvp_status",
  );

  late final _rsvpStatus =
      _rsvpStatusPtr.asFunction<_RsvpStatusReturn Function(int)>();
  late final _reactionManagerLikesCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__ReactionManager_likes_count",
  );

  late final _reactionManagerLikesCount =
      _reactionManagerLikesCountPtr.asFunction<int Function(int)>();
  late final _reactionManagerLikedByMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ReactionManager_liked_by_me",
  );

  late final _reactionManagerLikedByMe =
      _reactionManagerLikedByMePtr.asFunction<int Function(int)>();
  late final _reactionManagerReactedByMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ReactionManager_reacted_by_me",
  );

  late final _reactionManagerReactedByMe =
      _reactionManagerReactedByMePtr.asFunction<int Function(int)>();
  late final _reactionManagerHasReactionEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ReactionManager_has_reaction_entries",
  );

  late final _reactionManagerHasReactionEntries =
      _reactionManagerHasReactionEntriesPtr.asFunction<int Function(int)>();
  late final _reactionManagerTotalReactionCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__ReactionManager_total_reaction_count",
  );

  late final _reactionManagerTotalReactionCount =
      _reactionManagerTotalReactionCountPtr.asFunction<int Function(int)>();
  late final _reactionManagerReactionEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReactionManager_reaction_entries",
  );

  late final _reactionManagerReactionEntries =
      _reactionManagerReactionEntriesPtr.asFunction<int Function(int)>();
  late final _reactionManagerSendLikePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReactionManager_send_like",
  );

  late final _reactionManagerSendLike =
      _reactionManagerSendLikePtr.asFunction<int Function(int)>();
  late final _reactionManagerSendReactionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__ReactionManager_send_reaction");

  late final _reactionManagerSendReaction = _reactionManagerSendReactionPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _reactionManagerRedactLikePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__ReactionManager_redact_like");

  late final _reactionManagerRedactLike = _reactionManagerRedactLikePtr
      .asFunction<int Function(int, int, int, int, int, int, int, int, int)>();
  late final _reactionManagerRedactReactionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__ReactionManager_redact_reaction");

  late final _reactionManagerRedactReaction =
      _reactionManagerRedactReactionPtr.asFunction<
          int Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _reactionManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReactionManager_subscribe_stream",
  );

  late final _reactionManagerSubscribeStream =
      _reactionManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _reactionManagerReloadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReactionManager_reload",
  );

  late final _reactionManagerReload =
      _reactionManagerReloadPtr.asFunction<int Function(int)>();
  late final _reactionEventIdStrPtr = _lookup<
          ffi.NativeFunction<_ReactionEventIdStrReturn Function(ffi.IntPtr)>>(
      "__Reaction_event_id_str");

  late final _reactionEventIdStr = _reactionEventIdStrPtr
      .asFunction<_ReactionEventIdStrReturn Function(int)>();
  late final _reactionSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Reaction_sender",
  );

  late final _reactionSender =
      _reactionSenderPtr.asFunction<int Function(int)>();
  late final _reactionOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Reaction_origin_server_ts",
  );

  late final _reactionOriginServerTs =
      _reactionOriginServerTsPtr.asFunction<int Function(int)>();
  late final _reactionRelatesToPtr = _lookup<
          ffi.NativeFunction<_ReactionRelatesToReturn Function(ffi.IntPtr)>>(
      "__Reaction_relates_to");

  late final _reactionRelatesTo = _reactionRelatesToPtr
      .asFunction<_ReactionRelatesToReturn Function(int)>();
  late final _readReceiptsManagerAnnounceReadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReadReceiptsManager_announce_read",
  );

  late final _readReceiptsManagerAnnounceRead =
      _readReceiptsManagerAnnounceReadPtr.asFunction<int Function(int)>();
  late final _readReceiptsManagerReadCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__ReadReceiptsManager_read_count",
  );

  late final _readReceiptsManagerReadCount =
      _readReceiptsManagerReadCountPtr.asFunction<int Function(int)>();
  late final _readReceiptsManagerReadByMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ReadReceiptsManager_read_by_me",
  );

  late final _readReceiptsManagerReadByMe =
      _readReceiptsManagerReadByMePtr.asFunction<int Function(int)>();
  late final _readReceiptsManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReadReceiptsManager_subscribe_stream",
  );

  late final _readReceiptsManagerSubscribeStream =
      _readReceiptsManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _readReceiptsManagerReloadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReadReceiptsManager_reload",
  );

  late final _readReceiptsManagerReload =
      _readReceiptsManagerReloadPtr.asFunction<int Function(int)>();
  late final _eventSendStateStatePtr = _lookup<
          ffi.NativeFunction<_EventSendStateStateReturn Function(ffi.IntPtr)>>(
      "__EventSendState_state");

  late final _eventSendStateState = _eventSendStateStatePtr
      .asFunction<_EventSendStateStateReturn Function(int)>();
  late final _eventSendStateErrorPtr = _lookup<
          ffi.NativeFunction<_EventSendStateErrorReturn Function(ffi.IntPtr)>>(
      "__EventSendState_error");

  late final _eventSendStateError = _eventSendStateErrorPtr
      .asFunction<_EventSendStateErrorReturn Function(int)>();
  late final _eventSendStateEventIdPtr = _lookup<
          ffi
          .NativeFunction<_EventSendStateEventIdReturn Function(ffi.IntPtr)>>(
      "__EventSendState_event_id");

  late final _eventSendStateEventId = _eventSendStateEventIdPtr
      .asFunction<_EventSendStateEventIdReturn Function(int)>();
  late final _eventSendStateAbortPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__EventSendState_abort",
  );

  late final _eventSendStateAbort =
      _eventSendStateAbortPtr.asFunction<int Function(int)>();
  late final _timelineEventItemSenderPtr = _lookup<
          ffi
          .NativeFunction<_TimelineEventItemSenderReturn Function(ffi.IntPtr)>>(
      "__TimelineEventItem_sender");

  late final _timelineEventItemSender = _timelineEventItemSenderPtr
      .asFunction<_TimelineEventItemSenderReturn Function(int)>();
  late final _timelineEventItemSendStatePtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemSendStateReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_send_state");

  late final _timelineEventItemSendState = _timelineEventItemSendStatePtr
      .asFunction<_TimelineEventItemSendStateReturn Function(int)>();
  late final _timelineEventItemOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__TimelineEventItem_origin_server_ts",
  );

  late final _timelineEventItemOriginServerTs =
      _timelineEventItemOriginServerTsPtr.asFunction<int Function(int)>();
  late final _timelineEventItemEventTypePtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemEventTypeReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_event_type");

  late final _timelineEventItemEventType = _timelineEventItemEventTypePtr
      .asFunction<_TimelineEventItemEventTypeReturn Function(int)>();
  late final _timelineEventItemEventIdPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemEventIdReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_event_id");

  late final _timelineEventItemEventId = _timelineEventItemEventIdPtr
      .asFunction<_TimelineEventItemEventIdReturn Function(int)>();
  late final _timelineEventItemMsgTypePtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemMsgTypeReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_msg_type");

  late final _timelineEventItemMsgType = _timelineEventItemMsgTypePtr
      .asFunction<_TimelineEventItemMsgTypeReturn Function(int)>();
  late final _timelineEventItemMsgContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemMsgContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_msg_content");

  late final _timelineEventItemMsgContent = _timelineEventItemMsgContentPtr
      .asFunction<_TimelineEventItemMsgContentReturn Function(int)>();
  late final _timelineEventItemMembershipContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemMembershipContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_membership_content");

  late final _timelineEventItemMembershipContent =
      _timelineEventItemMembershipContentPtr.asFunction<
          _TimelineEventItemMembershipContentReturn Function(int)>();
  late final _timelineEventItemProfileContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemProfileContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_profile_content");

  late final _timelineEventItemProfileContent =
      _timelineEventItemProfileContentPtr
          .asFunction<_TimelineEventItemProfileContentReturn Function(int)>();
  late final _timelineEventItemPolicyRuleRoomContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemPolicyRuleRoomContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_policy_rule_room_content");

  late final _timelineEventItemPolicyRuleRoomContent =
      _timelineEventItemPolicyRuleRoomContentPtr.asFunction<
          _TimelineEventItemPolicyRuleRoomContentReturn Function(int)>();
  late final _timelineEventItemPolicyRuleServerContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemPolicyRuleServerContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_policy_rule_server_content");

  late final _timelineEventItemPolicyRuleServerContent =
      _timelineEventItemPolicyRuleServerContentPtr.asFunction<
          _TimelineEventItemPolicyRuleServerContentReturn Function(int)>();
  late final _timelineEventItemPolicyRuleUserContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemPolicyRuleUserContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_policy_rule_user_content");

  late final _timelineEventItemPolicyRuleUserContent =
      _timelineEventItemPolicyRuleUserContentPtr.asFunction<
          _TimelineEventItemPolicyRuleUserContentReturn Function(int)>();
  late final _timelineEventItemRoomAvatarContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomAvatarContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_avatar_content");

  late final _timelineEventItemRoomAvatarContent =
      _timelineEventItemRoomAvatarContentPtr.asFunction<
          _TimelineEventItemRoomAvatarContentReturn Function(int)>();
  late final _timelineEventItemRoomCreateContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomCreateContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_create_content");

  late final _timelineEventItemRoomCreateContent =
      _timelineEventItemRoomCreateContentPtr.asFunction<
          _TimelineEventItemRoomCreateContentReturn Function(int)>();
  late final _timelineEventItemRoomEncryptionContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomEncryptionContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_encryption_content");

  late final _timelineEventItemRoomEncryptionContent =
      _timelineEventItemRoomEncryptionContentPtr.asFunction<
          _TimelineEventItemRoomEncryptionContentReturn Function(int)>();
  late final _timelineEventItemRoomGuestAccessContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomGuestAccessContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_guest_access_content");

  late final _timelineEventItemRoomGuestAccessContent =
      _timelineEventItemRoomGuestAccessContentPtr.asFunction<
          _TimelineEventItemRoomGuestAccessContentReturn Function(int)>();
  late final _timelineEventItemRoomHistoryVisibilityContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomHistoryVisibilityContentReturn Function(
            ffi.IntPtr,
          )>>("__TimelineEventItem_room_history_visibility_content");

  late final _timelineEventItemRoomHistoryVisibilityContent =
      _timelineEventItemRoomHistoryVisibilityContentPtr.asFunction<
          _TimelineEventItemRoomHistoryVisibilityContentReturn Function(int)>();
  late final _timelineEventItemRoomJoinRulesContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomJoinRulesContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_join_rules_content");

  late final _timelineEventItemRoomJoinRulesContent =
      _timelineEventItemRoomJoinRulesContentPtr.asFunction<
          _TimelineEventItemRoomJoinRulesContentReturn Function(int)>();
  late final _timelineEventItemRoomNameContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomNameContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_name_content");

  late final _timelineEventItemRoomNameContent =
      _timelineEventItemRoomNameContentPtr
          .asFunction<_TimelineEventItemRoomNameContentReturn Function(int)>();
  late final _timelineEventItemRoomPinnedEventsContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomPinnedEventsContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_pinned_events_content");

  late final _timelineEventItemRoomPinnedEventsContent =
      _timelineEventItemRoomPinnedEventsContentPtr.asFunction<
          _TimelineEventItemRoomPinnedEventsContentReturn Function(int)>();
  late final _timelineEventItemRoomPowerLevelsContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomPowerLevelsContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_power_levels_content");

  late final _timelineEventItemRoomPowerLevelsContent =
      _timelineEventItemRoomPowerLevelsContentPtr.asFunction<
          _TimelineEventItemRoomPowerLevelsContentReturn Function(int)>();
  late final _timelineEventItemRoomServerAclContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomServerAclContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_server_acl_content");

  late final _timelineEventItemRoomServerAclContent =
      _timelineEventItemRoomServerAclContentPtr.asFunction<
          _TimelineEventItemRoomServerAclContentReturn Function(int)>();
  late final _timelineEventItemRoomTombstoneContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomTombstoneContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_tombstone_content");

  late final _timelineEventItemRoomTombstoneContent =
      _timelineEventItemRoomTombstoneContentPtr.asFunction<
          _TimelineEventItemRoomTombstoneContentReturn Function(int)>();
  late final _timelineEventItemRoomTopicContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemRoomTopicContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_room_topic_content");

  late final _timelineEventItemRoomTopicContent =
      _timelineEventItemRoomTopicContentPtr
          .asFunction<_TimelineEventItemRoomTopicContentReturn Function(int)>();
  late final _timelineEventItemSpaceChildContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemSpaceChildContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_space_child_content");

  late final _timelineEventItemSpaceChildContent =
      _timelineEventItemSpaceChildContentPtr.asFunction<
          _TimelineEventItemSpaceChildContentReturn Function(int)>();
  late final _timelineEventItemSpaceParentContentPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemSpaceParentContentReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_space_parent_content");

  late final _timelineEventItemSpaceParentContent =
      _timelineEventItemSpaceParentContentPtr.asFunction<
          _TimelineEventItemSpaceParentContentReturn Function(int)>();
  late final _timelineEventItemRoomMentionedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__TimelineEventItem_room_mentioned",
  );

  late final _timelineEventItemRoomMentioned =
      _timelineEventItemRoomMentionedPtr.asFunction<int Function(int)>();
  late final _timelineEventItemMentionedUsersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TimelineEventItem_mentioned_users",
  );

  late final _timelineEventItemMentionedUsers =
      _timelineEventItemMentionedUsersPtr.asFunction<int Function(int)>();
  late final _timelineEventItemInReplyToIdPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemInReplyToIdReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_in_reply_to_id");

  late final _timelineEventItemInReplyToId = _timelineEventItemInReplyToIdPtr
      .asFunction<_TimelineEventItemInReplyToIdReturn Function(int)>();
  late final _timelineEventItemInReplyToEventPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemInReplyToEventReturn Function(
              ffi.IntPtr)>>("__TimelineEventItem_in_reply_to_event");

  late final _timelineEventItemInReplyToEvent =
      _timelineEventItemInReplyToEventPtr
          .asFunction<_TimelineEventItemInReplyToEventReturn Function(int)>();
  late final _timelineEventItemReadUsersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TimelineEventItem_read_users",
  );

  late final _timelineEventItemReadUsers =
      _timelineEventItemReadUsersPtr.asFunction<int Function(int)>();
  late final _timelineEventItemReceiptTsPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemReceiptTsReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TimelineEventItem_receipt_ts");

  late final _timelineEventItemReceiptTs =
      _timelineEventItemReceiptTsPtr.asFunction<
          _TimelineEventItemReceiptTsReturn Function(int, int, int, int)>();
  late final _timelineEventItemReactionKeysPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TimelineEventItem_reaction_keys",
  );

  late final _timelineEventItemReactionKeys =
      _timelineEventItemReactionKeysPtr.asFunction<int Function(int)>();
  late final _timelineEventItemReactionRecordsPtr = _lookup<
      ffi.NativeFunction<
          _TimelineEventItemReactionRecordsReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TimelineEventItem_reaction_records");

  late final _timelineEventItemReactionRecords =
      _timelineEventItemReactionRecordsPtr.asFunction<
          _TimelineEventItemReactionRecordsReturn Function(
              int, int, int, int)>();
  late final _timelineEventItemIsEditablePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__TimelineEventItem_is_editable",
  );

  late final _timelineEventItemIsEditable =
      _timelineEventItemIsEditablePtr.asFunction<int Function(int)>();
  late final _timelineEventItemWasEditedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__TimelineEventItem_was_edited",
  );

  late final _timelineEventItemWasEdited =
      _timelineEventItemWasEditedPtr.asFunction<int Function(int)>();
  late final _timelineVirtualItemEventTypePtr = _lookup<
      ffi.NativeFunction<
          _TimelineVirtualItemEventTypeReturn Function(
              ffi.IntPtr)>>("__TimelineVirtualItem_event_type");

  late final _timelineVirtualItemEventType = _timelineVirtualItemEventTypePtr
      .asFunction<_TimelineVirtualItemEventTypeReturn Function(int)>();
  late final _timelineVirtualItemDescPtr = _lookup<
          ffi
          .NativeFunction<_TimelineVirtualItemDescReturn Function(ffi.IntPtr)>>(
      "__TimelineVirtualItem_desc");

  late final _timelineVirtualItemDesc = _timelineVirtualItemDescPtr
      .asFunction<_TimelineVirtualItemDescReturn Function(int)>();
  late final _timelineItemIsVirtualPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__TimelineItem_is_virtual",
  );

  late final _timelineItemIsVirtual =
      _timelineItemIsVirtualPtr.asFunction<int Function(int)>();
  late final _timelineItemUniqueIdPtr = _lookup<
          ffi.NativeFunction<_TimelineItemUniqueIdReturn Function(ffi.IntPtr)>>(
      "__TimelineItem_unique_id");

  late final _timelineItemUniqueId = _timelineItemUniqueIdPtr
      .asFunction<_TimelineItemUniqueIdReturn Function(int)>();
  late final _timelineItemEventItemPtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemEventItemReturn Function(ffi.IntPtr)>>(
      "__TimelineItem_event_item");

  late final _timelineItemEventItem = _timelineItemEventItemPtr
      .asFunction<_TimelineItemEventItemReturn Function(int)>();
  late final _timelineItemVirtualItemPtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemVirtualItemReturn Function(ffi.IntPtr)>>(
      "__TimelineItem_virtual_item");

  late final _timelineItemVirtualItem = _timelineItemVirtualItemPtr
      .asFunction<_TimelineItemVirtualItemReturn Function(int)>();
  late final _msgContentBodyPtr =
      _lookup<ffi.NativeFunction<_MsgContentBodyReturn Function(ffi.IntPtr)>>(
    "__MsgContent_body",
  );

  late final _msgContentBody =
      _msgContentBodyPtr.asFunction<_MsgContentBodyReturn Function(int)>();
  late final _msgContentFormattedBodyPtr = _lookup<
          ffi
          .NativeFunction<_MsgContentFormattedBodyReturn Function(ffi.IntPtr)>>(
      "__MsgContent_formatted_body");

  late final _msgContentFormattedBody = _msgContentFormattedBodyPtr
      .asFunction<_MsgContentFormattedBodyReturn Function(int)>();
  late final _msgContentSourcePtr =
      _lookup<ffi.NativeFunction<_MsgContentSourceReturn Function(ffi.IntPtr)>>(
    "__MsgContent_source",
  );

  late final _msgContentSource =
      _msgContentSourcePtr.asFunction<_MsgContentSourceReturn Function(int)>();
  late final _msgContentMimetypePtr = _lookup<
          ffi.NativeFunction<_MsgContentMimetypeReturn Function(ffi.IntPtr)>>(
      "__MsgContent_mimetype");

  late final _msgContentMimetype = _msgContentMimetypePtr
      .asFunction<_MsgContentMimetypeReturn Function(int)>();
  late final _msgContentSizePtr =
      _lookup<ffi.NativeFunction<_MsgContentSizeReturn Function(ffi.IntPtr)>>(
    "__MsgContent_size",
  );

  late final _msgContentSize =
      _msgContentSizePtr.asFunction<_MsgContentSizeReturn Function(int)>();
  late final _msgContentWidthPtr =
      _lookup<ffi.NativeFunction<_MsgContentWidthReturn Function(ffi.IntPtr)>>(
    "__MsgContent_width",
  );

  late final _msgContentWidth =
      _msgContentWidthPtr.asFunction<_MsgContentWidthReturn Function(int)>();
  late final _msgContentHeightPtr =
      _lookup<ffi.NativeFunction<_MsgContentHeightReturn Function(ffi.IntPtr)>>(
    "__MsgContent_height",
  );

  late final _msgContentHeight =
      _msgContentHeightPtr.asFunction<_MsgContentHeightReturn Function(int)>();
  late final _msgContentThumbnailSourcePtr = _lookup<
      ffi.NativeFunction<
          _MsgContentThumbnailSourceReturn Function(
              ffi.IntPtr)>>("__MsgContent_thumbnail_source");

  late final _msgContentThumbnailSource = _msgContentThumbnailSourcePtr
      .asFunction<_MsgContentThumbnailSourceReturn Function(int)>();
  late final _msgContentThumbnailInfoPtr = _lookup<
          ffi
          .NativeFunction<_MsgContentThumbnailInfoReturn Function(ffi.IntPtr)>>(
      "__MsgContent_thumbnail_info");

  late final _msgContentThumbnailInfo = _msgContentThumbnailInfoPtr
      .asFunction<_MsgContentThumbnailInfoReturn Function(int)>();
  late final _msgContentDurationPtr = _lookup<
          ffi.NativeFunction<_MsgContentDurationReturn Function(ffi.IntPtr)>>(
      "__MsgContent_duration");

  late final _msgContentDuration = _msgContentDurationPtr
      .asFunction<_MsgContentDurationReturn Function(int)>();
  late final _msgContentBlurhashPtr = _lookup<
          ffi.NativeFunction<_MsgContentBlurhashReturn Function(ffi.IntPtr)>>(
      "__MsgContent_blurhash");

  late final _msgContentBlurhash = _msgContentBlurhashPtr
      .asFunction<_MsgContentBlurhashReturn Function(int)>();
  late final _msgContentFilenamePtr = _lookup<
          ffi.NativeFunction<_MsgContentFilenameReturn Function(ffi.IntPtr)>>(
      "__MsgContent_filename");

  late final _msgContentFilename = _msgContentFilenamePtr
      .asFunction<_MsgContentFilenameReturn Function(int)>();
  late final _msgContentGeoUriPtr =
      _lookup<ffi.NativeFunction<_MsgContentGeoUriReturn Function(ffi.IntPtr)>>(
    "__MsgContent_geo_uri",
  );

  late final _msgContentGeoUri =
      _msgContentGeoUriPtr.asFunction<_MsgContentGeoUriReturn Function(int)>();
  late final _msgContentHasUrlPreviewsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__MsgContent_has_url_previews",
  );

  late final _msgContentHasUrlPreviews =
      _msgContentHasUrlPreviewsPtr.asFunction<int Function(int)>();
  late final _msgContentUrlPreviewsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__MsgContent_url_previews",
  );

  late final _msgContentUrlPreviews =
      _msgContentUrlPreviewsPtr.asFunction<int Function(int)>();
  late final _membershipContentUserIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__MembershipContent_user_id",
  );

  late final _membershipContentUserId =
      _membershipContentUserIdPtr.asFunction<int Function(int)>();
  late final _membershipContentChangePtr = _lookup<
          ffi
          .NativeFunction<_MembershipContentChangeReturn Function(ffi.IntPtr)>>(
      "__MembershipContent_change");

  late final _membershipContentChange = _membershipContentChangePtr
      .asFunction<_MembershipContentChangeReturn Function(int)>();
  late final _profileContentUserIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ProfileContent_user_id",
  );

  late final _profileContentUserId =
      _profileContentUserIdPtr.asFunction<int Function(int)>();
  late final _profileContentDisplayNameChangePtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentDisplayNameChangeReturn Function(
              ffi.IntPtr)>>("__ProfileContent_display_name_change");

  late final _profileContentDisplayNameChange =
      _profileContentDisplayNameChangePtr
          .asFunction<_ProfileContentDisplayNameChangeReturn Function(int)>();
  late final _profileContentDisplayNameOldValPtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentDisplayNameOldValReturn Function(
              ffi.IntPtr)>>("__ProfileContent_display_name_old_val");

  late final _profileContentDisplayNameOldVal =
      _profileContentDisplayNameOldValPtr
          .asFunction<_ProfileContentDisplayNameOldValReturn Function(int)>();
  late final _profileContentDisplayNameNewValPtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentDisplayNameNewValReturn Function(
              ffi.IntPtr)>>("__ProfileContent_display_name_new_val");

  late final _profileContentDisplayNameNewVal =
      _profileContentDisplayNameNewValPtr
          .asFunction<_ProfileContentDisplayNameNewValReturn Function(int)>();
  late final _profileContentAvatarUrlChangePtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentAvatarUrlChangeReturn Function(
              ffi.IntPtr)>>("__ProfileContent_avatar_url_change");

  late final _profileContentAvatarUrlChange = _profileContentAvatarUrlChangePtr
      .asFunction<_ProfileContentAvatarUrlChangeReturn Function(int)>();
  late final _profileContentAvatarUrlOldValPtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentAvatarUrlOldValReturn Function(
              ffi.IntPtr)>>("__ProfileContent_avatar_url_old_val");

  late final _profileContentAvatarUrlOldVal = _profileContentAvatarUrlOldValPtr
      .asFunction<_ProfileContentAvatarUrlOldValReturn Function(int)>();
  late final _profileContentAvatarUrlNewValPtr = _lookup<
      ffi.NativeFunction<
          _ProfileContentAvatarUrlNewValReturn Function(
              ffi.IntPtr)>>("__ProfileContent_avatar_url_new_val");

  late final _profileContentAvatarUrlNewVal = _profileContentAvatarUrlNewValPtr
      .asFunction<_ProfileContentAvatarUrlNewValReturn Function(int)>();
  late final _reactionRecordSenderIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ReactionRecord_sender_id",
  );

  late final _reactionRecordSenderId =
      _reactionRecordSenderIdPtr.asFunction<int Function(int)>();
  late final _reactionRecordTimestampPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__ReactionRecord_timestamp",
  );

  late final _reactionRecordTimestamp =
      _reactionRecordTimestampPtr.asFunction<int Function(int)>();
  late final _reactionRecordSentByMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ReactionRecord_sent_by_me",
  );

  late final _reactionRecordSentByMe =
      _reactionRecordSentByMePtr.asFunction<int Function(int)>();
  late final _timelineItemDiffActionPtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemDiffActionReturn Function(ffi.IntPtr)>>(
      "__TimelineItemDiff_action");

  late final _timelineItemDiffAction = _timelineItemDiffActionPtr
      .asFunction<_TimelineItemDiffActionReturn Function(int)>();
  late final _timelineItemDiffValuesPtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemDiffValuesReturn Function(ffi.IntPtr)>>(
      "__TimelineItemDiff_values");

  late final _timelineItemDiffValues = _timelineItemDiffValuesPtr
      .asFunction<_TimelineItemDiffValuesReturn Function(int)>();
  late final _timelineItemDiffIndexPtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemDiffIndexReturn Function(ffi.IntPtr)>>(
      "__TimelineItemDiff_index");

  late final _timelineItemDiffIndex = _timelineItemDiffIndexPtr
      .asFunction<_TimelineItemDiffIndexReturn Function(int)>();
  late final _timelineItemDiffValuePtr = _lookup<
          ffi
          .NativeFunction<_TimelineItemDiffValueReturn Function(ffi.IntPtr)>>(
      "__TimelineItemDiff_value");

  late final _timelineItemDiffValue = _timelineItemDiffValuePtr
      .asFunction<_TimelineItemDiffValueReturn Function(int)>();
  late final _joinRuleBuilderJoinRulePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__JoinRuleBuilder_join_rule");

  late final _joinRuleBuilderJoinRule = _joinRuleBuilderJoinRulePtr
      .asFunction<void Function(int, int, int, int)>();
  late final _joinRuleBuilderAddRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__JoinRuleBuilder_add_room");

  late final _joinRuleBuilderAddRoom = _joinRuleBuilderAddRoomPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _policyRuleRoomContentEntityChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentEntityChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_entity_change");

  late final _policyRuleRoomContentEntityChange =
      _policyRuleRoomContentEntityChangePtr
          .asFunction<_PolicyRuleRoomContentEntityChangeReturn Function(int)>();
  late final _policyRuleRoomContentEntityNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentEntityNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_entity_new_val");

  late final _policyRuleRoomContentEntityNewVal =
      _policyRuleRoomContentEntityNewValPtr
          .asFunction<_PolicyRuleRoomContentEntityNewValReturn Function(int)>();
  late final _policyRuleRoomContentEntityOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentEntityOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_entity_old_val");

  late final _policyRuleRoomContentEntityOldVal =
      _policyRuleRoomContentEntityOldValPtr
          .asFunction<_PolicyRuleRoomContentEntityOldValReturn Function(int)>();
  late final _policyRuleRoomContentReasonChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentReasonChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_reason_change");

  late final _policyRuleRoomContentReasonChange =
      _policyRuleRoomContentReasonChangePtr
          .asFunction<_PolicyRuleRoomContentReasonChangeReturn Function(int)>();
  late final _policyRuleRoomContentReasonNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentReasonNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_reason_new_val");

  late final _policyRuleRoomContentReasonNewVal =
      _policyRuleRoomContentReasonNewValPtr
          .asFunction<_PolicyRuleRoomContentReasonNewValReturn Function(int)>();
  late final _policyRuleRoomContentReasonOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentReasonOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_reason_old_val");

  late final _policyRuleRoomContentReasonOldVal =
      _policyRuleRoomContentReasonOldValPtr
          .asFunction<_PolicyRuleRoomContentReasonOldValReturn Function(int)>();
  late final _policyRuleRoomContentRecommendationChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentRecommendationChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_recommendation_change");

  late final _policyRuleRoomContentRecommendationChange =
      _policyRuleRoomContentRecommendationChangePtr.asFunction<
          _PolicyRuleRoomContentRecommendationChangeReturn Function(int)>();
  late final _policyRuleRoomContentRecommendationNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentRecommendationNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_recommendation_new_val");

  late final _policyRuleRoomContentRecommendationNewVal =
      _policyRuleRoomContentRecommendationNewValPtr.asFunction<
          _PolicyRuleRoomContentRecommendationNewValReturn Function(int)>();
  late final _policyRuleRoomContentRecommendationOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleRoomContentRecommendationOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleRoomContent_recommendation_old_val");

  late final _policyRuleRoomContentRecommendationOldVal =
      _policyRuleRoomContentRecommendationOldValPtr.asFunction<
          _PolicyRuleRoomContentRecommendationOldValReturn Function(int)>();
  late final _policyRuleServerContentEntityChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentEntityChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_entity_change");

  late final _policyRuleServerContentEntityChange =
      _policyRuleServerContentEntityChangePtr.asFunction<
          _PolicyRuleServerContentEntityChangeReturn Function(int)>();
  late final _policyRuleServerContentEntityNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentEntityNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_entity_new_val");

  late final _policyRuleServerContentEntityNewVal =
      _policyRuleServerContentEntityNewValPtr.asFunction<
          _PolicyRuleServerContentEntityNewValReturn Function(int)>();
  late final _policyRuleServerContentEntityOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentEntityOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_entity_old_val");

  late final _policyRuleServerContentEntityOldVal =
      _policyRuleServerContentEntityOldValPtr.asFunction<
          _PolicyRuleServerContentEntityOldValReturn Function(int)>();
  late final _policyRuleServerContentReasonChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentReasonChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_reason_change");

  late final _policyRuleServerContentReasonChange =
      _policyRuleServerContentReasonChangePtr.asFunction<
          _PolicyRuleServerContentReasonChangeReturn Function(int)>();
  late final _policyRuleServerContentReasonNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentReasonNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_reason_new_val");

  late final _policyRuleServerContentReasonNewVal =
      _policyRuleServerContentReasonNewValPtr.asFunction<
          _PolicyRuleServerContentReasonNewValReturn Function(int)>();
  late final _policyRuleServerContentReasonOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentReasonOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleServerContent_reason_old_val");

  late final _policyRuleServerContentReasonOldVal =
      _policyRuleServerContentReasonOldValPtr.asFunction<
          _PolicyRuleServerContentReasonOldValReturn Function(int)>();
  late final _policyRuleServerContentRecommendationChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentRecommendationChangeReturn Function(
            ffi.IntPtr,
          )>>("__PolicyRuleServerContent_recommendation_change");

  late final _policyRuleServerContentRecommendationChange =
      _policyRuleServerContentRecommendationChangePtr.asFunction<
          _PolicyRuleServerContentRecommendationChangeReturn Function(int)>();
  late final _policyRuleServerContentRecommendationNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentRecommendationNewValReturn Function(
            ffi.IntPtr,
          )>>("__PolicyRuleServerContent_recommendation_new_val");

  late final _policyRuleServerContentRecommendationNewVal =
      _policyRuleServerContentRecommendationNewValPtr.asFunction<
          _PolicyRuleServerContentRecommendationNewValReturn Function(int)>();
  late final _policyRuleServerContentRecommendationOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleServerContentRecommendationOldValReturn Function(
            ffi.IntPtr,
          )>>("__PolicyRuleServerContent_recommendation_old_val");

  late final _policyRuleServerContentRecommendationOldVal =
      _policyRuleServerContentRecommendationOldValPtr.asFunction<
          _PolicyRuleServerContentRecommendationOldValReturn Function(int)>();
  late final _policyRuleUserContentEntityChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentEntityChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_entity_change");

  late final _policyRuleUserContentEntityChange =
      _policyRuleUserContentEntityChangePtr
          .asFunction<_PolicyRuleUserContentEntityChangeReturn Function(int)>();
  late final _policyRuleUserContentEntityNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentEntityNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_entity_new_val");

  late final _policyRuleUserContentEntityNewVal =
      _policyRuleUserContentEntityNewValPtr
          .asFunction<_PolicyRuleUserContentEntityNewValReturn Function(int)>();
  late final _policyRuleUserContentEntityOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentEntityOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_entity_old_val");

  late final _policyRuleUserContentEntityOldVal =
      _policyRuleUserContentEntityOldValPtr
          .asFunction<_PolicyRuleUserContentEntityOldValReturn Function(int)>();
  late final _policyRuleUserContentReasonChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentReasonChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_reason_change");

  late final _policyRuleUserContentReasonChange =
      _policyRuleUserContentReasonChangePtr
          .asFunction<_PolicyRuleUserContentReasonChangeReturn Function(int)>();
  late final _policyRuleUserContentReasonNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentReasonNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_reason_new_val");

  late final _policyRuleUserContentReasonNewVal =
      _policyRuleUserContentReasonNewValPtr
          .asFunction<_PolicyRuleUserContentReasonNewValReturn Function(int)>();
  late final _policyRuleUserContentReasonOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentReasonOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_reason_old_val");

  late final _policyRuleUserContentReasonOldVal =
      _policyRuleUserContentReasonOldValPtr
          .asFunction<_PolicyRuleUserContentReasonOldValReturn Function(int)>();
  late final _policyRuleUserContentRecommendationChangePtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentRecommendationChangeReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_recommendation_change");

  late final _policyRuleUserContentRecommendationChange =
      _policyRuleUserContentRecommendationChangePtr.asFunction<
          _PolicyRuleUserContentRecommendationChangeReturn Function(int)>();
  late final _policyRuleUserContentRecommendationNewValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentRecommendationNewValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_recommendation_new_val");

  late final _policyRuleUserContentRecommendationNewVal =
      _policyRuleUserContentRecommendationNewValPtr.asFunction<
          _PolicyRuleUserContentRecommendationNewValReturn Function(int)>();
  late final _policyRuleUserContentRecommendationOldValPtr = _lookup<
      ffi.NativeFunction<
          _PolicyRuleUserContentRecommendationOldValReturn Function(
              ffi.IntPtr)>>("__PolicyRuleUserContent_recommendation_old_val");

  late final _policyRuleUserContentRecommendationOldVal =
      _policyRuleUserContentRecommendationOldValPtr.asFunction<
          _PolicyRuleUserContentRecommendationOldValReturn Function(int)>();
  late final _roomAvatarContentUrlChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomAvatarContentUrlChangeReturn Function(
              ffi.IntPtr)>>("__RoomAvatarContent_url_change");

  late final _roomAvatarContentUrlChange = _roomAvatarContentUrlChangePtr
      .asFunction<_RoomAvatarContentUrlChangeReturn Function(int)>();
  late final _roomAvatarContentUrlNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomAvatarContentUrlNewValReturn Function(
              ffi.IntPtr)>>("__RoomAvatarContent_url_new_val");

  late final _roomAvatarContentUrlNewVal = _roomAvatarContentUrlNewValPtr
      .asFunction<_RoomAvatarContentUrlNewValReturn Function(int)>();
  late final _roomAvatarContentUrlOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomAvatarContentUrlOldValReturn Function(
              ffi.IntPtr)>>("__RoomAvatarContent_url_old_val");

  late final _roomAvatarContentUrlOldVal = _roomAvatarContentUrlOldValPtr
      .asFunction<_RoomAvatarContentUrlOldValReturn Function(int)>();
  late final _roomEncryptionContentAlgorithmChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomEncryptionContentAlgorithmChangeReturn Function(
              ffi.IntPtr)>>("__RoomEncryptionContent_algorithm_change");

  late final _roomEncryptionContentAlgorithmChange =
      _roomEncryptionContentAlgorithmChangePtr.asFunction<
          _RoomEncryptionContentAlgorithmChangeReturn Function(int)>();
  late final _roomEncryptionContentAlgorithmNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomEncryptionContentAlgorithmNewValReturn Function(
              ffi.IntPtr)>>("__RoomEncryptionContent_algorithm_new_val");

  late final _roomEncryptionContentAlgorithmNewVal =
      _roomEncryptionContentAlgorithmNewValPtr.asFunction<
          _RoomEncryptionContentAlgorithmNewValReturn Function(int)>();
  late final _roomEncryptionContentAlgorithmOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomEncryptionContentAlgorithmOldValReturn Function(
              ffi.IntPtr)>>("__RoomEncryptionContent_algorithm_old_val");

  late final _roomEncryptionContentAlgorithmOldVal =
      _roomEncryptionContentAlgorithmOldValPtr.asFunction<
          _RoomEncryptionContentAlgorithmOldValReturn Function(int)>();
  late final _roomGuestAccessContentChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomGuestAccessContentChangeReturn Function(
              ffi.IntPtr)>>("__RoomGuestAccessContent_change");

  late final _roomGuestAccessContentChange = _roomGuestAccessContentChangePtr
      .asFunction<_RoomGuestAccessContentChangeReturn Function(int)>();
  late final _roomGuestAccessContentNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomGuestAccessContentNewValReturn Function(
              ffi.IntPtr)>>("__RoomGuestAccessContent_new_val");

  late final _roomGuestAccessContentNewVal = _roomGuestAccessContentNewValPtr
      .asFunction<_RoomGuestAccessContentNewValReturn Function(int)>();
  late final _roomGuestAccessContentOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomGuestAccessContentOldValReturn Function(
              ffi.IntPtr)>>("__RoomGuestAccessContent_old_val");

  late final _roomGuestAccessContentOldVal = _roomGuestAccessContentOldValPtr
      .asFunction<_RoomGuestAccessContentOldValReturn Function(int)>();
  late final _roomHistoryVisibilityContentChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomHistoryVisibilityContentChangeReturn Function(
              ffi.IntPtr)>>("__RoomHistoryVisibilityContent_change");

  late final _roomHistoryVisibilityContentChange =
      _roomHistoryVisibilityContentChangePtr.asFunction<
          _RoomHistoryVisibilityContentChangeReturn Function(int)>();
  late final _roomHistoryVisibilityContentNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomHistoryVisibilityContentNewValReturn Function(
              ffi.IntPtr)>>("__RoomHistoryVisibilityContent_new_val");

  late final _roomHistoryVisibilityContentNewVal =
      _roomHistoryVisibilityContentNewValPtr.asFunction<
          _RoomHistoryVisibilityContentNewValReturn Function(int)>();
  late final _roomHistoryVisibilityContentOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomHistoryVisibilityContentOldValReturn Function(
              ffi.IntPtr)>>("__RoomHistoryVisibilityContent_old_val");

  late final _roomHistoryVisibilityContentOldVal =
      _roomHistoryVisibilityContentOldValPtr.asFunction<
          _RoomHistoryVisibilityContentOldValReturn Function(int)>();
  late final _roomJoinRulesContentChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomJoinRulesContentChangeReturn Function(
              ffi.IntPtr)>>("__RoomJoinRulesContent_change");

  late final _roomJoinRulesContentChange = _roomJoinRulesContentChangePtr
      .asFunction<_RoomJoinRulesContentChangeReturn Function(int)>();
  late final _roomJoinRulesContentNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomJoinRulesContentNewValReturn Function(
              ffi.IntPtr)>>("__RoomJoinRulesContent_new_val");

  late final _roomJoinRulesContentNewVal = _roomJoinRulesContentNewValPtr
      .asFunction<_RoomJoinRulesContentNewValReturn Function(int)>();
  late final _roomJoinRulesContentOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomJoinRulesContentOldValReturn Function(
              ffi.IntPtr)>>("__RoomJoinRulesContent_old_val");

  late final _roomJoinRulesContentOldVal = _roomJoinRulesContentOldValPtr
      .asFunction<_RoomJoinRulesContentOldValReturn Function(int)>();
  late final _roomNameContentChangePtr = _lookup<
          ffi
          .NativeFunction<_RoomNameContentChangeReturn Function(ffi.IntPtr)>>(
      "__RoomNameContent_change");

  late final _roomNameContentChange = _roomNameContentChangePtr
      .asFunction<_RoomNameContentChangeReturn Function(int)>();
  late final _roomNameContentNewValPtr = _lookup<
          ffi
          .NativeFunction<_RoomNameContentNewValReturn Function(ffi.IntPtr)>>(
      "__RoomNameContent_new_val");

  late final _roomNameContentNewVal = _roomNameContentNewValPtr
      .asFunction<_RoomNameContentNewValReturn Function(int)>();
  late final _roomNameContentOldValPtr = _lookup<
          ffi
          .NativeFunction<_RoomNameContentOldValReturn Function(ffi.IntPtr)>>(
      "__RoomNameContent_old_val");

  late final _roomNameContentOldVal = _roomNameContentOldValPtr
      .asFunction<_RoomNameContentOldValReturn Function(int)>();
  late final _roomPinnedEventsContentChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPinnedEventsContentChangeReturn Function(
              ffi.IntPtr)>>("__RoomPinnedEventsContent_change");

  late final _roomPinnedEventsContentChange = _roomPinnedEventsContentChangePtr
      .asFunction<_RoomPinnedEventsContentChangeReturn Function(int)>();
  late final _roomPinnedEventsContentNewValPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomPinnedEventsContent_new_val",
  );

  late final _roomPinnedEventsContentNewVal =
      _roomPinnedEventsContentNewValPtr.asFunction<int Function(int)>();
  late final _roomPinnedEventsContentOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPinnedEventsContentOldValReturn Function(
              ffi.IntPtr)>>("__RoomPinnedEventsContent_old_val");

  late final _roomPinnedEventsContentOldVal = _roomPinnedEventsContentOldValPtr
      .asFunction<_RoomPinnedEventsContentOldValReturn Function(int)>();
  late final _roomPowerLevelsContentBanChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentBanChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_ban_change");

  late final _roomPowerLevelsContentBanChange =
      _roomPowerLevelsContentBanChangePtr
          .asFunction<_RoomPowerLevelsContentBanChangeReturn Function(int)>();
  late final _roomPowerLevelsContentBanNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_ban_new_val",
  );

  late final _roomPowerLevelsContentBanNewVal =
      _roomPowerLevelsContentBanNewValPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsContentBanOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentBanOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_ban_old_val");

  late final _roomPowerLevelsContentBanOldVal =
      _roomPowerLevelsContentBanOldValPtr
          .asFunction<_RoomPowerLevelsContentBanOldValReturn Function(int)>();
  late final _roomPowerLevelsContentEventsChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentEventsChangeReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__RoomPowerLevelsContent_events_change");

  late final _roomPowerLevelsContentEventsChange =
      _roomPowerLevelsContentEventsChangePtr.asFunction<
          _RoomPowerLevelsContentEventsChangeReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _roomPowerLevelsContentEventsNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentEventsNewValReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__RoomPowerLevelsContent_events_new_val");

  late final _roomPowerLevelsContentEventsNewVal =
      _roomPowerLevelsContentEventsNewValPtr.asFunction<
          _RoomPowerLevelsContentEventsNewValReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _roomPowerLevelsContentEventsOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentEventsOldValReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__RoomPowerLevelsContent_events_old_val");

  late final _roomPowerLevelsContentEventsOldVal =
      _roomPowerLevelsContentEventsOldValPtr.asFunction<
          _RoomPowerLevelsContentEventsOldValReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _roomPowerLevelsContentEventsDefaultChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentEventsDefaultChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_events_default_change");

  late final _roomPowerLevelsContentEventsDefaultChange =
      _roomPowerLevelsContentEventsDefaultChangePtr.asFunction<
          _RoomPowerLevelsContentEventsDefaultChangeReturn Function(int)>();
  late final _roomPowerLevelsContentEventsDefaultNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_events_default_new_val",
  );

  late final _roomPowerLevelsContentEventsDefaultNewVal =
      _roomPowerLevelsContentEventsDefaultNewValPtr
          .asFunction<int Function(int)>();
  late final _roomPowerLevelsContentEventsDefaultOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentEventsDefaultOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_events_default_old_val");

  late final _roomPowerLevelsContentEventsDefaultOldVal =
      _roomPowerLevelsContentEventsDefaultOldValPtr.asFunction<
          _RoomPowerLevelsContentEventsDefaultOldValReturn Function(int)>();
  late final _roomPowerLevelsContentInviteChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentInviteChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_invite_change");

  late final _roomPowerLevelsContentInviteChange =
      _roomPowerLevelsContentInviteChangePtr.asFunction<
          _RoomPowerLevelsContentInviteChangeReturn Function(int)>();
  late final _roomPowerLevelsContentInviteNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_invite_new_val",
  );

  late final _roomPowerLevelsContentInviteNewVal =
      _roomPowerLevelsContentInviteNewValPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsContentInviteOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentInviteOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_invite_old_val");

  late final _roomPowerLevelsContentInviteOldVal =
      _roomPowerLevelsContentInviteOldValPtr.asFunction<
          _RoomPowerLevelsContentInviteOldValReturn Function(int)>();
  late final _roomPowerLevelsContentKickChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentKickChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_kick_change");

  late final _roomPowerLevelsContentKickChange =
      _roomPowerLevelsContentKickChangePtr
          .asFunction<_RoomPowerLevelsContentKickChangeReturn Function(int)>();
  late final _roomPowerLevelsContentKickNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_kick_new_val",
  );

  late final _roomPowerLevelsContentKickNewVal =
      _roomPowerLevelsContentKickNewValPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsContentKickOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentKickOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_kick_old_val");

  late final _roomPowerLevelsContentKickOldVal =
      _roomPowerLevelsContentKickOldValPtr
          .asFunction<_RoomPowerLevelsContentKickOldValReturn Function(int)>();
  late final _roomPowerLevelsContentNotificationsChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentNotificationsChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_notifications_change");

  late final _roomPowerLevelsContentNotificationsChange =
      _roomPowerLevelsContentNotificationsChangePtr.asFunction<
          _RoomPowerLevelsContentNotificationsChangeReturn Function(int)>();
  late final _roomPowerLevelsContentNotificationsNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_notifications_new_val",
  );

  late final _roomPowerLevelsContentNotificationsNewVal =
      _roomPowerLevelsContentNotificationsNewValPtr
          .asFunction<int Function(int)>();
  late final _roomPowerLevelsContentNotificationsOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentNotificationsOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_notifications_old_val");

  late final _roomPowerLevelsContentNotificationsOldVal =
      _roomPowerLevelsContentNotificationsOldValPtr.asFunction<
          _RoomPowerLevelsContentNotificationsOldValReturn Function(int)>();
  late final _roomPowerLevelsContentRedactChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentRedactChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_redact_change");

  late final _roomPowerLevelsContentRedactChange =
      _roomPowerLevelsContentRedactChangePtr.asFunction<
          _RoomPowerLevelsContentRedactChangeReturn Function(int)>();
  late final _roomPowerLevelsContentRedactNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_redact_new_val",
  );

  late final _roomPowerLevelsContentRedactNewVal =
      _roomPowerLevelsContentRedactNewValPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsContentRedactOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentRedactOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_redact_old_val");

  late final _roomPowerLevelsContentRedactOldVal =
      _roomPowerLevelsContentRedactOldValPtr.asFunction<
          _RoomPowerLevelsContentRedactOldValReturn Function(int)>();
  late final _roomPowerLevelsContentStateDefaultChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentStateDefaultChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_state_default_change");

  late final _roomPowerLevelsContentStateDefaultChange =
      _roomPowerLevelsContentStateDefaultChangePtr.asFunction<
          _RoomPowerLevelsContentStateDefaultChangeReturn Function(int)>();
  late final _roomPowerLevelsContentStateDefaultNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_state_default_new_val",
  );

  late final _roomPowerLevelsContentStateDefaultNewVal =
      _roomPowerLevelsContentStateDefaultNewValPtr
          .asFunction<int Function(int)>();
  late final _roomPowerLevelsContentStateDefaultOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentStateDefaultOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_state_default_old_val");

  late final _roomPowerLevelsContentStateDefaultOldVal =
      _roomPowerLevelsContentStateDefaultOldValPtr.asFunction<
          _RoomPowerLevelsContentStateDefaultOldValReturn Function(int)>();
  late final _roomPowerLevelsContentUsersChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentUsersChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_users_change");

  late final _roomPowerLevelsContentUsersChange =
      _roomPowerLevelsContentUsersChangePtr
          .asFunction<_RoomPowerLevelsContentUsersChangeReturn Function(int)>();
  late final _roomPowerLevelsContentUsersDefaultChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentUsersDefaultChangeReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_users_default_change");

  late final _roomPowerLevelsContentUsersDefaultChange =
      _roomPowerLevelsContentUsersDefaultChangePtr.asFunction<
          _RoomPowerLevelsContentUsersDefaultChangeReturn Function(int)>();
  late final _roomPowerLevelsContentUsersDefaultNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevelsContent_users_default_new_val",
  );

  late final _roomPowerLevelsContentUsersDefaultNewVal =
      _roomPowerLevelsContentUsersDefaultNewValPtr
          .asFunction<int Function(int)>();
  late final _roomPowerLevelsContentUsersDefaultOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsContentUsersDefaultOldValReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevelsContent_users_default_old_val");

  late final _roomPowerLevelsContentUsersDefaultOldVal =
      _roomPowerLevelsContentUsersDefaultOldValPtr.asFunction<
          _RoomPowerLevelsContentUsersDefaultOldValReturn Function(int)>();
  late final _roomServerAclContentAllowIpLiteralsChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentAllowIpLiteralsChangeReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_allow_ip_literals_change");

  late final _roomServerAclContentAllowIpLiteralsChange =
      _roomServerAclContentAllowIpLiteralsChangePtr.asFunction<
          _RoomServerAclContentAllowIpLiteralsChangeReturn Function(int)>();
  late final _roomServerAclContentAllowIpLiteralsNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__RoomServerAclContent_allow_ip_literals_new_val",
  );

  late final _roomServerAclContentAllowIpLiteralsNewVal =
      _roomServerAclContentAllowIpLiteralsNewValPtr
          .asFunction<int Function(int)>();
  late final _roomServerAclContentAllowIpLiteralsOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentAllowIpLiteralsOldValReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_allow_ip_literals_old_val");

  late final _roomServerAclContentAllowIpLiteralsOldVal =
      _roomServerAclContentAllowIpLiteralsOldValPtr.asFunction<
          _RoomServerAclContentAllowIpLiteralsOldValReturn Function(int)>();
  late final _roomServerAclContentAllowChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentAllowChangeReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_allow_change");

  late final _roomServerAclContentAllowChange =
      _roomServerAclContentAllowChangePtr
          .asFunction<_RoomServerAclContentAllowChangeReturn Function(int)>();
  late final _roomServerAclContentAllowNewValPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomServerAclContent_allow_new_val",
  );

  late final _roomServerAclContentAllowNewVal =
      _roomServerAclContentAllowNewValPtr.asFunction<int Function(int)>();
  late final _roomServerAclContentAllowOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentAllowOldValReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_allow_old_val");

  late final _roomServerAclContentAllowOldVal =
      _roomServerAclContentAllowOldValPtr
          .asFunction<_RoomServerAclContentAllowOldValReturn Function(int)>();
  late final _roomServerAclContentDenyChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentDenyChangeReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_deny_change");

  late final _roomServerAclContentDenyChange =
      _roomServerAclContentDenyChangePtr
          .asFunction<_RoomServerAclContentDenyChangeReturn Function(int)>();
  late final _roomServerAclContentDenyNewValPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomServerAclContent_deny_new_val",
  );

  late final _roomServerAclContentDenyNewVal =
      _roomServerAclContentDenyNewValPtr.asFunction<int Function(int)>();
  late final _roomServerAclContentDenyOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomServerAclContentDenyOldValReturn Function(
              ffi.IntPtr)>>("__RoomServerAclContent_deny_old_val");

  late final _roomServerAclContentDenyOldVal =
      _roomServerAclContentDenyOldValPtr
          .asFunction<_RoomServerAclContentDenyOldValReturn Function(int)>();
  late final _roomTombstoneContentBodyChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentBodyChangeReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_body_change");

  late final _roomTombstoneContentBodyChange =
      _roomTombstoneContentBodyChangePtr
          .asFunction<_RoomTombstoneContentBodyChangeReturn Function(int)>();
  late final _roomTombstoneContentBodyNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentBodyNewValReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_body_new_val");

  late final _roomTombstoneContentBodyNewVal =
      _roomTombstoneContentBodyNewValPtr
          .asFunction<_RoomTombstoneContentBodyNewValReturn Function(int)>();
  late final _roomTombstoneContentBodyOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentBodyOldValReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_body_old_val");

  late final _roomTombstoneContentBodyOldVal =
      _roomTombstoneContentBodyOldValPtr
          .asFunction<_RoomTombstoneContentBodyOldValReturn Function(int)>();
  late final _roomTombstoneContentReplacementRoomChangePtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentReplacementRoomChangeReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_replacement_room_change");

  late final _roomTombstoneContentReplacementRoomChange =
      _roomTombstoneContentReplacementRoomChangePtr.asFunction<
          _RoomTombstoneContentReplacementRoomChangeReturn Function(int)>();
  late final _roomTombstoneContentReplacementRoomNewValPtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentReplacementRoomNewValReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_replacement_room_new_val");

  late final _roomTombstoneContentReplacementRoomNewVal =
      _roomTombstoneContentReplacementRoomNewValPtr.asFunction<
          _RoomTombstoneContentReplacementRoomNewValReturn Function(int)>();
  late final _roomTombstoneContentReplacementRoomOldValPtr = _lookup<
      ffi.NativeFunction<
          _RoomTombstoneContentReplacementRoomOldValReturn Function(
              ffi.IntPtr)>>("__RoomTombstoneContent_replacement_room_old_val");

  late final _roomTombstoneContentReplacementRoomOldVal =
      _roomTombstoneContentReplacementRoomOldValPtr.asFunction<
          _RoomTombstoneContentReplacementRoomOldValReturn Function(int)>();
  late final _roomTopicContentChangePtr = _lookup<
          ffi
          .NativeFunction<_RoomTopicContentChangeReturn Function(ffi.IntPtr)>>(
      "__RoomTopicContent_change");

  late final _roomTopicContentChange = _roomTopicContentChangePtr
      .asFunction<_RoomTopicContentChangeReturn Function(int)>();
  late final _roomTopicContentNewValPtr = _lookup<
          ffi
          .NativeFunction<_RoomTopicContentNewValReturn Function(ffi.IntPtr)>>(
      "__RoomTopicContent_new_val");

  late final _roomTopicContentNewVal = _roomTopicContentNewValPtr
      .asFunction<_RoomTopicContentNewValReturn Function(int)>();
  late final _roomTopicContentOldValPtr = _lookup<
          ffi
          .NativeFunction<_RoomTopicContentOldValReturn Function(ffi.IntPtr)>>(
      "__RoomTopicContent_old_val");

  late final _roomTopicContentOldVal = _roomTopicContentOldValPtr
      .asFunction<_RoomTopicContentOldValReturn Function(int)>();
  late final _spaceChildContentRoomIdPtr = _lookup<
          ffi
          .NativeFunction<_SpaceChildContentRoomIdReturn Function(ffi.IntPtr)>>(
      "__SpaceChildContent_room_id");

  late final _spaceChildContentRoomId = _spaceChildContentRoomIdPtr
      .asFunction<_SpaceChildContentRoomIdReturn Function(int)>();
  late final _spaceChildContentViaChangePtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentViaChangeReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_via_change");

  late final _spaceChildContentViaChange = _spaceChildContentViaChangePtr
      .asFunction<_SpaceChildContentViaChangeReturn Function(int)>();
  late final _spaceChildContentViaNewValPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceChildContent_via_new_val",
  );

  late final _spaceChildContentViaNewVal =
      _spaceChildContentViaNewValPtr.asFunction<int Function(int)>();
  late final _spaceChildContentViaOldValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentViaOldValReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_via_old_val");

  late final _spaceChildContentViaOldVal = _spaceChildContentViaOldValPtr
      .asFunction<_SpaceChildContentViaOldValReturn Function(int)>();
  late final _spaceChildContentOrderChangePtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentOrderChangeReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_order_change");

  late final _spaceChildContentOrderChange = _spaceChildContentOrderChangePtr
      .asFunction<_SpaceChildContentOrderChangeReturn Function(int)>();
  late final _spaceChildContentOrderNewValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentOrderNewValReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_order_new_val");

  late final _spaceChildContentOrderNewVal = _spaceChildContentOrderNewValPtr
      .asFunction<_SpaceChildContentOrderNewValReturn Function(int)>();
  late final _spaceChildContentOrderOldValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentOrderOldValReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_order_old_val");

  late final _spaceChildContentOrderOldVal = _spaceChildContentOrderOldValPtr
      .asFunction<_SpaceChildContentOrderOldValReturn Function(int)>();
  late final _spaceChildContentSuggestedChangePtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentSuggestedChangeReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_suggested_change");

  late final _spaceChildContentSuggestedChange =
      _spaceChildContentSuggestedChangePtr
          .asFunction<_SpaceChildContentSuggestedChangeReturn Function(int)>();
  late final _spaceChildContentSuggestedNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceChildContent_suggested_new_val",
  );

  late final _spaceChildContentSuggestedNewVal =
      _spaceChildContentSuggestedNewValPtr.asFunction<int Function(int)>();
  late final _spaceChildContentSuggestedOldValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceChildContentSuggestedOldValReturn Function(
              ffi.IntPtr)>>("__SpaceChildContent_suggested_old_val");

  late final _spaceChildContentSuggestedOldVal =
      _spaceChildContentSuggestedOldValPtr
          .asFunction<_SpaceChildContentSuggestedOldValReturn Function(int)>();
  late final _spaceParentContentRoomIdPtr = _lookup<
      ffi.NativeFunction<
          _SpaceParentContentRoomIdReturn Function(
              ffi.IntPtr)>>("__SpaceParentContent_room_id");

  late final _spaceParentContentRoomId = _spaceParentContentRoomIdPtr
      .asFunction<_SpaceParentContentRoomIdReturn Function(int)>();
  late final _spaceParentContentViaChangePtr = _lookup<
      ffi.NativeFunction<
          _SpaceParentContentViaChangeReturn Function(
              ffi.IntPtr)>>("__SpaceParentContent_via_change");

  late final _spaceParentContentViaChange = _spaceParentContentViaChangePtr
      .asFunction<_SpaceParentContentViaChangeReturn Function(int)>();
  late final _spaceParentContentViaNewValPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceParentContent_via_new_val",
  );

  late final _spaceParentContentViaNewVal =
      _spaceParentContentViaNewValPtr.asFunction<int Function(int)>();
  late final _spaceParentContentViaOldValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceParentContentViaOldValReturn Function(
              ffi.IntPtr)>>("__SpaceParentContent_via_old_val");

  late final _spaceParentContentViaOldVal = _spaceParentContentViaOldValPtr
      .asFunction<_SpaceParentContentViaOldValReturn Function(int)>();
  late final _spaceParentContentCanonicalChangePtr = _lookup<
      ffi.NativeFunction<
          _SpaceParentContentCanonicalChangeReturn Function(
              ffi.IntPtr)>>("__SpaceParentContent_canonical_change");

  late final _spaceParentContentCanonicalChange =
      _spaceParentContentCanonicalChangePtr
          .asFunction<_SpaceParentContentCanonicalChangeReturn Function(int)>();
  late final _spaceParentContentCanonicalNewValPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceParentContent_canonical_new_val",
  );

  late final _spaceParentContentCanonicalNewVal =
      _spaceParentContentCanonicalNewValPtr.asFunction<int Function(int)>();
  late final _spaceParentContentCanonicalOldValPtr = _lookup<
      ffi.NativeFunction<
          _SpaceParentContentCanonicalOldValReturn Function(
              ffi.IntPtr)>>("__SpaceParentContent_canonical_old_val");

  late final _spaceParentContentCanonicalOldVal =
      _spaceParentContentCanonicalOldValPtr
          .asFunction<_SpaceParentContentCanonicalOldValReturn Function(int)>();
  late final _roomRoomIdStrPtr =
      _lookup<ffi.NativeFunction<_RoomRoomIdStrReturn Function(ffi.IntPtr)>>(
    "__Room_room_id_str",
  );

  late final _roomRoomIdStr =
      _roomRoomIdStrPtr.asFunction<_RoomRoomIdStrReturn Function(int)>();
  late final _roomHasAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Room_has_avatar",
  );

  late final _roomHasAvatar = _roomHasAvatarPtr.asFunction<int Function(int)>();
  late final _roomAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.IntPtr)>>("__Room_avatar");

  late final _roomAvatar =
      _roomAvatarPtr.asFunction<int Function(int, int, int)>();
  late final _roomDisplayNamePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_display_name",
  );

  late final _roomDisplayName =
      _roomDisplayNamePtr.asFunction<int Function(int)>();
  late final _roomSubscribeToUpdatesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_subscribe_to_updates",
  );

  late final _roomSubscribeToUpdates =
      _roomSubscribeToUpdatesPtr.asFunction<int Function(int)>();
  late final _roomIsSpacePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Room_is_space",
  );

  late final _roomIsSpace = _roomIsSpacePtr.asFunction<int Function(int)>();
  late final _roomJoinRuleStrPtr =
      _lookup<ffi.NativeFunction<_RoomJoinRuleStrReturn Function(ffi.IntPtr)>>(
    "__Room_join_rule_str",
  );

  late final _roomJoinRuleStr =
      _roomJoinRuleStrPtr.asFunction<_RoomJoinRuleStrReturn Function(int)>();
  late final _roomRestrictedRoomIdsStrPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_restricted_room_ids_str",
  );

  late final _roomRestrictedRoomIdsStr =
      _roomRestrictedRoomIdsStrPtr.asFunction<int Function(int)>();
  late final _roomSetJoinRulePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__Room_set_join_rule",
  );

  late final _roomSetJoinRule =
      _roomSetJoinRulePtr.asFunction<int Function(int, int)>();
  late final _roomIsJoinedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Room_is_joined",
  );

  late final _roomIsJoined = _roomIsJoinedPtr.asFunction<int Function(int)>();
  late final _roomSpaceRelationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_space_relations",
  );

  late final _roomSpaceRelations =
      _roomSpaceRelationsPtr.asFunction<int Function(int)>();
  late final _roomIsDirectPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_is_direct",
  );

  late final _roomIsDirect = _roomIsDirectPtr.asFunction<int Function(int)>();
  late final _roomAddParentRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__Room_add_parent_room");

  late final _roomAddParentRoom =
      _roomAddParentRoomPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _roomRemoveParentRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Room_remove_parent_room");

  late final _roomRemoveParentRoom = _roomRemoveParentRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _roomAddChildRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__Room_add_child_room");

  late final _roomAddChildRoom = _roomAddChildRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int, int)>();
  late final _roomRemoveChildRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Room_remove_child_room");

  late final _roomRemoveChildRoom = _roomRemoveChildRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _roomGetMyMembershipPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_get_my_membership",
  );

  late final _roomGetMyMembership =
      _roomGetMyMembershipPtr.asFunction<int Function(int)>();
  late final _roomActiveMembersIdsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_active_members_ids",
  );

  late final _roomActiveMembersIds =
      _roomActiveMembersIdsPtr.asFunction<int Function(int)>();
  late final _roomActiveMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_active_members",
  );

  late final _roomActiveMembers =
      _roomActiveMembersPtr.asFunction<int Function(int)>();
  late final _roomInvitedMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_invited_members",
  );

  late final _roomInvitedMembers =
      _roomInvitedMembersPtr.asFunction<int Function(int)>();
  late final _roomGetMemberPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Room_get_member");

  late final _roomGetMember =
      _roomGetMemberPtr.asFunction<int Function(int, int, int, int)>();
  late final _roomInviteUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Room_invite_user");

  late final _roomInviteUser =
      _roomInviteUserPtr.asFunction<int Function(int, int, int, int)>();
  late final _roomNotificationModePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_notification_mode",
  );

  late final _roomNotificationMode =
      _roomNotificationModePtr.asFunction<int Function(int)>();
  late final _roomDefaultNotificationModePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_default_notification_mode",
  );

  late final _roomDefaultNotificationMode =
      _roomDefaultNotificationModePtr.asFunction<int Function(int)>();
  late final _roomUnmutePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_unmute",
  );

  late final _roomUnmute = _roomUnmutePtr.asFunction<int Function(int)>();
  late final _roomSetNotificationModePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Room_set_notification_mode");

  late final _roomSetNotificationMode = _roomSetNotificationModePtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _roomUpdatePowerLevelPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Int32,
          )>>("__Room_update_power_level");

  late final _roomUpdatePowerLevel = _roomUpdatePowerLevelPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _roomUploadAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Room_upload_avatar");

  late final _roomUploadAvatar =
      _roomUploadAvatarPtr.asFunction<int Function(int, int, int, int)>();
  late final _roomRemoveAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_remove_avatar",
  );

  late final _roomRemoveAvatar =
      _roomRemoveAvatarPtr.asFunction<int Function(int)>();
  late final _roomTopicPtr =
      _lookup<ffi.NativeFunction<_RoomTopicReturn Function(ffi.IntPtr)>>(
    "__Room_topic",
  );

  late final _roomTopic =
      _roomTopicPtr.asFunction<_RoomTopicReturn Function(int)>();
  late final _roomSetTopicPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Room_set_topic");

  late final _roomSetTopic =
      _roomSetTopicPtr.asFunction<int Function(int, int, int, int)>();
  late final _roomSetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Room_set_name");

  late final _roomSetName =
      _roomSetNamePtr.asFunction<int Function(int, int, int, int)>();
  late final _roomLeavePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_leave",
  );

  late final _roomLeave = _roomLeavePtr.asFunction<int Function(int)>();
  late final _roomUserSettingsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Room_user_settings",
  );

  late final _roomUserSettings =
      _roomUserSettingsPtr.asFunction<int Function(int)>();
  late final _userRoomSettingsHasSeenSuggestedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__UserRoomSettings_has_seen_suggested",
  );

  late final _userRoomSettingsHasSeenSuggested =
      _userRoomSettingsHasSeenSuggestedPtr.asFunction<int Function(int)>();
  late final _userRoomSettingsSetHasSeenSuggestedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__UserRoomSettings_set_has_seen_suggested",
  );

  late final _userRoomSettingsSetHasSeenSuggested =
      _userRoomSettingsSetHasSeenSuggestedPtr
          .asFunction<int Function(int, int)>();
  late final _userRoomSettingsIncludeCalSyncPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__UserRoomSettings_include_cal_sync",
  );

  late final _userRoomSettingsIncludeCalSync =
      _userRoomSettingsIncludeCalSyncPtr.asFunction<int Function(int)>();
  late final _userRoomSettingsSetIncludeCalSyncPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__UserRoomSettings_set_include_cal_sync",
  );

  late final _userRoomSettingsSetIncludeCalSync =
      _userRoomSettingsSetIncludeCalSyncPtr
          .asFunction<int Function(int, int)>();
  late final _userRoomSettingsSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__UserRoomSettings_subscribe_stream",
  );

  late final _userRoomSettingsSubscribeStream =
      _userRoomSettingsSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _convoDiffActionPtr =
      _lookup<ffi.NativeFunction<_ConvoDiffActionReturn Function(ffi.IntPtr)>>(
    "__ConvoDiff_action",
  );

  late final _convoDiffAction =
      _convoDiffActionPtr.asFunction<_ConvoDiffActionReturn Function(int)>();
  late final _convoDiffValuesPtr =
      _lookup<ffi.NativeFunction<_ConvoDiffValuesReturn Function(ffi.IntPtr)>>(
    "__ConvoDiff_values",
  );

  late final _convoDiffValues =
      _convoDiffValuesPtr.asFunction<_ConvoDiffValuesReturn Function(int)>();
  late final _convoDiffIndexPtr =
      _lookup<ffi.NativeFunction<_ConvoDiffIndexReturn Function(ffi.IntPtr)>>(
    "__ConvoDiff_index",
  );

  late final _convoDiffIndex =
      _convoDiffIndexPtr.asFunction<_ConvoDiffIndexReturn Function(int)>();
  late final _convoDiffValuePtr =
      _lookup<ffi.NativeFunction<_ConvoDiffValueReturn Function(ffi.IntPtr)>>(
    "__ConvoDiff_value",
  );

  late final _convoDiffValue =
      _convoDiffValuePtr.asFunction<_ConvoDiffValueReturn Function(int)>();
  late final _spaceDiffActionPtr =
      _lookup<ffi.NativeFunction<_SpaceDiffActionReturn Function(ffi.IntPtr)>>(
    "__SpaceDiff_action",
  );

  late final _spaceDiffAction =
      _spaceDiffActionPtr.asFunction<_SpaceDiffActionReturn Function(int)>();
  late final _spaceDiffValuesPtr =
      _lookup<ffi.NativeFunction<_SpaceDiffValuesReturn Function(ffi.IntPtr)>>(
    "__SpaceDiff_values",
  );

  late final _spaceDiffValues =
      _spaceDiffValuesPtr.asFunction<_SpaceDiffValuesReturn Function(int)>();
  late final _spaceDiffIndexPtr =
      _lookup<ffi.NativeFunction<_SpaceDiffIndexReturn Function(ffi.IntPtr)>>(
    "__SpaceDiff_index",
  );

  late final _spaceDiffIndex =
      _spaceDiffIndexPtr.asFunction<_SpaceDiffIndexReturn Function(int)>();
  late final _spaceDiffValuePtr =
      _lookup<ffi.NativeFunction<_SpaceDiffValueReturn Function(ffi.IntPtr)>>(
    "__SpaceDiff_value",
  );

  late final _spaceDiffValue =
      _spaceDiffValuePtr.asFunction<_SpaceDiffValueReturn Function(int)>();
  late final _msgDraftAddMentionPtr = _lookup<
      ffi.NativeFunction<
          _MsgDraftAddMentionReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__MsgDraft_add_mention");

  late final _msgDraftAddMention = _msgDraftAddMentionPtr
      .asFunction<_MsgDraftAddMentionReturn Function(int, int, int, int)>();
  late final _msgDraftAddRefDetailsPtr = _lookup<
      ffi.NativeFunction<
          _MsgDraftAddRefDetailsReturn Function(
              ffi.IntPtr, ffi.IntPtr)>>("__MsgDraft_add_ref_details");

  late final _msgDraftAddRefDetails = _msgDraftAddRefDetailsPtr
      .asFunction<_MsgDraftAddRefDetailsReturn Function(int, int)>();
  late final _msgDraftAddUrlPreviewPtr = _lookup<
      ffi.NativeFunction<
          _MsgDraftAddUrlPreviewReturn Function(
              ffi.IntPtr, ffi.IntPtr)>>("__MsgDraft_add_url_preview");

  late final _msgDraftAddUrlPreview = _msgDraftAddUrlPreviewPtr
      .asFunction<_MsgDraftAddUrlPreviewReturn Function(int, int)>();
  late final _msgDraftAddRoomMentionPtr = _lookup<
      ffi.NativeFunction<
          _MsgDraftAddRoomMentionReturn Function(
              ffi.IntPtr, ffi.Uint8)>>("__MsgDraft_add_room_mention");

  late final _msgDraftAddRoomMention = _msgDraftAddRoomMentionPtr
      .asFunction<_MsgDraftAddRoomMentionReturn Function(int, int)>();
  late final _msgDraftSizePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint64)>>(
    "__MsgDraft_size",
  );

  late final _msgDraftSize =
      _msgDraftSizePtr.asFunction<void Function(int, int)>();
  late final _msgDraftWidthPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint64)>>(
    "__MsgDraft_width",
  );

  late final _msgDraftWidth =
      _msgDraftWidthPtr.asFunction<void Function(int, int)>();
  late final _msgDraftHeightPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint64)>>(
    "__MsgDraft_height",
  );

  late final _msgDraftHeight =
      _msgDraftHeightPtr.asFunction<void Function(int, int)>();
  late final _msgDraftDurationPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint64)>>(
    "__MsgDraft_duration",
  );

  late final _msgDraftDuration =
      _msgDraftDurationPtr.asFunction<void Function(int, int)>();
  late final _msgDraftBlurhashPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__MsgDraft_blurhash");

  late final _msgDraftBlurhash =
      _msgDraftBlurhashPtr.asFunction<void Function(int, int, int, int)>();
  late final _msgDraftThumbnailImagePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__MsgDraft_thumbnail_image");

  late final _msgDraftThumbnailImage = _msgDraftThumbnailImagePtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _msgDraftThumbnailInfoPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.Uint64,
            ffi.Uint8,
            ffi.Uint64,
            ffi.Uint8,
            ffi.Uint64,
          )>>("__MsgDraft_thumbnail_info");

  late final _msgDraftThumbnailInfo = _msgDraftThumbnailInfoPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _msgDraftFilenamePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__MsgDraft_filename");

  late final _msgDraftFilename =
      _msgDraftFilenamePtr.asFunction<void Function(int, int, int, int)>();
  late final _msgDraftIntoNewsSlideDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__MsgDraft_into_news_slide_draft",
  );

  late final _msgDraftIntoNewsSlideDraft =
      _msgDraftIntoNewsSlideDraftPtr.asFunction<int Function(int)>();
  late final _msgDraftIntoStorySlideDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__MsgDraft_into_story_slide_draft",
  );

  late final _msgDraftIntoStorySlideDraft =
      _msgDraftIntoStorySlideDraftPtr.asFunction<int Function(int)>();
  late final _timelineStreamMessagesStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TimelineStream_messages_stream",
  );

  late final _timelineStreamMessagesStream =
      _timelineStreamMessagesStreamPtr.asFunction<int Function(int)>();
  late final _timelineStreamGetMessagePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TimelineStream_get_message");

  late final _timelineStreamGetMessage = _timelineStreamGetMessagePtr
      .asFunction<int Function(int, int, int, int)>();
  late final _timelineStreamFetchDetailsForEventPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TimelineStream_fetch_details_for_event");

  late final _timelineStreamFetchDetailsForEvent =
      _timelineStreamFetchDetailsForEventPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _timelineStreamPaginateBackwardsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint16)>>(
    "__TimelineStream_paginate_backwards",
  );

  late final _timelineStreamPaginateBackwards =
      _timelineStreamPaginateBackwardsPtr.asFunction<int Function(int, int)>();
  late final _timelineStreamSendMessagePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TimelineStream_send_message",
  );

  late final _timelineStreamSendMessage =
      _timelineStreamSendMessagePtr.asFunction<int Function(int, int)>();
  late final _timelineStreamEditMessagePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__TimelineStream_edit_message");

  late final _timelineStreamEditMessage = _timelineStreamEditMessagePtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _timelineStreamReplyMessagePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__TimelineStream_reply_message");

  late final _timelineStreamReplyMessage = _timelineStreamReplyMessagePtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _timelineStreamMarkAsReadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__TimelineStream_mark_as_read",
  );

  late final _timelineStreamMarkAsRead =
      _timelineStreamMarkAsReadPtr.asFunction<int Function(int, int)>();
  late final _timelineStreamToggleReactionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TimelineStream_toggle_reaction");

  late final _timelineStreamToggleReaction = _timelineStreamToggleReactionPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _convoSpaceRelationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_space_relations",
  );

  late final _convoSpaceRelations =
      _convoSpaceRelationsPtr.asFunction<int Function(int)>();
  late final _convoUploadAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_upload_avatar");

  late final _convoUploadAvatar =
      _convoUploadAvatarPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoRemoveAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_remove_avatar",
  );

  late final _convoRemoveAvatar =
      _convoRemoveAvatarPtr.asFunction<int Function(int)>();
  late final _convoTopicPtr =
      _lookup<ffi.NativeFunction<_ConvoTopicReturn Function(ffi.IntPtr)>>(
    "__Convo_topic",
  );

  late final _convoTopic =
      _convoTopicPtr.asFunction<_ConvoTopicReturn Function(int)>();
  late final _convoSetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_name");

  late final _convoSetName =
      _convoSetNamePtr.asFunction<int Function(int, int, int, int)>();
  late final _convoSetTopicPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_topic");

  late final _convoSetTopic =
      _convoSetTopicPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoActiveMembersIdsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_active_members_ids",
  );

  late final _convoActiveMembersIds =
      _convoActiveMembersIdsPtr.asFunction<int Function(int)>();
  late final _convoActiveMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_active_members",
  );

  late final _convoActiveMembers =
      _convoActiveMembersPtr.asFunction<int Function(int)>();
  late final _convoInvitedMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_invited_members",
  );

  late final _convoInvitedMembers =
      _convoInvitedMembersPtr.asFunction<int Function(int)>();
  late final _convoGetMemberPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_get_member");

  late final _convoGetMember =
      _convoGetMemberPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoTimelineStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_timeline_stream",
  );

  late final _convoTimelineStream =
      _convoTimelineStreamPtr.asFunction<int Function(int)>();
  late final _convoNumUnreadNotificationCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Convo_num_unread_notification_count",
  );

  late final _convoNumUnreadNotificationCount =
      _convoNumUnreadNotificationCountPtr.asFunction<int Function(int)>();
  late final _convoNumUnreadMessagesPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Convo_num_unread_messages",
  );

  late final _convoNumUnreadMessages =
      _convoNumUnreadMessagesPtr.asFunction<int Function(int)>();
  late final _convoNumUnreadMentionsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Convo_num_unread_mentions",
  );

  late final _convoNumUnreadMentions =
      _convoNumUnreadMentionsPtr.asFunction<int Function(int)>();
  late final _convoLatestMessagePtr = _lookup<
          ffi.NativeFunction<_ConvoLatestMessageReturn Function(ffi.IntPtr)>>(
      "__Convo_latest_message");

  late final _convoLatestMessage = _convoLatestMessagePtr
      .asFunction<_ConvoLatestMessageReturn Function(int)>();
  late final _convoLatestMessageTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Convo_latest_message_ts",
  );

  late final _convoLatestMessageTs =
      _convoLatestMessageTsPtr.asFunction<int Function(int)>();
  late final _convoGetMyMembershipPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_get_my_membership",
  );

  late final _convoGetMyMembership =
      _convoGetMyMembershipPtr.asFunction<int Function(int)>();
  late final _convoGetRoomIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_get_room_id",
  );

  late final _convoGetRoomId =
      _convoGetRoomIdPtr.asFunction<int Function(int)>();
  late final _convoGetRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_ConvoGetRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__Convo_get_room_id_str");

  late final _convoGetRoomIdStr = _convoGetRoomIdStrPtr
      .asFunction<_ConvoGetRoomIdStrReturn Function(int)>();
  late final _convoTypingNoticePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__Convo_typing_notice",
  );

  late final _convoTypingNotice =
      _convoTypingNoticePtr.asFunction<int Function(int, int)>();
  late final _convoMediaBinaryPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
          )>>("__Convo_media_binary");

  late final _convoMediaBinary = _convoMediaBinaryPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _convoIsDmPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Convo_is_dm",
  );

  late final _convoIsDm = _convoIsDmPtr.asFunction<int Function(int)>();
  late final _convoIsBookmarkedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Convo_is_bookmarked",
  );

  late final _convoIsBookmarked =
      _convoIsBookmarkedPtr.asFunction<int Function(int)>();
  late final _convoSetBookmarkedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__Convo_set_bookmarked",
  );

  late final _convoSetBookmarked =
      _convoSetBookmarkedPtr.asFunction<int Function(int, int)>();
  late final _convoIsLowPriorityPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Convo_is_low_priority",
  );

  late final _convoIsLowPriority =
      _convoIsLowPriorityPtr.asFunction<int Function(int)>();
  late final _convoDmUsersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_dm_users",
  );

  late final _convoDmUsers = _convoDmUsersPtr.asFunction<int Function(int)>();
  late final _convoInviteUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_invite_user");

  late final _convoInviteUser =
      _convoInviteUserPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoPermalinkPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_permalink",
  );

  late final _convoPermalink =
      _convoPermalinkPtr.asFunction<int Function(int)>();
  late final _convoJoinPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_join",
  );

  late final _convoJoin = _convoJoinPtr.asFunction<int Function(int)>();
  late final _convoLeavePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_leave",
  );

  late final _convoLeave = _convoLeavePtr.asFunction<int Function(int)>();
  late final _convoGetInviteesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_get_invitees",
  );

  late final _convoGetInvitees =
      _convoGetInviteesPtr.asFunction<int Function(int)>();
  late final _convoDownloadMediaPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_download_media");

  late final _convoDownloadMedia = _convoDownloadMediaPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int, int)>();
  late final _convoMediaPathPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__Convo_media_path");

  late final _convoMediaPath =
      _convoMediaPathPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _convoIsEncryptedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_is_encrypted",
  );

  late final _convoIsEncrypted =
      _convoIsEncryptedPtr.asFunction<int Function(int)>();
  late final _convoRedactMessagePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_redact_message");

  late final _convoRedactMessage = _convoRedactMessagePtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _convoUpdatePowerLevelPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Int32,
          )>>("__Convo_update_power_level");

  late final _convoUpdatePowerLevel = _convoUpdatePowerLevelPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _convoReportContentPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Int32,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_report_content");

  late final _convoReportContent = _convoReportContentPtr.asFunction<
      int Function(int, int, int, int, int, int, int, int, int, int)>();
  late final _convoRedactContentPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_redact_content");

  late final _convoRedactContent = _convoRedactContentPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _convoIsJoinedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Convo_is_joined",
  );

  late final _convoIsJoined = _convoIsJoinedPtr.asFunction<int Function(int)>();
  late final _convoMsgDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_msg_draft",
  );

  late final _convoMsgDraft = _convoMsgDraftPtr.asFunction<int Function(int)>();
  late final _convoSaveMsgDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_save_msg_draft");

  late final _convoSaveMsgDraft = _convoSaveMsgDraftPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _convoClearMsgDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_clear_msg_draft",
  );

  late final _convoClearMsgDraft =
      _convoClearMsgDraftPtr.asFunction<int Function(int)>();
  late final _convoRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Convo_ref_details",
  );

  late final _convoRefDetails =
      _convoRefDetailsPtr.asFunction<int Function(int)>();
  late final _convoSetPolicyRuleRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_set_policy_rule_room");

  late final _convoSetPolicyRuleRoom = _convoSetPolicyRuleRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _convoSetPolicyRuleServerPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_set_policy_rule_server");

  late final _convoSetPolicyRuleServer = _convoSetPolicyRuleServerPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _convoSetPolicyRuleUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_set_policy_rule_user");

  late final _convoSetPolicyRuleUser = _convoSetPolicyRuleUserPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _convoSetEncryptionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_encryption");

  late final _convoSetEncryption =
      _convoSetEncryptionPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoSetGuestAccessPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_guest_access");

  late final _convoSetGuestAccess =
      _convoSetGuestAccessPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoSetHistoryVisibilityPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_history_visibility");

  late final _convoSetHistoryVisibility = _convoSetHistoryVisibilityPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _convoSetJoinRulesPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_join_rules");

  late final _convoSetJoinRules =
      _convoSetJoinRulesPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoSetPinnedEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Convo_set_pinned_events");

  late final _convoSetPinnedEvents =
      _convoSetPinnedEventsPtr.asFunction<int Function(int, int, int, int)>();
  late final _convoSetPowerLevelsBanPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_ban",
  );

  late final _convoSetPowerLevelsBan =
      _convoSetPowerLevelsBanPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Int32,
          )>>("__Convo_set_power_levels_events");

  late final _convoSetPowerLevelsEvents = _convoSetPowerLevelsEventsPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _convoSetPowerLevelsEventsDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_events_default",
  );

  late final _convoSetPowerLevelsEventsDefault =
      _convoSetPowerLevelsEventsDefaultPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsInvitePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_invite",
  );

  late final _convoSetPowerLevelsInvite =
      _convoSetPowerLevelsInvitePtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsKickPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_kick",
  );

  late final _convoSetPowerLevelsKick =
      _convoSetPowerLevelsKickPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_redact",
  );

  late final _convoSetPowerLevelsRedact =
      _convoSetPowerLevelsRedactPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsStateDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_state_default",
  );

  late final _convoSetPowerLevelsStateDefault =
      _convoSetPowerLevelsStateDefaultPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsUsersDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_users_default",
  );

  late final _convoSetPowerLevelsUsersDefault =
      _convoSetPowerLevelsUsersDefaultPtr.asFunction<int Function(int, int)>();
  late final _convoSetPowerLevelsNotificationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Convo_set_power_levels_notifications",
  );

  late final _convoSetPowerLevelsNotifications =
      _convoSetPowerLevelsNotificationsPtr.asFunction<int Function(int, int)>();
  late final _convoSetServerAclPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_set_server_acl");

  late final _convoSetServerAcl = _convoSetServerAclPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _convoSetTombstonePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Convo_set_tombstone");

  late final _convoSetTombstone = _convoSetTombstonePtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _commentDraftContentTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CommentDraft_content_text");

  late final _commentDraftContentText = _commentDraftContentTextPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _commentDraftContentFormattedPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CommentDraft_content_formatted");

  late final _commentDraftContentFormatted = _commentDraftContentFormattedPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _commentDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CommentDraft_send",
  );

  late final _commentDraftSend =
      _commentDraftSendPtr.asFunction<int Function(int)>();
  late final _commentSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Comment_sender",
  );

  late final _commentSender = _commentSenderPtr.asFunction<int Function(int)>();
  late final _commentOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Comment_origin_server_ts",
  );

  late final _commentOriginServerTs =
      _commentOriginServerTsPtr.asFunction<int Function(int)>();
  late final _commentMsgContentPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Comment_msg_content",
  );

  late final _commentMsgContent =
      _commentMsgContentPtr.asFunction<int Function(int)>();
  late final _commentReplyBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Comment_reply_builder",
  );

  late final _commentReplyBuilder =
      _commentReplyBuilderPtr.asFunction<int Function(int)>();
  late final _commentCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Comment_can_redact",
  );

  late final _commentCanRedact =
      _commentCanRedactPtr.asFunction<int Function(int)>();
  late final _commentsManagerCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CommentsManager_comments",
  );

  late final _commentsManagerComments =
      _commentsManagerCommentsPtr.asFunction<int Function(int)>();
  late final _commentsManagerRoomIdStrPtr = _lookup<
      ffi.NativeFunction<
          _CommentsManagerRoomIdStrReturn Function(
              ffi.IntPtr)>>("__CommentsManager_room_id_str");

  late final _commentsManagerRoomIdStr = _commentsManagerRoomIdStrPtr
      .asFunction<_CommentsManagerRoomIdStrReturn Function(int)>();
  late final _commentsManagerObjectIdStrPtr = _lookup<
      ffi.NativeFunction<
          _CommentsManagerObjectIdStrReturn Function(
              ffi.IntPtr)>>("__CommentsManager_object_id_str");

  late final _commentsManagerObjectIdStr = _commentsManagerObjectIdStrPtr
      .asFunction<_CommentsManagerObjectIdStrReturn Function(int)>();
  late final _commentsManagerHasCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__CommentsManager_has_comments",
  );

  late final _commentsManagerHasComments =
      _commentsManagerHasCommentsPtr.asFunction<int Function(int)>();
  late final _commentsManagerCommentsCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__CommentsManager_comments_count",
  );

  late final _commentsManagerCommentsCount =
      _commentsManagerCommentsCountPtr.asFunction<int Function(int)>();
  late final _commentsManagerCommentDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CommentsManager_comment_draft",
  );

  late final _commentsManagerCommentDraft =
      _commentsManagerCommentDraftPtr.asFunction<int Function(int)>();
  late final _commentsManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CommentsManager_subscribe_stream",
  );

  late final _commentsManagerSubscribeStream =
      _commentsManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _commentsManagerReloadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__CommentsManager_reload",
  );

  late final _commentsManagerReload =
      _commentsManagerReloadPtr.asFunction<int Function(int)>();
  late final _objectInvitationsManagerInvitedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ObjectInvitationsManager_invited",
  );

  late final _objectInvitationsManagerInvited =
      _objectInvitationsManagerInvitedPtr.asFunction<int Function(int)>();
  late final _objectInvitationsManagerHasInvitationsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ObjectInvitationsManager_has_invitations",
  );

  late final _objectInvitationsManagerHasInvitations =
      _objectInvitationsManagerHasInvitationsPtr
          .asFunction<int Function(int)>();
  late final _objectInvitationsManagerIsInvitedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ObjectInvitationsManager_is_invited",
  );

  late final _objectInvitationsManagerIsInvited =
      _objectInvitationsManagerIsInvitedPtr.asFunction<int Function(int)>();
  late final _objectInvitationsManagerInvitePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__ObjectInvitationsManager_invite");

  late final _objectInvitationsManagerInvite =
      _objectInvitationsManagerInvitePtr
          .asFunction<int Function(int, int, int, int)>();
  late final _objectInvitationsManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ObjectInvitationsManager_subscribe_stream",
  );

  late final _objectInvitationsManagerSubscribeStream =
      _objectInvitationsManagerSubscribeStreamPtr
          .asFunction<int Function(int)>();
  late final _objectInvitationsManagerReloadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ObjectInvitationsManager_reload",
  );

  late final _objectInvitationsManagerReload =
      _objectInvitationsManagerReloadPtr.asFunction<int Function(int)>();
  late final _attachmentDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__AttachmentDraft_send",
  );

  late final _attachmentDraftSend =
      _attachmentDraftSendPtr.asFunction<int Function(int)>();
  late final _attachmentNamePtr =
      _lookup<ffi.NativeFunction<_AttachmentNameReturn Function(ffi.IntPtr)>>(
    "__Attachment_name",
  );

  late final _attachmentName =
      _attachmentNamePtr.asFunction<_AttachmentNameReturn Function(int)>();
  late final _attachmentSenderPtr =
      _lookup<ffi.NativeFunction<_AttachmentSenderReturn Function(ffi.IntPtr)>>(
    "__Attachment_sender",
  );

  late final _attachmentSender =
      _attachmentSenderPtr.asFunction<_AttachmentSenderReturn Function(int)>();
  late final _attachmentOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Attachment_origin_server_ts",
  );

  late final _attachmentOriginServerTs =
      _attachmentOriginServerTsPtr.asFunction<int Function(int)>();
  late final _attachmentAttachmentIdStrPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentAttachmentIdStrReturn Function(
              ffi.IntPtr)>>("__Attachment_attachment_id_str");

  late final _attachmentAttachmentIdStr = _attachmentAttachmentIdStrPtr
      .asFunction<_AttachmentAttachmentIdStrReturn Function(int)>();
  late final _attachmentRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_AttachmentRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__Attachment_room_id_str");

  late final _attachmentRoomIdStr = _attachmentRoomIdStrPtr
      .asFunction<_AttachmentRoomIdStrReturn Function(int)>();
  late final _attachmentTypeStrPtr = _lookup<
          ffi.NativeFunction<_AttachmentTypeStrReturn Function(ffi.IntPtr)>>(
      "__Attachment_type_str");

  late final _attachmentTypeStr = _attachmentTypeStrPtr
      .asFunction<_AttachmentTypeStrReturn Function(int)>();
  late final _attachmentMsgContentPtr = _lookup<
          ffi.NativeFunction<_AttachmentMsgContentReturn Function(ffi.IntPtr)>>(
      "__Attachment_msg_content");

  late final _attachmentMsgContent = _attachmentMsgContentPtr
      .asFunction<_AttachmentMsgContentReturn Function(int)>();
  late final _attachmentRefDetailsPtr = _lookup<
          ffi.NativeFunction<_AttachmentRefDetailsReturn Function(ffi.IntPtr)>>(
      "__Attachment_ref_details");

  late final _attachmentRefDetails = _attachmentRefDetailsPtr
      .asFunction<_AttachmentRefDetailsReturn Function(int)>();
  late final _attachmentLinkPtr =
      _lookup<ffi.NativeFunction<_AttachmentLinkReturn Function(ffi.IntPtr)>>(
    "__Attachment_link",
  );

  late final _attachmentLink =
      _attachmentLinkPtr.asFunction<_AttachmentLinkReturn Function(int)>();
  late final _attachmentDownloadMediaPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Attachment_download_media");

  late final _attachmentDownloadMedia = _attachmentDownloadMediaPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _attachmentMediaPathPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__Attachment_media_path",
  );

  late final _attachmentMediaPath =
      _attachmentMediaPathPtr.asFunction<int Function(int, int)>();
  late final _attachmentCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Attachment_can_redact",
  );

  late final _attachmentCanRedact =
      _attachmentCanRedactPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerRoomIdStrPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerRoomIdStrReturn Function(
              ffi.IntPtr)>>("__AttachmentsManager_room_id_str");

  late final _attachmentsManagerRoomIdStr = _attachmentsManagerRoomIdStrPtr
      .asFunction<_AttachmentsManagerRoomIdStrReturn Function(int)>();
  late final _attachmentsManagerObjectIdStrPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerObjectIdStrReturn Function(
              ffi.IntPtr)>>("__AttachmentsManager_object_id_str");

  late final _attachmentsManagerObjectIdStr = _attachmentsManagerObjectIdStrPtr
      .asFunction<_AttachmentsManagerObjectIdStrReturn Function(int)>();
  late final _attachmentsManagerCanEditAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__AttachmentsManager_can_edit_attachments",
  );

  late final _attachmentsManagerCanEditAttachments =
      _attachmentsManagerCanEditAttachmentsPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__AttachmentsManager_attachments",
  );

  late final _attachmentsManagerAttachments =
      _attachmentsManagerAttachmentsPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerHasAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__AttachmentsManager_has_attachments",
  );

  late final _attachmentsManagerHasAttachments =
      _attachmentsManagerHasAttachmentsPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerAttachmentsCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__AttachmentsManager_attachments_count",
  );

  late final _attachmentsManagerAttachmentsCount =
      _attachmentsManagerAttachmentsCountPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerContentDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__AttachmentsManager_content_draft",
  );

  late final _attachmentsManagerContentDraft =
      _attachmentsManagerContentDraftPtr.asFunction<int Function(int, int)>();
  late final _attachmentsManagerLinkDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__AttachmentsManager_link_draft");

  late final _attachmentsManagerLinkDraft = _attachmentsManagerLinkDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _attachmentsManagerReferenceDraftPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__AttachmentsManager_reference_draft",
  );

  late final _attachmentsManagerReferenceDraft =
      _attachmentsManagerReferenceDraftPtr.asFunction<int Function(int, int)>();
  late final _attachmentsManagerReloadPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__AttachmentsManager_reload",
  );

  late final _attachmentsManagerReload =
      _attachmentsManagerReloadPtr.asFunction<int Function(int)>();
  late final _attachmentsManagerRedactPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__AttachmentsManager_redact");

  late final _attachmentsManagerRedact =
      _attachmentsManagerRedactPtr.asFunction<
          int Function(
              int, int, int, int, int, int, int, int, int, int, int, int)>();
  late final _attachmentsManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__AttachmentsManager_subscribe_stream",
  );

  late final _attachmentsManagerSubscribeStream =
      _attachmentsManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _taskTitlePtr =
      _lookup<ffi.NativeFunction<_TaskTitleReturn Function(ffi.IntPtr)>>(
    "__Task_title",
  );

  late final _taskTitle =
      _taskTitlePtr.asFunction<_TaskTitleReturn Function(int)>();
  late final _taskEventIdStrPtr =
      _lookup<ffi.NativeFunction<_TaskEventIdStrReturn Function(ffi.IntPtr)>>(
    "__Task_event_id_str",
  );

  late final _taskEventIdStr =
      _taskEventIdStrPtr.asFunction<_TaskEventIdStrReturn Function(int)>();
  late final _taskRoomIdStrPtr =
      _lookup<ffi.NativeFunction<_TaskRoomIdStrReturn Function(ffi.IntPtr)>>(
    "__Task_room_id_str",
  );

  late final _taskRoomIdStr =
      _taskRoomIdStrPtr.asFunction<_TaskRoomIdStrReturn Function(int)>();
  late final _taskTaskListIdStrPtr = _lookup<
          ffi.NativeFunction<_TaskTaskListIdStrReturn Function(ffi.IntPtr)>>(
      "__Task_task_list_id_str");

  late final _taskTaskListIdStr = _taskTaskListIdStrPtr
      .asFunction<_TaskTaskListIdStrReturn Function(int)>();
  late final _taskDescriptionPtr =
      _lookup<ffi.NativeFunction<_TaskDescriptionReturn Function(ffi.IntPtr)>>(
    "__Task_description",
  );

  late final _taskDescription =
      _taskDescriptionPtr.asFunction<_TaskDescriptionReturn Function(int)>();
  late final _taskAuthorStrPtr =
      _lookup<ffi.NativeFunction<_TaskAuthorStrReturn Function(ffi.IntPtr)>>(
    "__Task_author_str",
  );

  late final _taskAuthorStr =
      _taskAuthorStrPtr.asFunction<_TaskAuthorStrReturn Function(int)>();
  late final _taskAssigneesStrPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_assignees_str",
  );

  late final _taskAssigneesStr =
      _taskAssigneesStrPtr.asFunction<int Function(int)>();
  late final _taskSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__Task_sort_order",
  );

  late final _taskSortOrder = _taskSortOrderPtr.asFunction<int Function(int)>();
  late final _taskPriorityPtr =
      _lookup<ffi.NativeFunction<_TaskPriorityReturn Function(ffi.IntPtr)>>(
    "__Task_priority",
  );

  late final _taskPriority =
      _taskPriorityPtr.asFunction<_TaskPriorityReturn Function(int)>();
  late final _taskDueDatePtr =
      _lookup<ffi.NativeFunction<_TaskDueDateReturn Function(ffi.IntPtr)>>(
    "__Task_due_date",
  );

  late final _taskDueDate =
      _taskDueDatePtr.asFunction<_TaskDueDateReturn Function(int)>();
  late final _taskUtcDueTimeOfDayPtr = _lookup<
          ffi.NativeFunction<_TaskUtcDueTimeOfDayReturn Function(ffi.IntPtr)>>(
      "__Task_utc_due_time_of_day");

  late final _taskUtcDueTimeOfDay = _taskUtcDueTimeOfDayPtr
      .asFunction<_TaskUtcDueTimeOfDayReturn Function(int)>();
  late final _taskUtcStartRfc3339Ptr = _lookup<
          ffi.NativeFunction<_TaskUtcStartRfc3339Return Function(ffi.IntPtr)>>(
      "__Task_utc_start_rfc3339");

  late final _taskUtcStartRfc3339 = _taskUtcStartRfc3339Ptr
      .asFunction<_TaskUtcStartRfc3339Return Function(int)>();
  late final _taskDisplayPtr =
      _lookup<ffi.NativeFunction<_TaskDisplayReturn Function(ffi.IntPtr)>>(
    "__Task_display",
  );

  late final _taskDisplay =
      _taskDisplayPtr.asFunction<_TaskDisplayReturn Function(int)>();
  late final _taskIsDonePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Task_is_done",
  );

  late final _taskIsDone = _taskIsDonePtr.asFunction<int Function(int)>();
  late final _taskProgressPercentPtr = _lookup<
          ffi.NativeFunction<_TaskProgressPercentReturn Function(ffi.IntPtr)>>(
      "__Task_progress_percent");

  late final _taskProgressPercent = _taskProgressPercentPtr
      .asFunction<_TaskProgressPercentReturn Function(int)>();
  late final _taskKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_keywords",
  );

  late final _taskKeywords = _taskKeywordsPtr.asFunction<int Function(int)>();
  late final _taskCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_categories",
  );

  late final _taskCategories =
      _taskCategoriesPtr.asFunction<int Function(int)>();
  late final _taskUpdateBuilderPtr = _lookup<
          ffi.NativeFunction<_TaskUpdateBuilderReturn Function(ffi.IntPtr)>>(
      "__Task_update_builder");

  late final _taskUpdateBuilder = _taskUpdateBuilderPtr
      .asFunction<_TaskUpdateBuilderReturn Function(int)>();
  late final _taskIsAssignedToMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Task_is_assigned_to_me",
  );

  late final _taskIsAssignedToMe =
      _taskIsAssignedToMePtr.asFunction<int Function(int)>();
  late final _taskAssignSelfPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_assign_self",
  );

  late final _taskAssignSelf =
      _taskAssignSelfPtr.asFunction<int Function(int)>();
  late final _taskUnassignSelfPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_unassign_self",
  );

  late final _taskUnassignSelf =
      _taskUnassignSelfPtr.asFunction<int Function(int)>();
  late final _taskSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_subscribe_stream",
  );

  late final _taskSubscribeStream =
      _taskSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _taskRefreshPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_refresh",
  );

  late final _taskRefresh = _taskRefreshPtr.asFunction<int Function(int)>();
  late final _taskCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_can_redact",
  );

  late final _taskCanRedact = _taskCanRedactPtr.asFunction<int Function(int)>();
  late final _taskCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_comments",
  );

  late final _taskComments = _taskCommentsPtr.asFunction<int Function(int)>();
  late final _taskAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_attachments",
  );

  late final _taskAttachments =
      _taskAttachmentsPtr.asFunction<int Function(int)>();
  late final _taskInvitationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Task_invitations",
  );

  late final _taskInvitations =
      _taskInvitationsPtr.asFunction<int Function(int)>();
  late final _taskUpdateBuilderTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskUpdateBuilder_title");

  late final _taskUpdateBuilderTitle = _taskUpdateBuilderTitlePtr
      .asFunction<void Function(int, int, int, int)>();
  late final _taskUpdateBuilderUnsetTitleUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_title_update",
  );

  late final _taskUpdateBuilderUnsetTitleUpdate =
      _taskUpdateBuilderUnsetTitleUpdatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskUpdateBuilder_description_text");

  late final _taskUpdateBuilderDescriptionText =
      _taskUpdateBuilderDescriptionTextPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _taskUpdateBuilderDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskUpdateBuilder_description_html");

  late final _taskUpdateBuilderDescriptionHtml =
      _taskUpdateBuilderDescriptionHtmlPtr
          .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _taskUpdateBuilderUnsetDescriptionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_description",
  );

  late final _taskUpdateBuilderUnsetDescription =
      _taskUpdateBuilderUnsetDescriptionPtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetDescriptionUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_description_update",
  );

  late final _taskUpdateBuilderUnsetDescriptionUpdate =
      _taskUpdateBuilderUnsetDescriptionUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__TaskUpdateBuilder_sort_order",
  );

  late final _taskUpdateBuilderSortOrder =
      _taskUpdateBuilderSortOrderPtr.asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetSortOrderUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_sort_order_update",
  );

  late final _taskUpdateBuilderUnsetSortOrderUpdate =
      _taskUpdateBuilderUnsetSortOrderUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskUpdateBuilder_display",
  );

  late final _taskUpdateBuilderDisplay =
      _taskUpdateBuilderDisplayPtr.asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_display",
  );

  late final _taskUpdateBuilderUnsetDisplay =
      _taskUpdateBuilderUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetDisplayUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_display_update",
  );

  late final _taskUpdateBuilderUnsetDisplayUpdate =
      _taskUpdateBuilderUnsetDisplayUpdatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderDueDatePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Int32, ffi.Uint32,
              ffi.Uint32)>>("__TaskUpdateBuilder_due_date");

  late final _taskUpdateBuilderDueDate = _taskUpdateBuilderDueDatePtr
      .asFunction<void Function(int, int, int, int)>();
  late final _taskUpdateBuilderUnsetDueDatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_due_date",
  );

  late final _taskUpdateBuilderUnsetDueDate =
      _taskUpdateBuilderUnsetDueDatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetDueDateUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_due_date_update",
  );

  late final _taskUpdateBuilderUnsetDueDateUpdate =
      _taskUpdateBuilderUnsetDueDateUpdatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUtcDueTimeOfDayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Int32)>>(
    "__TaskUpdateBuilder_utc_due_time_of_day",
  );

  late final _taskUpdateBuilderUtcDueTimeOfDay =
      _taskUpdateBuilderUtcDueTimeOfDayPtr
          .asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetUtcDueTimeOfDayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_utc_due_time_of_day",
  );

  late final _taskUpdateBuilderUnsetUtcDueTimeOfDay =
      _taskUpdateBuilderUnsetUtcDueTimeOfDayPtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetUtcDueTimeOfDayUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_utc_due_time_of_day_update",
  );

  late final _taskUpdateBuilderUnsetUtcDueTimeOfDayUpdate =
      _taskUpdateBuilderUnsetUtcDueTimeOfDayUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderUtcStartFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _TaskUpdateBuilderUtcStartFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskUpdateBuilder_utc_start_from_rfc3339");

  late final _taskUpdateBuilderUtcStartFromRfc3339 =
      _taskUpdateBuilderUtcStartFromRfc3339Ptr.asFunction<
          _TaskUpdateBuilderUtcStartFromRfc3339Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _taskUpdateBuilderUtcStartFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _TaskUpdateBuilderUtcStartFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskUpdateBuilder_utc_start_from_rfc2822");

  late final _taskUpdateBuilderUtcStartFromRfc2822 =
      _taskUpdateBuilderUtcStartFromRfc2822Ptr.asFunction<
          _TaskUpdateBuilderUtcStartFromRfc2822Return Function(
            int,
            int,
            int,
            int,
          )>();
  late final _taskUpdateBuilderUtcStartFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _TaskUpdateBuilderUtcStartFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskUpdateBuilder_utc_start_from_format");

  late final _taskUpdateBuilderUtcStartFromFormat =
      _taskUpdateBuilderUtcStartFromFormatPtr.asFunction<
          _TaskUpdateBuilderUtcStartFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _taskUpdateBuilderUnsetUtcStartPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_utc_start",
  );

  late final _taskUpdateBuilderUnsetUtcStart =
      _taskUpdateBuilderUnsetUtcStartPtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetUtcStartUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_utc_start_update",
  );

  late final _taskUpdateBuilderUnsetUtcStartUpdate =
      _taskUpdateBuilderUnsetUtcStartUpdatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderProgressPercentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__TaskUpdateBuilder_progress_percent",
  );

  late final _taskUpdateBuilderProgressPercent =
      _taskUpdateBuilderProgressPercentPtr
          .asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetProgressPercentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_progress_percent",
  );

  late final _taskUpdateBuilderUnsetProgressPercent =
      _taskUpdateBuilderUnsetProgressPercentPtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetProgressPercentUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_progress_percent_update",
  );

  late final _taskUpdateBuilderUnsetProgressPercentUpdate =
      _taskUpdateBuilderUnsetProgressPercentUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskUpdateBuilder_keywords",
  );

  late final _taskUpdateBuilderKeywords =
      _taskUpdateBuilderKeywordsPtr.asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_keywords",
  );

  late final _taskUpdateBuilderUnsetKeywords =
      _taskUpdateBuilderUnsetKeywordsPtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetKeywordsUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_keywords_update",
  );

  late final _taskUpdateBuilderUnsetKeywordsUpdate =
      _taskUpdateBuilderUnsetKeywordsUpdatePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskUpdateBuilder_categories",
  );

  late final _taskUpdateBuilderCategories =
      _taskUpdateBuilderCategoriesPtr.asFunction<void Function(int, int)>();
  late final _taskUpdateBuilderUnsetCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_categories",
  );

  late final _taskUpdateBuilderUnsetCategories =
      _taskUpdateBuilderUnsetCategoriesPtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderUnsetCategoriesUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_unset_categories_update",
  );

  late final _taskUpdateBuilderUnsetCategoriesUpdate =
      _taskUpdateBuilderUnsetCategoriesUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskUpdateBuilderMarkDonePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_mark_done",
  );

  late final _taskUpdateBuilderMarkDone =
      _taskUpdateBuilderMarkDonePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderMarkUndonePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_mark_undone",
  );

  late final _taskUpdateBuilderMarkUndone =
      _taskUpdateBuilderMarkUndonePtr.asFunction<void Function(int)>();
  late final _taskUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskUpdateBuilder_send",
  );

  late final _taskUpdateBuilderSend =
      _taskUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _taskDraftTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskDraft_title");

  late final _taskDraftTitle =
      _taskDraftTitlePtr.asFunction<void Function(int, int, int, int)>();
  late final _taskDraftDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskDraft_description_text");

  late final _taskDraftDescriptionText = _taskDraftDescriptionTextPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _taskDraftDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskDraft_description_html");

  late final _taskDraftDescriptionHtml = _taskDraftDescriptionHtmlPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _taskDraftUnsetDescriptionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_description",
  );

  late final _taskDraftUnsetDescription =
      _taskDraftUnsetDescriptionPtr.asFunction<void Function(int)>();
  late final _taskDraftSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__TaskDraft_sort_order",
  );

  late final _taskDraftSortOrder =
      _taskDraftSortOrderPtr.asFunction<void Function(int, int)>();
  late final _taskDraftDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskDraft_display",
  );

  late final _taskDraftDisplay =
      _taskDraftDisplayPtr.asFunction<void Function(int, int)>();
  late final _taskDraftUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_display",
  );

  late final _taskDraftUnsetDisplay =
      _taskDraftUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _taskDraftDueDatePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Int32, ffi.Uint32,
              ffi.Uint32)>>("__TaskDraft_due_date");

  late final _taskDraftDueDate =
      _taskDraftDueDatePtr.asFunction<void Function(int, int, int, int)>();
  late final _taskDraftUnsetDueDatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_due_date",
  );

  late final _taskDraftUnsetDueDate =
      _taskDraftUnsetDueDatePtr.asFunction<void Function(int)>();
  late final _taskDraftUtcDueTimeOfDayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Int32)>>(
    "__TaskDraft_utc_due_time_of_day",
  );

  late final _taskDraftUtcDueTimeOfDay =
      _taskDraftUtcDueTimeOfDayPtr.asFunction<void Function(int, int)>();
  late final _taskDraftUnsetUtcDueTimeOfDayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_utc_due_time_of_day",
  );

  late final _taskDraftUnsetUtcDueTimeOfDay =
      _taskDraftUnsetUtcDueTimeOfDayPtr.asFunction<void Function(int)>();
  late final _taskDraftUtcStartFromRfc3339Ptr = _lookup<
      ffi.NativeFunction<
          _TaskDraftUtcStartFromRfc3339Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskDraft_utc_start_from_rfc3339");

  late final _taskDraftUtcStartFromRfc3339 =
      _taskDraftUtcStartFromRfc3339Ptr.asFunction<
          _TaskDraftUtcStartFromRfc3339Return Function(int, int, int, int)>();
  late final _taskDraftUtcStartFromRfc2822Ptr = _lookup<
      ffi.NativeFunction<
          _TaskDraftUtcStartFromRfc2822Return Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskDraft_utc_start_from_rfc2822");

  late final _taskDraftUtcStartFromRfc2822 =
      _taskDraftUtcStartFromRfc2822Ptr.asFunction<
          _TaskDraftUtcStartFromRfc2822Return Function(int, int, int, int)>();
  late final _taskDraftUtcStartFromFormatPtr = _lookup<
      ffi.NativeFunction<
          _TaskDraftUtcStartFromFormatReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskDraft_utc_start_from_format");

  late final _taskDraftUtcStartFromFormat =
      _taskDraftUtcStartFromFormatPtr.asFunction<
          _TaskDraftUtcStartFromFormatReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _taskDraftUnsetUtcStartPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_utc_start",
  );

  late final _taskDraftUnsetUtcStart =
      _taskDraftUnsetUtcStartPtr.asFunction<void Function(int)>();
  late final _taskDraftProgressPercentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__TaskDraft_progress_percent",
  );

  late final _taskDraftProgressPercent =
      _taskDraftProgressPercentPtr.asFunction<void Function(int, int)>();
  late final _taskDraftUnsetProgressPercentPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_progress_percent",
  );

  late final _taskDraftUnsetProgressPercent =
      _taskDraftUnsetProgressPercentPtr.asFunction<void Function(int)>();
  late final _taskDraftKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskDraft_keywords",
  );

  late final _taskDraftKeywords =
      _taskDraftKeywordsPtr.asFunction<void Function(int, int)>();
  late final _taskDraftUnsetKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_keywords",
  );

  late final _taskDraftUnsetKeywords =
      _taskDraftUnsetKeywordsPtr.asFunction<void Function(int)>();
  late final _taskDraftCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskDraft_categories",
  );

  late final _taskDraftCategories =
      _taskDraftCategoriesPtr.asFunction<void Function(int, int)>();
  late final _taskDraftUnsetCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskDraft_unset_categories",
  );

  late final _taskDraftUnsetCategories =
      _taskDraftUnsetCategoriesPtr.asFunction<void Function(int)>();
  late final _taskDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskDraft_send",
  );

  late final _taskDraftSend = _taskDraftSendPtr.asFunction<int Function(int)>();
  late final _taskListNamePtr =
      _lookup<ffi.NativeFunction<_TaskListNameReturn Function(ffi.IntPtr)>>(
    "__TaskList_name",
  );

  late final _taskListName =
      _taskListNamePtr.asFunction<_TaskListNameReturn Function(int)>();
  late final _taskListEventIdStrPtr = _lookup<
          ffi.NativeFunction<_TaskListEventIdStrReturn Function(ffi.IntPtr)>>(
      "__TaskList_event_id_str");

  late final _taskListEventIdStr = _taskListEventIdStrPtr
      .asFunction<_TaskListEventIdStrReturn Function(int)>();
  late final _taskListDescriptionPtr = _lookup<
          ffi.NativeFunction<_TaskListDescriptionReturn Function(ffi.IntPtr)>>(
      "__TaskList_description");

  late final _taskListDescription = _taskListDescriptionPtr
      .asFunction<_TaskListDescriptionReturn Function(int)>();
  late final _taskListRolePtr =
      _lookup<ffi.NativeFunction<_TaskListRoleReturn Function(ffi.IntPtr)>>(
    "__TaskList_role",
  );

  late final _taskListRole =
      _taskListRolePtr.asFunction<_TaskListRoleReturn Function(int)>();
  late final _taskListSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__TaskList_sort_order",
  );

  late final _taskListSortOrder =
      _taskListSortOrderPtr.asFunction<int Function(int)>();
  late final _taskListDisplayPtr =
      _lookup<ffi.NativeFunction<_TaskListDisplayReturn Function(ffi.IntPtr)>>(
    "__TaskList_display",
  );

  late final _taskListDisplay =
      _taskListDisplayPtr.asFunction<_TaskListDisplayReturn Function(int)>();
  late final _taskListTimeZonePtr =
      _lookup<ffi.NativeFunction<_TaskListTimeZoneReturn Function(ffi.IntPtr)>>(
    "__TaskList_time_zone",
  );

  late final _taskListTimeZone =
      _taskListTimeZonePtr.asFunction<_TaskListTimeZoneReturn Function(int)>();
  late final _taskListKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_keywords",
  );

  late final _taskListKeywords =
      _taskListKeywordsPtr.asFunction<int Function(int)>();
  late final _taskListCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_categories",
  );

  late final _taskListCategories =
      _taskListCategoriesPtr.asFunction<int Function(int)>();
  late final _taskListTasksPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_tasks",
  );

  late final _taskListTasks = _taskListTasksPtr.asFunction<int Function(int)>();
  late final _taskListTaskPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskList_task");

  late final _taskListTask =
      _taskListTaskPtr.asFunction<int Function(int, int, int, int)>();
  late final _taskListTaskBuilderPtr = _lookup<
          ffi.NativeFunction<_TaskListTaskBuilderReturn Function(ffi.IntPtr)>>(
      "__TaskList_task_builder");

  late final _taskListTaskBuilder = _taskListTaskBuilderPtr
      .asFunction<_TaskListTaskBuilderReturn Function(int)>();
  late final _taskListUpdateBuilderPtr = _lookup<
          ffi
          .NativeFunction<_TaskListUpdateBuilderReturn Function(ffi.IntPtr)>>(
      "__TaskList_update_builder");

  late final _taskListUpdateBuilder = _taskListUpdateBuilderPtr
      .asFunction<_TaskListUpdateBuilderReturn Function(int)>();
  late final _taskListSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_subscribe_stream",
  );

  late final _taskListSubscribeStream =
      _taskListSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _taskListRefreshPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_refresh",
  );

  late final _taskListRefresh =
      _taskListRefreshPtr.asFunction<int Function(int)>();
  late final _taskListCanRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_can_redact",
  );

  late final _taskListCanRedact =
      _taskListCanRedactPtr.asFunction<int Function(int)>();
  late final _taskListSpacePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_space",
  );

  late final _taskListSpace = _taskListSpacePtr.asFunction<int Function(int)>();
  late final _taskListSpaceIdStrPtr = _lookup<
          ffi.NativeFunction<_TaskListSpaceIdStrReturn Function(ffi.IntPtr)>>(
      "__TaskList_space_id_str");

  late final _taskListSpaceIdStr = _taskListSpaceIdStrPtr
      .asFunction<_TaskListSpaceIdStrReturn Function(int)>();
  late final _taskListRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_ref_details",
  );

  late final _taskListRefDetails =
      _taskListRefDetailsPtr.asFunction<int Function(int)>();
  late final _taskListCommentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_comments",
  );

  late final _taskListComments =
      _taskListCommentsPtr.asFunction<int Function(int)>();
  late final _taskListAttachmentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskList_attachments",
  );

  late final _taskListAttachments =
      _taskListAttachmentsPtr.asFunction<int Function(int)>();
  late final _taskListDraftNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskListDraft_name");

  late final _taskListDraftName =
      _taskListDraftNamePtr.asFunction<void Function(int, int, int, int)>();
  late final _taskListDraftDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskListDraft_description_text");

  late final _taskListDraftDescriptionText = _taskListDraftDescriptionTextPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _taskListDraftDescriptionMarkdownPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskListDraft_description_markdown");

  late final _taskListDraftDescriptionMarkdown =
      _taskListDraftDescriptionMarkdownPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _taskListDraftDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskListDraft_description_html");

  late final _taskListDraftDescriptionHtml = _taskListDraftDescriptionHtmlPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _taskListDraftUnsetDescriptionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListDraft_unset_description",
  );

  late final _taskListDraftUnsetDescription =
      _taskListDraftUnsetDescriptionPtr.asFunction<void Function(int)>();
  late final _taskListDraftSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__TaskListDraft_sort_order",
  );

  late final _taskListDraftSortOrder =
      _taskListDraftSortOrderPtr.asFunction<void Function(int, int)>();
  late final _taskListDraftDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListDraft_display",
  );

  late final _taskListDraftDisplay =
      _taskListDraftDisplayPtr.asFunction<void Function(int, int)>();
  late final _taskListDraftUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListDraft_unset_display",
  );

  late final _taskListDraftUnsetDisplay =
      _taskListDraftUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _taskListDraftKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListDraft_keywords",
  );

  late final _taskListDraftKeywords =
      _taskListDraftKeywordsPtr.asFunction<void Function(int, int)>();
  late final _taskListDraftUnsetKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListDraft_unset_keywords",
  );

  late final _taskListDraftUnsetKeywords =
      _taskListDraftUnsetKeywordsPtr.asFunction<void Function(int)>();
  late final _taskListDraftCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListDraft_categories",
  );

  late final _taskListDraftCategories =
      _taskListDraftCategoriesPtr.asFunction<void Function(int, int)>();
  late final _taskListDraftUnsetCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListDraft_unset_categories",
  );

  late final _taskListDraftUnsetCategories =
      _taskListDraftUnsetCategoriesPtr.asFunction<void Function(int)>();
  late final _taskListDraftSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskListDraft_send",
  );

  late final _taskListDraftSend =
      _taskListDraftSendPtr.asFunction<int Function(int)>();
  late final _taskListUpdateBuilderNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskListUpdateBuilder_name");

  late final _taskListUpdateBuilderName = _taskListUpdateBuilderNamePtr
      .asFunction<void Function(int, int, int, int)>();
  late final _taskListUpdateBuilderDescriptionTextPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__TaskListUpdateBuilder_description_text");

  late final _taskListUpdateBuilderDescriptionText =
      _taskListUpdateBuilderDescriptionTextPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _taskListUpdateBuilderDescriptionHtmlPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__TaskListUpdateBuilder_description_html");

  late final _taskListUpdateBuilderDescriptionHtml =
      _taskListUpdateBuilderDescriptionHtmlPtr
          .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _taskListUpdateBuilderUnsetDescriptionPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_description",
  );

  late final _taskListUpdateBuilderUnsetDescription =
      _taskListUpdateBuilderUnsetDescriptionPtr
          .asFunction<void Function(int)>();
  late final _taskListUpdateBuilderUnsetDescriptionUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_description_update",
  );

  late final _taskListUpdateBuilderUnsetDescriptionUpdate =
      _taskListUpdateBuilderUnsetDescriptionUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskListUpdateBuilderSortOrderPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__TaskListUpdateBuilder_sort_order",
  );

  late final _taskListUpdateBuilderSortOrder =
      _taskListUpdateBuilderSortOrderPtr.asFunction<void Function(int, int)>();
  late final _taskListUpdateBuilderDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_display",
  );

  late final _taskListUpdateBuilderDisplay =
      _taskListUpdateBuilderDisplayPtr.asFunction<void Function(int, int)>();
  late final _taskListUpdateBuilderUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_display",
  );

  late final _taskListUpdateBuilderUnsetDisplay =
      _taskListUpdateBuilderUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _taskListUpdateBuilderUnsetDisplayUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_display_update",
  );

  late final _taskListUpdateBuilderUnsetDisplayUpdate =
      _taskListUpdateBuilderUnsetDisplayUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskListUpdateBuilderKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_keywords",
  );

  late final _taskListUpdateBuilderKeywords =
      _taskListUpdateBuilderKeywordsPtr.asFunction<void Function(int, int)>();
  late final _taskListUpdateBuilderUnsetKeywordsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_keywords",
  );

  late final _taskListUpdateBuilderUnsetKeywords =
      _taskListUpdateBuilderUnsetKeywordsPtr.asFunction<void Function(int)>();
  late final _taskListUpdateBuilderUnsetKeywordsUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_keywords_update",
  );

  late final _taskListUpdateBuilderUnsetKeywordsUpdate =
      _taskListUpdateBuilderUnsetKeywordsUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskListUpdateBuilderCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_categories",
  );

  late final _taskListUpdateBuilderCategories =
      _taskListUpdateBuilderCategoriesPtr.asFunction<void Function(int, int)>();
  late final _taskListUpdateBuilderUnsetCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_categories",
  );

  late final _taskListUpdateBuilderUnsetCategories =
      _taskListUpdateBuilderUnsetCategoriesPtr.asFunction<void Function(int)>();
  late final _taskListUpdateBuilderUnsetCategoriesUpdatePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_unset_categories_update",
  );

  late final _taskListUpdateBuilderUnsetCategoriesUpdate =
      _taskListUpdateBuilderUnsetCategoriesUpdatePtr
          .asFunction<void Function(int)>();
  late final _taskListUpdateBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TaskListUpdateBuilder_send",
  );

  late final _taskListUpdateBuilderSend =
      _taskListUpdateBuilderSendPtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoNamePtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoNameReturn Function(
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_name");

  late final _spaceHierarchyRoomInfoName = _spaceHierarchyRoomInfoNamePtr
      .asFunction<_SpaceHierarchyRoomInfoNameReturn Function(int)>();
  late final _spaceHierarchyRoomInfoRoomIdStrPtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoRoomIdStrReturn Function(
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_room_id_str");

  late final _spaceHierarchyRoomInfoRoomIdStr =
      _spaceHierarchyRoomInfoRoomIdStrPtr
          .asFunction<_SpaceHierarchyRoomInfoRoomIdStrReturn Function(int)>();
  late final _spaceHierarchyRoomInfoTopicPtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoTopicReturn Function(
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_topic");

  late final _spaceHierarchyRoomInfoTopic = _spaceHierarchyRoomInfoTopicPtr
      .asFunction<_SpaceHierarchyRoomInfoTopicReturn Function(int)>();
  late final _spaceHierarchyRoomInfoNumJoinedMembersPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_num_joined_members",
  );

  late final _spaceHierarchyRoomInfoNumJoinedMembers =
      _spaceHierarchyRoomInfoNumJoinedMembersPtr
          .asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoWorldReadablePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_world_readable",
  );

  late final _spaceHierarchyRoomInfoWorldReadable =
      _spaceHierarchyRoomInfoWorldReadablePtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoGuestCanJoinPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_guest_can_join",
  );

  late final _spaceHierarchyRoomInfoGuestCanJoin =
      _spaceHierarchyRoomInfoGuestCanJoinPtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoIsSpacePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_is_space",
  );

  late final _spaceHierarchyRoomInfoIsSpace =
      _spaceHierarchyRoomInfoIsSpacePtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoAvatarUrlStrPtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoAvatarUrlStrReturn Function(
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_avatar_url_str");

  late final _spaceHierarchyRoomInfoAvatarUrlStr =
      _spaceHierarchyRoomInfoAvatarUrlStrPtr.asFunction<
          _SpaceHierarchyRoomInfoAvatarUrlStrReturn Function(int)>();
  late final _spaceHierarchyRoomInfoJoinRuleStrPtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoJoinRuleStrReturn Function(
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_join_rule_str");

  late final _spaceHierarchyRoomInfoJoinRuleStr =
      _spaceHierarchyRoomInfoJoinRuleStrPtr
          .asFunction<_SpaceHierarchyRoomInfoJoinRuleStrReturn Function(int)>();
  late final _spaceHierarchyRoomInfoHasAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_has_avatar",
  );

  late final _spaceHierarchyRoomInfoHasAvatar =
      _spaceHierarchyRoomInfoHasAvatarPtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoSuggestedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_suggested",
  );

  late final _spaceHierarchyRoomInfoSuggested =
      _spaceHierarchyRoomInfoSuggestedPtr.asFunction<int Function(int)>();
  late final _spaceHierarchyRoomInfoGetAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__SpaceHierarchyRoomInfo_get_avatar");

  late final _spaceHierarchyRoomInfoGetAvatar =
      _spaceHierarchyRoomInfoGetAvatarPtr
          .asFunction<int Function(int, int, int)>();
  late final _spaceHierarchyRoomInfoViaServerNamesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceHierarchyRoomInfo_via_server_names",
  );

  late final _spaceHierarchyRoomInfoViaServerNames =
      _spaceHierarchyRoomInfoViaServerNamesPtr.asFunction<int Function(int)>();
  late final _spaceRelationRoomIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceRelation_room_id",
  );

  late final _spaceRelationRoomId =
      _spaceRelationRoomIdPtr.asFunction<int Function(int)>();
  late final _spaceRelationSuggestedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SpaceRelation_suggested",
  );

  late final _spaceRelationSuggested =
      _spaceRelationSuggestedPtr.asFunction<int Function(int)>();
  late final _spaceRelationViaPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceRelation_via",
  );

  late final _spaceRelationVia =
      _spaceRelationViaPtr.asFunction<int Function(int)>();
  late final _spaceRelationTargetTypePtr = _lookup<
          ffi
          .NativeFunction<_SpaceRelationTargetTypeReturn Function(ffi.IntPtr)>>(
      "__SpaceRelation_target_type");

  late final _spaceRelationTargetType = _spaceRelationTargetTypePtr
      .asFunction<_SpaceRelationTargetTypeReturn Function(int)>();
  late final _spaceRelationsRoomIdStrPtr = _lookup<
          ffi
          .NativeFunction<_SpaceRelationsRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__SpaceRelations_room_id_str");

  late final _spaceRelationsRoomIdStr = _spaceRelationsRoomIdStrPtr
      .asFunction<_SpaceRelationsRoomIdStrReturn Function(int)>();
  late final _spaceRelationsMainParentPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRelationsMainParentReturn Function(
              ffi.IntPtr)>>("__SpaceRelations_main_parent");

  late final _spaceRelationsMainParent = _spaceRelationsMainParentPtr
      .asFunction<_SpaceRelationsMainParentReturn Function(int)>();
  late final _spaceRelationsOtherParentsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceRelations_other_parents",
  );

  late final _spaceRelationsOtherParents =
      _spaceRelationsOtherParentsPtr.asFunction<int Function(int)>();
  late final _spaceRelationsChildrenPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceRelations_children",
  );

  late final _spaceRelationsChildren =
      _spaceRelationsChildrenPtr.asFunction<int Function(int)>();
  late final _spaceRelationsQueryHierarchyPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SpaceRelations_query_hierarchy",
  );

  late final _spaceRelationsQueryHierarchy =
      _spaceRelationsQueryHierarchyPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsNewsPtr = _lookup<
          ffi.NativeFunction<_RoomPowerLevelsNewsReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_news");

  late final _roomPowerLevelsNews = _roomPowerLevelsNewsPtr
      .asFunction<_RoomPowerLevelsNewsReturn Function(int)>();
  late final _roomPowerLevelsNewsKeyPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsNewsKeyReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_news_key");

  late final _roomPowerLevelsNewsKey = _roomPowerLevelsNewsKeyPtr
      .asFunction<_RoomPowerLevelsNewsKeyReturn Function(int)>();
  late final _roomPowerLevelsStoriesPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsStoriesReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_stories");

  late final _roomPowerLevelsStories = _roomPowerLevelsStoriesPtr
      .asFunction<_RoomPowerLevelsStoriesReturn Function(int)>();
  late final _roomPowerLevelsStoriesKeyPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsStoriesKeyReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_stories_key");

  late final _roomPowerLevelsStoriesKey = _roomPowerLevelsStoriesKeyPtr
      .asFunction<_RoomPowerLevelsStoriesKeyReturn Function(int)>();
  late final _roomPowerLevelsEventsPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsEventsReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_events");

  late final _roomPowerLevelsEvents = _roomPowerLevelsEventsPtr
      .asFunction<_RoomPowerLevelsEventsReturn Function(int)>();
  late final _roomPowerLevelsEventsKeyPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsEventsKeyReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_events_key");

  late final _roomPowerLevelsEventsKey = _roomPowerLevelsEventsKeyPtr
      .asFunction<_RoomPowerLevelsEventsKeyReturn Function(int)>();
  late final _roomPowerLevelsPinsPtr = _lookup<
          ffi.NativeFunction<_RoomPowerLevelsPinsReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_pins");

  late final _roomPowerLevelsPins = _roomPowerLevelsPinsPtr
      .asFunction<_RoomPowerLevelsPinsReturn Function(int)>();
  late final _roomPowerLevelsPinsKeyPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsPinsKeyReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_pins_key");

  late final _roomPowerLevelsPinsKey = _roomPowerLevelsPinsKeyPtr
      .asFunction<_RoomPowerLevelsPinsKeyReturn Function(int)>();
  late final _roomPowerLevelsTasksPtr = _lookup<
          ffi.NativeFunction<_RoomPowerLevelsTasksReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_tasks");

  late final _roomPowerLevelsTasks = _roomPowerLevelsTasksPtr
      .asFunction<_RoomPowerLevelsTasksReturn Function(int)>();
  late final _roomPowerLevelsTasksKeyPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsTasksKeyReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_tasks_key");

  late final _roomPowerLevelsTasksKey = _roomPowerLevelsTasksKeyPtr
      .asFunction<_RoomPowerLevelsTasksKeyReturn Function(int)>();
  late final _roomPowerLevelsTaskListsPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsTaskListsReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_task_lists");

  late final _roomPowerLevelsTaskLists = _roomPowerLevelsTaskListsPtr
      .asFunction<_RoomPowerLevelsTaskListsReturn Function(int)>();
  late final _roomPowerLevelsTaskListsKeyPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsTaskListsKeyReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_task_lists_key");

  late final _roomPowerLevelsTaskListsKey = _roomPowerLevelsTaskListsKeyPtr
      .asFunction<_RoomPowerLevelsTaskListsKeyReturn Function(int)>();
  late final _roomPowerLevelsRsvpPtr = _lookup<
          ffi.NativeFunction<_RoomPowerLevelsRsvpReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_rsvp");

  late final _roomPowerLevelsRsvp = _roomPowerLevelsRsvpPtr
      .asFunction<_RoomPowerLevelsRsvpReturn Function(int)>();
  late final _roomPowerLevelsRsvpKeyPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsRsvpKeyReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_rsvp_key");

  late final _roomPowerLevelsRsvpKey = _roomPowerLevelsRsvpKeyPtr
      .asFunction<_RoomPowerLevelsRsvpKeyReturn Function(int)>();
  late final _roomPowerLevelsCommentsPtr = _lookup<
          ffi
          .NativeFunction<_RoomPowerLevelsCommentsReturn Function(ffi.IntPtr)>>(
      "__RoomPowerLevels_comments");

  late final _roomPowerLevelsComments = _roomPowerLevelsCommentsPtr
      .asFunction<_RoomPowerLevelsCommentsReturn Function(int)>();
  late final _roomPowerLevelsCommentsKeyPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsCommentsKeyReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_comments_key");

  late final _roomPowerLevelsCommentsKey = _roomPowerLevelsCommentsKeyPtr
      .asFunction<_RoomPowerLevelsCommentsKeyReturn Function(int)>();
  late final _roomPowerLevelsAttachmentsPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsAttachmentsReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_attachments");

  late final _roomPowerLevelsAttachments = _roomPowerLevelsAttachmentsPtr
      .asFunction<_RoomPowerLevelsAttachmentsReturn Function(int)>();
  late final _roomPowerLevelsAttachmentsKeyPtr = _lookup<
      ffi.NativeFunction<
          _RoomPowerLevelsAttachmentsKeyReturn Function(
              ffi.IntPtr)>>("__RoomPowerLevels_attachments_key");

  late final _roomPowerLevelsAttachmentsKey = _roomPowerLevelsAttachmentsKeyPtr
      .asFunction<_RoomPowerLevelsAttachmentsKeyReturn Function(int)>();
  late final _roomPowerLevelsEventsDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_events_default",
  );

  late final _roomPowerLevelsEventsDefault =
      _roomPowerLevelsEventsDefaultPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsUsersDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_users_default",
  );

  late final _roomPowerLevelsUsersDefault =
      _roomPowerLevelsUsersDefaultPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsMaxPowerLevelPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_max_power_level",
  );

  late final _roomPowerLevelsMaxPowerLevel =
      _roomPowerLevelsMaxPowerLevelPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsKickPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_kick",
  );

  late final _roomPowerLevelsKick =
      _roomPowerLevelsKickPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsBanPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_ban",
  );

  late final _roomPowerLevelsBan =
      _roomPowerLevelsBanPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsRedactPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_redact",
  );

  late final _roomPowerLevelsRedact =
      _roomPowerLevelsRedactPtr.asFunction<int Function(int)>();
  late final _roomPowerLevelsInvitePtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__RoomPowerLevels_invite",
  );

  late final _roomPowerLevelsInvite =
      _roomPowerLevelsInvitePtr.asFunction<int Function(int)>();
  late final _simpleOnOffSettingActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SimpleOnOffSetting_active",
  );

  late final _simpleOnOffSettingActive =
      _simpleOnOffSettingActivePtr.asFunction<int Function(int)>();
  late final _simpleOnOffSettingBuilderActivePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__SimpleOnOffSettingBuilder_active",
  );

  late final _simpleOnOffSettingBuilderActive =
      _simpleOnOffSettingBuilderActivePtr.asFunction<void Function(int, int)>();
  late final _simpleOnOffSettingBuilderBuildPtr = _lookup<
      ffi.NativeFunction<
          _SimpleOnOffSettingBuilderBuildReturn Function(
              ffi.IntPtr)>>("__SimpleOnOffSettingBuilder_build");

  late final _simpleOnOffSettingBuilderBuild =
      _simpleOnOffSettingBuilderBuildPtr
          .asFunction<_SimpleOnOffSettingBuilderBuildReturn Function(int)>();
  late final _simpleSettingWithTurnOffActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SimpleSettingWithTurnOff_active",
  );

  late final _simpleSettingWithTurnOffActive =
      _simpleSettingWithTurnOffActivePtr.asFunction<int Function(int)>();
  late final _simpleSettingWithTurnOffBuilderActivePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__SimpleSettingWithTurnOffBuilder_active",
  );

  late final _simpleSettingWithTurnOffBuilderActive =
      _simpleSettingWithTurnOffBuilderActivePtr
          .asFunction<void Function(int, int)>();
  late final _simpleSettingWithTurnOffBuilderBuildPtr = _lookup<
      ffi.NativeFunction<
          _SimpleSettingWithTurnOffBuilderBuildReturn Function(
              ffi.IntPtr)>>("__SimpleSettingWithTurnOffBuilder_build");

  late final _simpleSettingWithTurnOffBuilderBuild =
      _simpleSettingWithTurnOffBuilderBuildPtr.asFunction<
          _SimpleSettingWithTurnOffBuilderBuildReturn Function(int)>();
  late final _newsSettingsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NewsSettings_active",
  );

  late final _newsSettingsActive =
      _newsSettingsActivePtr.asFunction<int Function(int)>();
  late final _newsSettingsUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NewsSettings_updater",
  );

  late final _newsSettingsUpdater =
      _newsSettingsUpdaterPtr.asFunction<int Function(int)>();
  late final _storiesSettingsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__StoriesSettings_active",
  );

  late final _storiesSettingsActive =
      _storiesSettingsActivePtr.asFunction<int Function(int)>();
  late final _storiesSettingsUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__StoriesSettings_updater",
  );

  late final _storiesSettingsUpdater =
      _storiesSettingsUpdaterPtr.asFunction<int Function(int)>();
  late final _tasksSettingsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__TasksSettings_active",
  );

  late final _tasksSettingsActive =
      _tasksSettingsActivePtr.asFunction<int Function(int)>();
  late final _tasksSettingsUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__TasksSettings_updater",
  );

  late final _tasksSettingsUpdater =
      _tasksSettingsUpdaterPtr.asFunction<int Function(int)>();
  late final _eventsSettingsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__EventsSettings_active",
  );

  late final _eventsSettingsActive =
      _eventsSettingsActivePtr.asFunction<int Function(int)>();
  late final _eventsSettingsUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__EventsSettings_updater",
  );

  late final _eventsSettingsUpdater =
      _eventsSettingsUpdaterPtr.asFunction<int Function(int)>();
  late final _pinsSettingsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__PinsSettings_active",
  );

  late final _pinsSettingsActive =
      _pinsSettingsActivePtr.asFunction<int Function(int)>();
  late final _pinsSettingsUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__PinsSettings_updater",
  );

  late final _pinsSettingsUpdater =
      _pinsSettingsUpdaterPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsNewsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_news",
  );

  late final _acterAppSettingsNews =
      _acterAppSettingsNewsPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsStoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_stories",
  );

  late final _acterAppSettingsStories =
      _acterAppSettingsStoriesPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsPinsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_pins",
  );

  late final _acterAppSettingsPins =
      _acterAppSettingsPinsPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsEventsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_events",
  );

  late final _acterAppSettingsEvents =
      _acterAppSettingsEventsPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsTasksPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_tasks",
  );

  late final _acterAppSettingsTasks =
      _acterAppSettingsTasksPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerAppSettings_update_builder",
  );

  late final _acterAppSettingsUpdateBuilder =
      _acterAppSettingsUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _acterAppSettingsBuilderNewsPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__ActerAppSettingsBuilder_news");

  late final _acterAppSettingsBuilderNews = _acterAppSettingsBuilderNewsPtr
      .asFunction<void Function(int, int, int)>();
  late final _acterAppSettingsBuilderStoriesPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__ActerAppSettingsBuilder_stories");

  late final _acterAppSettingsBuilderStories =
      _acterAppSettingsBuilderStoriesPtr
          .asFunction<void Function(int, int, int)>();
  late final _acterAppSettingsBuilderPinsPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__ActerAppSettingsBuilder_pins");

  late final _acterAppSettingsBuilderPins = _acterAppSettingsBuilderPinsPtr
      .asFunction<void Function(int, int, int)>();
  late final _acterAppSettingsBuilderEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__ActerAppSettingsBuilder_events");

  late final _acterAppSettingsBuilderEvents = _acterAppSettingsBuilderEventsPtr
      .asFunction<void Function(int, int, int)>();
  late final _acterAppSettingsBuilderTasksPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__ActerAppSettingsBuilder_tasks");

  late final _acterAppSettingsBuilderTasks = _acterAppSettingsBuilderTasksPtr
      .asFunction<void Function(int, int, int)>();
  late final _activityObjectTypeStrPtr = _lookup<
          ffi
          .NativeFunction<_ActivityObjectTypeStrReturn Function(ffi.IntPtr)>>(
      "__ActivityObject_type_str");

  late final _activityObjectTypeStr = _activityObjectTypeStrPtr
      .asFunction<_ActivityObjectTypeStrReturn Function(int)>();
  late final _activityObjectObjectIdStrPtr = _lookup<
      ffi.NativeFunction<
          _ActivityObjectObjectIdStrReturn Function(
              ffi.IntPtr)>>("__ActivityObject_object_id_str");

  late final _activityObjectObjectIdStr = _activityObjectObjectIdStrPtr
      .asFunction<_ActivityObjectObjectIdStrReturn Function(int)>();
  late final _activityObjectTitlePtr = _lookup<
          ffi.NativeFunction<_ActivityObjectTitleReturn Function(ffi.IntPtr)>>(
      "__ActivityObject_title");

  late final _activityObjectTitle = _activityObjectTitlePtr
      .asFunction<_ActivityObjectTitleReturn Function(int)>();
  late final _activityObjectEmojiPtr = _lookup<
          ffi.NativeFunction<_ActivityObjectEmojiReturn Function(ffi.IntPtr)>>(
      "__ActivityObject_emoji");

  late final _activityObjectEmoji = _activityObjectEmojiPtr
      .asFunction<_ActivityObjectEmojiReturn Function(int)>();
  late final _activityObjectTaskListIdStrPtr = _lookup<
      ffi.NativeFunction<
          _ActivityObjectTaskListIdStrReturn Function(
              ffi.IntPtr)>>("__ActivityObject_task_list_id_str");

  late final _activityObjectTaskListIdStr = _activityObjectTaskListIdStrPtr
      .asFunction<_ActivityObjectTaskListIdStrReturn Function(int)>();
  late final _activityEventIdStrPtr = _lookup<
          ffi.NativeFunction<_ActivityEventIdStrReturn Function(ffi.IntPtr)>>(
      "__Activity_event_id_str");

  late final _activityEventIdStr = _activityEventIdStrPtr
      .asFunction<_ActivityEventIdStrReturn Function(int)>();
  late final _activitySenderIdStrPtr = _lookup<
          ffi.NativeFunction<_ActivitySenderIdStrReturn Function(ffi.IntPtr)>>(
      "__Activity_sender_id_str");

  late final _activitySenderIdStr = _activitySenderIdStrPtr
      .asFunction<_ActivitySenderIdStrReturn Function(int)>();
  late final _activityOriginServerTsPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__Activity_origin_server_ts",
  );

  late final _activityOriginServerTs =
      _activityOriginServerTsPtr.asFunction<int Function(int)>();
  late final _activityRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_ActivityRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__Activity_room_id_str");

  late final _activityRoomIdStr = _activityRoomIdStrPtr
      .asFunction<_ActivityRoomIdStrReturn Function(int)>();
  late final _activityTypeStrPtr =
      _lookup<ffi.NativeFunction<_ActivityTypeStrReturn Function(ffi.IntPtr)>>(
    "__Activity_type_str",
  );

  late final _activityTypeStr =
      _activityTypeStrPtr.asFunction<_ActivityTypeStrReturn Function(int)>();
  late final _activitySubTypeStrPtr = _lookup<
          ffi.NativeFunction<_ActivitySubTypeStrReturn Function(ffi.IntPtr)>>(
      "__Activity_sub_type_str");

  late final _activitySubTypeStr = _activitySubTypeStrPtr
      .asFunction<_ActivitySubTypeStrReturn Function(int)>();
  late final _activityRefDetailsPtr = _lookup<
          ffi.NativeFunction<_ActivityRefDetailsReturn Function(ffi.IntPtr)>>(
      "__Activity_ref_details");

  late final _activityRefDetails = _activityRefDetailsPtr
      .asFunction<_ActivityRefDetailsReturn Function(int)>();
  late final _activityTargetUrlPtr = _lookup<
          ffi.NativeFunction<_ActivityTargetUrlReturn Function(ffi.IntPtr)>>(
      "__Activity_target_url");

  late final _activityTargetUrl = _activityTargetUrlPtr
      .asFunction<_ActivityTargetUrlReturn Function(int)>();
  late final _activityTaskListIdStrPtr = _lookup<
          ffi
          .NativeFunction<_ActivityTaskListIdStrReturn Function(ffi.IntPtr)>>(
      "__Activity_task_list_id_str");

  late final _activityTaskListIdStr = _activityTaskListIdStrPtr
      .asFunction<_ActivityTaskListIdStrReturn Function(int)>();
  late final _activityObjectPtr =
      _lookup<ffi.NativeFunction<_ActivityObjectReturn Function(ffi.IntPtr)>>(
    "__Activity_object",
  );

  late final _activityObject =
      _activityObjectPtr.asFunction<_ActivityObjectReturn Function(int)>();
  late final _activityRoomAvatarPtr = _lookup<
          ffi.NativeFunction<_ActivityRoomAvatarReturn Function(ffi.IntPtr)>>(
      "__Activity_room_avatar");

  late final _activityRoomAvatar = _activityRoomAvatarPtr
      .asFunction<_ActivityRoomAvatarReturn Function(int)>();
  late final _activityRoomNamePtr =
      _lookup<ffi.NativeFunction<_ActivityRoomNameReturn Function(ffi.IntPtr)>>(
    "__Activity_room_name",
  );

  late final _activityRoomName =
      _activityRoomNamePtr.asFunction<_ActivityRoomNameReturn Function(int)>();
  late final _activityRoomTopicPtr = _lookup<
          ffi.NativeFunction<_ActivityRoomTopicReturn Function(ffi.IntPtr)>>(
      "__Activity_room_topic");

  late final _activityRoomTopic = _activityRoomTopicPtr
      .asFunction<_ActivityRoomTopicReturn Function(int)>();
  late final _activityNamePtr =
      _lookup<ffi.NativeFunction<_ActivityNameReturn Function(ffi.IntPtr)>>(
    "__Activity_name",
  );

  late final _activityName =
      _activityNamePtr.asFunction<_ActivityNameReturn Function(int)>();
  late final _activityTitlePtr =
      _lookup<ffi.NativeFunction<_ActivityTitleReturn Function(ffi.IntPtr)>>(
    "__Activity_title",
  );

  late final _activityTitle =
      _activityTitlePtr.asFunction<_ActivityTitleReturn Function(int)>();
  late final _activityMsgContentPtr = _lookup<
          ffi.NativeFunction<_ActivityMsgContentReturn Function(ffi.IntPtr)>>(
      "__Activity_msg_content");

  late final _activityMsgContent = _activityMsgContentPtr
      .asFunction<_ActivityMsgContentReturn Function(int)>();
  late final _activityMembershipContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityMembershipContentReturn Function(
              ffi.IntPtr)>>("__Activity_membership_content");

  late final _activityMembershipContent = _activityMembershipContentPtr
      .asFunction<_ActivityMembershipContentReturn Function(int)>();
  late final _activityProfileContentPtr = _lookup<
          ffi
          .NativeFunction<_ActivityProfileContentReturn Function(ffi.IntPtr)>>(
      "__Activity_profile_content");

  late final _activityProfileContent = _activityProfileContentPtr
      .asFunction<_ActivityProfileContentReturn Function(int)>();
  late final _activityPolicyRuleRoomContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityPolicyRuleRoomContentReturn Function(
              ffi.IntPtr)>>("__Activity_policy_rule_room_content");

  late final _activityPolicyRuleRoomContent = _activityPolicyRuleRoomContentPtr
      .asFunction<_ActivityPolicyRuleRoomContentReturn Function(int)>();
  late final _activityPolicyRuleServerContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityPolicyRuleServerContentReturn Function(
              ffi.IntPtr)>>("__Activity_policy_rule_server_content");

  late final _activityPolicyRuleServerContent =
      _activityPolicyRuleServerContentPtr
          .asFunction<_ActivityPolicyRuleServerContentReturn Function(int)>();
  late final _activityPolicyRuleUserContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityPolicyRuleUserContentReturn Function(
              ffi.IntPtr)>>("__Activity_policy_rule_user_content");

  late final _activityPolicyRuleUserContent = _activityPolicyRuleUserContentPtr
      .asFunction<_ActivityPolicyRuleUserContentReturn Function(int)>();
  late final _activityRoomAvatarContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomAvatarContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_avatar_content");

  late final _activityRoomAvatarContent = _activityRoomAvatarContentPtr
      .asFunction<_ActivityRoomAvatarContentReturn Function(int)>();
  late final _activityRoomCreateContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomCreateContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_create_content");

  late final _activityRoomCreateContent = _activityRoomCreateContentPtr
      .asFunction<_ActivityRoomCreateContentReturn Function(int)>();
  late final _activityRoomEncryptionContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomEncryptionContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_encryption_content");

  late final _activityRoomEncryptionContent = _activityRoomEncryptionContentPtr
      .asFunction<_ActivityRoomEncryptionContentReturn Function(int)>();
  late final _activityRoomGuestAccessContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomGuestAccessContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_guest_access_content");

  late final _activityRoomGuestAccessContent =
      _activityRoomGuestAccessContentPtr
          .asFunction<_ActivityRoomGuestAccessContentReturn Function(int)>();
  late final _activityRoomHistoryVisibilityContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomHistoryVisibilityContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_history_visibility_content");

  late final _activityRoomHistoryVisibilityContent =
      _activityRoomHistoryVisibilityContentPtr.asFunction<
          _ActivityRoomHistoryVisibilityContentReturn Function(int)>();
  late final _activityRoomJoinRulesContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomJoinRulesContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_join_rules_content");

  late final _activityRoomJoinRulesContent = _activityRoomJoinRulesContentPtr
      .asFunction<_ActivityRoomJoinRulesContentReturn Function(int)>();
  late final _activityRoomNameContentPtr = _lookup<
          ffi
          .NativeFunction<_ActivityRoomNameContentReturn Function(ffi.IntPtr)>>(
      "__Activity_room_name_content");

  late final _activityRoomNameContent = _activityRoomNameContentPtr
      .asFunction<_ActivityRoomNameContentReturn Function(int)>();
  late final _activityRoomPinnedEventsContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomPinnedEventsContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_pinned_events_content");

  late final _activityRoomPinnedEventsContent =
      _activityRoomPinnedEventsContentPtr
          .asFunction<_ActivityRoomPinnedEventsContentReturn Function(int)>();
  late final _activityRoomPowerLevelsContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomPowerLevelsContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_power_levels_content");

  late final _activityRoomPowerLevelsContent =
      _activityRoomPowerLevelsContentPtr
          .asFunction<_ActivityRoomPowerLevelsContentReturn Function(int)>();
  late final _activityRoomServerAclContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomServerAclContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_server_acl_content");

  late final _activityRoomServerAclContent = _activityRoomServerAclContentPtr
      .asFunction<_ActivityRoomServerAclContentReturn Function(int)>();
  late final _activityRoomTombstoneContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomTombstoneContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_tombstone_content");

  late final _activityRoomTombstoneContent = _activityRoomTombstoneContentPtr
      .asFunction<_ActivityRoomTombstoneContentReturn Function(int)>();
  late final _activityRoomTopicContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityRoomTopicContentReturn Function(
              ffi.IntPtr)>>("__Activity_room_topic_content");

  late final _activityRoomTopicContent = _activityRoomTopicContentPtr
      .asFunction<_ActivityRoomTopicContentReturn Function(int)>();
  late final _activitySpaceChildContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivitySpaceChildContentReturn Function(
              ffi.IntPtr)>>("__Activity_space_child_content");

  late final _activitySpaceChildContent = _activitySpaceChildContentPtr
      .asFunction<_ActivitySpaceChildContentReturn Function(int)>();
  late final _activitySpaceParentContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivitySpaceParentContentReturn Function(
              ffi.IntPtr)>>("__Activity_space_parent_content");

  late final _activitySpaceParentContent = _activitySpaceParentContentPtr
      .asFunction<_ActivitySpaceParentContentReturn Function(int)>();
  late final _activityReactionKeyPtr = _lookup<
          ffi.NativeFunction<_ActivityReactionKeyReturn Function(ffi.IntPtr)>>(
      "__Activity_reaction_key");

  late final _activityReactionKey = _activityReactionKeyPtr
      .asFunction<_ActivityReactionKeyReturn Function(int)>();
  late final _activityTitleContentPtr = _lookup<
          ffi.NativeFunction<_ActivityTitleContentReturn Function(ffi.IntPtr)>>(
      "__Activity_title_content");

  late final _activityTitleContent = _activityTitleContentPtr
      .asFunction<_ActivityTitleContentReturn Function(int)>();
  late final _activityDescriptionContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityDescriptionContentReturn Function(
              ffi.IntPtr)>>("__Activity_description_content");

  late final _activityDescriptionContent = _activityDescriptionContentPtr
      .asFunction<_ActivityDescriptionContentReturn Function(int)>();
  late final _activityDateContentPtr = _lookup<
          ffi.NativeFunction<_ActivityDateContentReturn Function(ffi.IntPtr)>>(
      "__Activity_date_content");

  late final _activityDateContent = _activityDateContentPtr
      .asFunction<_ActivityDateContentReturn Function(int)>();
  late final _activityDateTimeRangeContentPtr = _lookup<
      ffi.NativeFunction<
          _ActivityDateTimeRangeContentReturn Function(
              ffi.IntPtr)>>("__Activity_date_time_range_content");

  late final _activityDateTimeRangeContent = _activityDateTimeRangeContentPtr
      .asFunction<_ActivityDateTimeRangeContentReturn Function(int)>();
  late final _activityWhomPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Activity_whom",
  );

  late final _activityWhom = _activityWhomPtr.asFunction<int Function(int)>();
  late final _activityMentionsYouPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Activity_mentions_you",
  );

  late final _activityMentionsYou =
      _activityMentionsYouPtr.asFunction<int Function(int)>();
  late final _activitiesGetIdsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint32, ffi.Uint32)>>("__Activities_get_ids");

  late final _activitiesGetIds =
      _activitiesGetIdsPtr.asFunction<int Function(int, int, int)>();
  late final _activitiesSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Activities_subscribe_stream",
  );

  late final _activitiesSubscribeStream =
      _activitiesSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _titleContentChangePtr = _lookup<
          ffi.NativeFunction<_TitleContentChangeReturn Function(ffi.IntPtr)>>(
      "__TitleContent_change");

  late final _titleContentChange = _titleContentChangePtr
      .asFunction<_TitleContentChangeReturn Function(int)>();
  late final _titleContentNewValPtr = _lookup<
          ffi.NativeFunction<_TitleContentNewValReturn Function(ffi.IntPtr)>>(
      "__TitleContent_new_val");

  late final _titleContentNewVal = _titleContentNewValPtr
      .asFunction<_TitleContentNewValReturn Function(int)>();
  late final _descriptionContentChangePtr = _lookup<
      ffi.NativeFunction<
          _DescriptionContentChangeReturn Function(
              ffi.IntPtr)>>("__DescriptionContent_change");

  late final _descriptionContentChange = _descriptionContentChangePtr
      .asFunction<_DescriptionContentChangeReturn Function(int)>();
  late final _descriptionContentNewValPtr = _lookup<
      ffi.NativeFunction<
          _DescriptionContentNewValReturn Function(
              ffi.IntPtr)>>("__DescriptionContent_new_val");

  late final _descriptionContentNewVal = _descriptionContentNewValPtr
      .asFunction<_DescriptionContentNewValReturn Function(int)>();
  late final _dateContentChangePtr = _lookup<
          ffi.NativeFunction<_DateContentChangeReturn Function(ffi.IntPtr)>>(
      "__DateContent_change");

  late final _dateContentChange = _dateContentChangePtr
      .asFunction<_DateContentChangeReturn Function(int)>();
  late final _dateContentNewValPtr = _lookup<
          ffi.NativeFunction<_DateContentNewValReturn Function(ffi.IntPtr)>>(
      "__DateContent_new_val");

  late final _dateContentNewVal = _dateContentNewValPtr
      .asFunction<_DateContentNewValReturn Function(int)>();
  late final _dateTimeRangeContentStartNewValPtr = _lookup<
      ffi.NativeFunction<
          _DateTimeRangeContentStartNewValReturn Function(
              ffi.IntPtr)>>("__DateTimeRangeContent_start_new_val");

  late final _dateTimeRangeContentStartNewVal =
      _dateTimeRangeContentStartNewValPtr
          .asFunction<_DateTimeRangeContentStartNewValReturn Function(int)>();
  late final _dateTimeRangeContentEndNewValPtr = _lookup<
      ffi.NativeFunction<
          _DateTimeRangeContentEndNewValReturn Function(
              ffi.IntPtr)>>("__DateTimeRangeContent_end_new_val");

  late final _dateTimeRangeContentEndNewVal = _dateTimeRangeContentEndNewValPtr
      .asFunction<_DateTimeRangeContentEndNewValReturn Function(int)>();
  late final _roomPreviewRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_RoomPreviewRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_room_id_str");

  late final _roomPreviewRoomIdStr = _roomPreviewRoomIdStrPtr
      .asFunction<_RoomPreviewRoomIdStrReturn Function(int)>();
  late final _roomPreviewNamePtr =
      _lookup<ffi.NativeFunction<_RoomPreviewNameReturn Function(ffi.IntPtr)>>(
    "__RoomPreview_name",
  );

  late final _roomPreviewName =
      _roomPreviewNamePtr.asFunction<_RoomPreviewNameReturn Function(int)>();
  late final _roomPreviewTopicPtr =
      _lookup<ffi.NativeFunction<_RoomPreviewTopicReturn Function(ffi.IntPtr)>>(
    "__RoomPreview_topic",
  );

  late final _roomPreviewTopic =
      _roomPreviewTopicPtr.asFunction<_RoomPreviewTopicReturn Function(int)>();
  late final _roomPreviewAvatarUrlStrPtr = _lookup<
          ffi
          .NativeFunction<_RoomPreviewAvatarUrlStrReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_avatar_url_str");

  late final _roomPreviewAvatarUrlStr = _roomPreviewAvatarUrlStrPtr
      .asFunction<_RoomPreviewAvatarUrlStrReturn Function(int)>();
  late final _roomPreviewCanonicalAliasStrPtr = _lookup<
      ffi.NativeFunction<
          _RoomPreviewCanonicalAliasStrReturn Function(
              ffi.IntPtr)>>("__RoomPreview_canonical_alias_str");

  late final _roomPreviewCanonicalAliasStr = _roomPreviewCanonicalAliasStrPtr
      .asFunction<_RoomPreviewCanonicalAliasStrReturn Function(int)>();
  late final _roomPreviewRoomTypeStrPtr = _lookup<
          ffi
          .NativeFunction<_RoomPreviewRoomTypeStrReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_room_type_str");

  late final _roomPreviewRoomTypeStr = _roomPreviewRoomTypeStrPtr
      .asFunction<_RoomPreviewRoomTypeStrReturn Function(int)>();
  late final _roomPreviewJoinRuleStrPtr = _lookup<
          ffi
          .NativeFunction<_RoomPreviewJoinRuleStrReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_join_rule_str");

  late final _roomPreviewJoinRuleStr = _roomPreviewJoinRuleStrPtr
      .asFunction<_RoomPreviewJoinRuleStrReturn Function(int)>();
  late final _roomPreviewStateStrPtr = _lookup<
          ffi.NativeFunction<_RoomPreviewStateStrReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_state_str");

  late final _roomPreviewStateStr = _roomPreviewStateStrPtr
      .asFunction<_RoomPreviewStateStrReturn Function(int)>();
  late final _roomPreviewIsDirectPtr = _lookup<
          ffi.NativeFunction<_RoomPreviewIsDirectReturn Function(ffi.IntPtr)>>(
      "__RoomPreview_is_direct");

  late final _roomPreviewIsDirect = _roomPreviewIsDirectPtr
      .asFunction<_RoomPreviewIsDirectReturn Function(int)>();
  late final _roomPreviewIsWorldReadablePtr = _lookup<
      ffi.NativeFunction<
          _RoomPreviewIsWorldReadableReturn Function(
              ffi.IntPtr)>>("__RoomPreview_is_world_readable");

  late final _roomPreviewIsWorldReadable = _roomPreviewIsWorldReadablePtr
      .asFunction<_RoomPreviewIsWorldReadableReturn Function(int)>();
  late final _roomPreviewHasAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__RoomPreview_has_avatar",
  );

  late final _roomPreviewHasAvatar =
      _roomPreviewHasAvatarPtr.asFunction<int Function(int)>();
  late final _roomPreviewAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.IntPtr)>>("__RoomPreview_avatar");

  late final _roomPreviewAvatar =
      _roomPreviewAvatarPtr.asFunction<int Function(int, int, int)>();
  late final _categoryTitlePtr =
      _lookup<ffi.NativeFunction<_CategoryTitleReturn Function(ffi.IntPtr)>>(
    "__Category_title",
  );

  late final _categoryTitle =
      _categoryTitlePtr.asFunction<_CategoryTitleReturn Function(int)>();
  late final _categoryEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Category_entries",
  );

  late final _categoryEntries =
      _categoryEntriesPtr.asFunction<int Function(int)>();
  late final _categoryDisplayPtr =
      _lookup<ffi.NativeFunction<_CategoryDisplayReturn Function(ffi.IntPtr)>>(
    "__Category_display",
  );

  late final _categoryDisplay =
      _categoryDisplayPtr.asFunction<_CategoryDisplayReturn Function(int)>();
  late final _categoryUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Category_update_builder",
  );

  late final _categoryUpdateBuilder =
      _categoryUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _categoryBuilderTitlePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CategoryBuilder_title");

  late final _categoryBuilderTitle =
      _categoryBuilderTitlePtr.asFunction<void Function(int, int, int, int)>();
  late final _categoryBuilderClearEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__CategoryBuilder_clear_entries",
  );

  late final _categoryBuilderClearEntries =
      _categoryBuilderClearEntriesPtr.asFunction<void Function(int)>();
  late final _categoryBuilderAddEntryPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CategoryBuilder_add_entry");

  late final _categoryBuilderAddEntry = _categoryBuilderAddEntryPtr
      .asFunction<void Function(int, int, int, int)>();
  late final _categoryBuilderDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__CategoryBuilder_display",
  );

  late final _categoryBuilderDisplay =
      _categoryBuilderDisplayPtr.asFunction<void Function(int, int)>();
  late final _categoryBuilderUnsetDisplayPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__CategoryBuilder_unset_display",
  );

  late final _categoryBuilderUnsetDisplay =
      _categoryBuilderUnsetDisplayPtr.asFunction<void Function(int)>();
  late final _categoryBuilderBuildPtr = _lookup<
          ffi.NativeFunction<_CategoryBuilderBuildReturn Function(ffi.IntPtr)>>(
      "__CategoryBuilder_build");

  late final _categoryBuilderBuild = _categoryBuilderBuildPtr
      .asFunction<_CategoryBuilderBuildReturn Function(int)>();
  late final _categoriesCategoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Categories_categories",
  );

  late final _categoriesCategories =
      _categoriesCategoriesPtr.asFunction<int Function(int)>();
  late final _categoriesNewCategoryBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Categories_new_category_builder",
  );

  late final _categoriesNewCategoryBuilder =
      _categoriesNewCategoryBuilderPtr.asFunction<int Function(int)>();
  late final _categoriesUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Categories_update_builder",
  );

  late final _categoriesUpdateBuilder =
      _categoriesUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _categoriesBuilderAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__CategoriesBuilder_add",
  );

  late final _categoriesBuilderAdd =
      _categoriesBuilderAddPtr.asFunction<void Function(int, int)>();
  late final _categoriesBuilderClearPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__CategoriesBuilder_clear",
  );

  late final _categoriesBuilderClear =
      _categoriesBuilderClearPtr.asFunction<void Function(int)>();
  late final _displayIconTypeStrPtr = _lookup<
          ffi.NativeFunction<_DisplayIconTypeStrReturn Function(ffi.IntPtr)>>(
      "__Display_icon_type_str");

  late final _displayIconTypeStr = _displayIconTypeStrPtr
      .asFunction<_DisplayIconTypeStrReturn Function(int)>();
  late final _displayIconStrPtr =
      _lookup<ffi.NativeFunction<_DisplayIconStrReturn Function(ffi.IntPtr)>>(
    "__Display_icon_str",
  );

  late final _displayIconStr =
      _displayIconStrPtr.asFunction<_DisplayIconStrReturn Function(int)>();
  late final _displayColorPtr =
      _lookup<ffi.NativeFunction<_DisplayColorReturn Function(ffi.IntPtr)>>(
    "__Display_color",
  );

  late final _displayColor =
      _displayColorPtr.asFunction<_DisplayColorReturn Function(int)>();
  late final _displayUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Display_update_builder",
  );

  late final _displayUpdateBuilder =
      _displayUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _displayBuilderIconPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__DisplayBuilder_icon");

  late final _displayBuilderIcon = _displayBuilderIconPtr
      .asFunction<void Function(int, int, int, int, int, int, int)>();
  late final _displayBuilderUnsetIconPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__DisplayBuilder_unset_icon",
  );

  late final _displayBuilderUnsetIcon =
      _displayBuilderUnsetIconPtr.asFunction<void Function(int)>();
  late final _displayBuilderColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__DisplayBuilder_color",
  );

  late final _displayBuilderColor =
      _displayBuilderColorPtr.asFunction<void Function(int, int)>();
  late final _displayBuilderUnsetColorPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__DisplayBuilder_unset_color",
  );

  late final _displayBuilderUnsetColor =
      _displayBuilderUnsetColorPtr.asFunction<void Function(int)>();
  late final _displayBuilderBuildPtr = _lookup<
          ffi.NativeFunction<_DisplayBuilderBuildReturn Function(ffi.IntPtr)>>(
      "__DisplayBuilder_build");

  late final _displayBuilderBuild = _displayBuilderBuildPtr
      .asFunction<_DisplayBuilderBuildReturn Function(int)>();
  late final _spaceCreateOnboardingDataPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_create_onboarding_data",
  );

  late final _spaceCreateOnboardingData =
      _spaceCreateOnboardingDataPtr.asFunction<int Function(int)>();
  late final _spaceSpaceRelationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_space_relations",
  );

  late final _spaceSpaceRelations =
      _spaceSpaceRelationsPtr.asFunction<int Function(int)>();
  late final _spaceIsChildSpaceOfPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_is_child_space_of");

  late final _spaceIsChildSpaceOf =
      _spaceIsChildSpaceOfPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceAddChildRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__Space_add_child_room");

  late final _spaceAddChildRoom =
      _spaceAddChildRoomPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _spaceRemoveChildRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_remove_child_room");

  late final _spaceRemoveChildRoom = _spaceRemoveChildRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _spaceUploadAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_upload_avatar");

  late final _spaceUploadAvatar =
      _spaceUploadAvatarPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetActerSpaceStatesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_set_acter_space_states",
  );

  late final _spaceSetActerSpaceStates =
      _spaceSetActerSpaceStatesPtr.asFunction<int Function(int)>();
  late final _spaceRemoveAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_remove_avatar",
  );

  late final _spaceRemoveAvatar =
      _spaceRemoveAvatarPtr.asFunction<int Function(int)>();
  late final _spaceTopicPtr =
      _lookup<ffi.NativeFunction<_SpaceTopicReturn Function(ffi.IntPtr)>>(
    "__Space_topic",
  );

  late final _spaceTopic =
      _spaceTopicPtr.asFunction<_SpaceTopicReturn Function(int)>();
  late final _spaceIsJoinedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Space_is_joined",
  );

  late final _spaceIsJoined = _spaceIsJoinedPtr.asFunction<int Function(int)>();
  late final _spaceSetTopicPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_topic");

  late final _spaceSetTopic =
      _spaceSetTopicPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_name");

  late final _spaceSetName =
      _spaceSetNamePtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceIsBookmarkedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Space_is_bookmarked",
  );

  late final _spaceIsBookmarked =
      _spaceIsBookmarkedPtr.asFunction<int Function(int)>();
  late final _spaceSetBookmarkedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__Space_set_bookmarked",
  );

  late final _spaceSetBookmarked =
      _spaceSetBookmarkedPtr.asFunction<int Function(int, int)>();
  late final _spaceActiveMembersIdsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_active_members_ids",
  );

  late final _spaceActiveMembersIds =
      _spaceActiveMembersIdsPtr.asFunction<int Function(int)>();
  late final _spaceActiveMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_active_members",
  );

  late final _spaceActiveMembers =
      _spaceActiveMembersPtr.asFunction<int Function(int)>();
  late final _spaceInvitedMembersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_invited_members",
  );

  late final _spaceInvitedMembers =
      _spaceInvitedMembersPtr.asFunction<int Function(int)>();
  late final _spaceGetRoomIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_get_room_id",
  );

  late final _spaceGetRoomId =
      _spaceGetRoomIdPtr.asFunction<int Function(int)>();
  late final _spaceInviteUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_invite_user");

  late final _spaceInviteUser =
      _spaceInviteUserPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceGetRoomIdStrPtr = _lookup<
          ffi.NativeFunction<_SpaceGetRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__Space_get_room_id_str");

  late final _spaceGetRoomIdStr = _spaceGetRoomIdStrPtr
      .asFunction<_SpaceGetRoomIdStrReturn Function(int)>();
  late final _spaceGetMemberPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_get_member");

  late final _spaceGetMember =
      _spaceGetMemberPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceGetMyMembershipPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_get_my_membership",
  );

  late final _spaceGetMyMembership =
      _spaceGetMyMembershipPtr.asFunction<int Function(int)>();
  late final _spaceIsEncryptedPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_is_encrypted",
  );

  late final _spaceIsEncrypted =
      _spaceIsEncryptedPtr.asFunction<int Function(int)>();
  late final _spaceIsPublicPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Space_is_public",
  );

  late final _spaceIsPublic = _spaceIsPublicPtr.asFunction<int Function(int)>();
  late final _spaceJoinRuleStrPtr =
      _lookup<ffi.NativeFunction<_SpaceJoinRuleStrReturn Function(ffi.IntPtr)>>(
    "__Space_join_rule_str",
  );

  late final _spaceJoinRuleStr =
      _spaceJoinRuleStrPtr.asFunction<_SpaceJoinRuleStrReturn Function(int)>();
  late final _spaceRestrictedRoomIdsStrPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_restricted_room_ids_str",
  );

  late final _spaceRestrictedRoomIdsStr =
      _spaceRestrictedRoomIdsStrPtr.asFunction<int Function(int)>();
  late final _spaceIsActerSpacePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_is_acter_space",
  );

  late final _spaceIsActerSpace =
      _spaceIsActerSpacePtr.asFunction<int Function(int)>();
  late final _spaceTaskListsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_task_lists",
  );

  late final _spaceTaskLists =
      _spaceTaskListsPtr.asFunction<int Function(int)>();
  late final _spaceTaskListDraftPtr = _lookup<
          ffi.NativeFunction<_SpaceTaskListDraftReturn Function(ffi.IntPtr)>>(
      "__Space_task_list_draft");

  late final _spaceTaskListDraft = _spaceTaskListDraftPtr
      .asFunction<_SpaceTaskListDraftReturn Function(int)>();
  late final _spaceLatestNewsEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__Space_latest_news_entries",
  );

  late final _spaceLatestNewsEntries =
      _spaceLatestNewsEntriesPtr.asFunction<int Function(int, int)>();
  late final _spaceLatestStoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__Space_latest_stories",
  );

  late final _spaceLatestStories =
      _spaceLatestStoriesPtr.asFunction<int Function(int, int)>();
  late final _spaceCalendarEventsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_calendar_events",
  );

  late final _spaceCalendarEvents =
      _spaceCalendarEventsPtr.asFunction<int Function(int)>();
  late final _spaceCalendarEventDraftPtr = _lookup<
          ffi
          .NativeFunction<_SpaceCalendarEventDraftReturn Function(ffi.IntPtr)>>(
      "__Space_calendar_event_draft");

  late final _spaceCalendarEventDraft = _spaceCalendarEventDraftPtr
      .asFunction<_SpaceCalendarEventDraftReturn Function(int)>();
  late final _spaceNewsDraftPtr =
      _lookup<ffi.NativeFunction<_SpaceNewsDraftReturn Function(ffi.IntPtr)>>(
    "__Space_news_draft",
  );

  late final _spaceNewsDraft =
      _spaceNewsDraftPtr.asFunction<_SpaceNewsDraftReturn Function(int)>();
  late final _spaceStoryDraftPtr =
      _lookup<ffi.NativeFunction<_SpaceStoryDraftReturn Function(ffi.IntPtr)>>(
    "__Space_story_draft",
  );

  late final _spaceStoryDraft =
      _spaceStoryDraftPtr.asFunction<_SpaceStoryDraftReturn Function(int)>();
  late final _spacePinsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_pins",
  );

  late final _spacePins = _spacePinsPtr.asFunction<int Function(int)>();
  late final _spacePinDraftPtr =
      _lookup<ffi.NativeFunction<_SpacePinDraftReturn Function(ffi.IntPtr)>>(
    "__Space_pin_draft",
  );

  late final _spacePinDraft =
      _spacePinDraftPtr.asFunction<_SpacePinDraftReturn Function(int)>();
  late final _spaceJoinPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_join",
  );

  late final _spaceJoin = _spaceJoinPtr.asFunction<int Function(int)>();
  late final _spaceLeavePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_leave",
  );

  late final _spaceLeave = _spaceLeavePtr.asFunction<int Function(int)>();
  late final _spacePowerLevelsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_power_levels",
  );

  late final _spacePowerLevels =
      _spacePowerLevelsPtr.asFunction<int Function(int)>();
  late final _spaceAppSettingsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_app_settings",
  );

  late final _spaceAppSettings =
      _spaceAppSettingsPtr.asFunction<int Function(int)>();
  late final _spaceUpdateAppSettingsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__Space_update_app_settings",
  );

  late final _spaceUpdateAppSettings =
      _spaceUpdateAppSettingsPtr.asFunction<int Function(int, int)>();
  late final _spaceUpdateFeaturePowerLevelsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Int32,
          )>>("__Space_update_feature_power_levels");

  late final _spaceUpdateFeaturePowerLevels = _spaceUpdateFeaturePowerLevelsPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _spaceUpdateRegularPowerLevelsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Int32,
          )>>("__Space_update_regular_power_levels");

  late final _spaceUpdateRegularPowerLevels = _spaceUpdateRegularPowerLevelsPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _spaceReportContentPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Int32,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_report_content");

  late final _spaceReportContent = _spaceReportContentPtr.asFunction<
      int Function(int, int, int, int, int, int, int, int, int, int)>();
  late final _spaceRedactContentPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_redact_content");

  late final _spaceRedactContent = _spaceRedactContentPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _spaceCategoriesPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_categories");

  late final _spaceCategories =
      _spaceCategoriesPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetCategoriesPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__Space_set_categories");

  late final _spaceSetCategories = _spaceSetCategoriesPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _spaceRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Space_ref_details",
  );

  late final _spaceRefDetails =
      _spaceRefDetailsPtr.asFunction<int Function(int)>();
  late final _spaceSetPolicyRuleRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_set_policy_rule_room");

  late final _spaceSetPolicyRuleRoom = _spaceSetPolicyRuleRoomPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _spaceSetPolicyRuleServerPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_set_policy_rule_server");

  late final _spaceSetPolicyRuleServer = _spaceSetPolicyRuleServerPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _spaceSetPolicyRuleUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_set_policy_rule_user");

  late final _spaceSetPolicyRuleUser = _spaceSetPolicyRuleUserPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _spaceSetEncryptionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_encryption");

  late final _spaceSetEncryption =
      _spaceSetEncryptionPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetGuestAccessPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_guest_access");

  late final _spaceSetGuestAccess =
      _spaceSetGuestAccessPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetHistoryVisibilityPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_history_visibility");

  late final _spaceSetHistoryVisibility = _spaceSetHistoryVisibilityPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _spaceSetJoinRulesPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_join_rules");

  late final _spaceSetJoinRules =
      _spaceSetJoinRulesPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetPinnedEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Space_set_pinned_events");

  late final _spaceSetPinnedEvents =
      _spaceSetPinnedEventsPtr.asFunction<int Function(int, int, int, int)>();
  late final _spaceSetPowerLevelsBanPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_ban",
  );

  late final _spaceSetPowerLevelsBan =
      _spaceSetPowerLevelsBanPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Int32,
          )>>("__Space_set_power_levels_events");

  late final _spaceSetPowerLevelsEvents = _spaceSetPowerLevelsEventsPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _spaceSetPowerLevelsEventsDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_events_default",
  );

  late final _spaceSetPowerLevelsEventsDefault =
      _spaceSetPowerLevelsEventsDefaultPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsInvitePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_invite",
  );

  late final _spaceSetPowerLevelsInvite =
      _spaceSetPowerLevelsInvitePtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsKickPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_kick",
  );

  late final _spaceSetPowerLevelsKick =
      _spaceSetPowerLevelsKickPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsRedactPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_redact",
  );

  late final _spaceSetPowerLevelsRedact =
      _spaceSetPowerLevelsRedactPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsStateDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_state_default",
  );

  late final _spaceSetPowerLevelsStateDefault =
      _spaceSetPowerLevelsStateDefaultPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsUsersDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_users_default",
  );

  late final _spaceSetPowerLevelsUsersDefault =
      _spaceSetPowerLevelsUsersDefaultPtr.asFunction<int Function(int, int)>();
  late final _spaceSetPowerLevelsNotificationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Int32)>>(
    "__Space_set_power_levels_notifications",
  );

  late final _spaceSetPowerLevelsNotifications =
      _spaceSetPowerLevelsNotificationsPtr.asFunction<int Function(int, int)>();
  late final _spaceSetServerAclPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_set_server_acl");

  late final _spaceSetServerAcl = _spaceSetServerAclPtr
      .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _spaceSetTombstonePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Space_set_tombstone");

  late final _spaceSetTombstone = _spaceSetTombstonePtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _memberGetProfilePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Member_get_profile",
  );

  late final _memberGetProfile =
      _memberGetProfilePtr.asFunction<int Function(int)>();
  late final _memberUserIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Member_user_id",
  );

  late final _memberUserId = _memberUserIdPtr.asFunction<int Function(int)>();
  late final _memberRoomIdStrPtr =
      _lookup<ffi.NativeFunction<_MemberRoomIdStrReturn Function(ffi.IntPtr)>>(
    "__Member_room_id_str",
  );

  late final _memberRoomIdStr =
      _memberRoomIdStrPtr.asFunction<_MemberRoomIdStrReturn Function(int)>();
  late final _memberMembershipStatusStrPtr = _lookup<
      ffi.NativeFunction<
          _MemberMembershipStatusStrReturn Function(
              ffi.IntPtr)>>("__Member_membership_status_str");

  late final _memberMembershipStatusStr = _memberMembershipStatusStrPtr
      .asFunction<_MemberMembershipStatusStrReturn Function(int)>();
  late final _memberPowerLevelPtr =
      _lookup<ffi.NativeFunction<ffi.Int64 Function(ffi.IntPtr)>>(
    "__Member_power_level",
  );

  late final _memberPowerLevel =
      _memberPowerLevelPtr.asFunction<int Function(int)>();
  late final _memberCanStringPtr = _lookup<
      ffi.NativeFunction<
          ffi.Uint8 Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Member_can_string");

  late final _memberCanString =
      _memberCanStringPtr.asFunction<int Function(int, int, int, int)>();
  late final _memberIsIgnoredPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Member_is_ignored",
  );

  late final _memberIsIgnored =
      _memberIsIgnoredPtr.asFunction<int Function(int)>();
  late final _memberIgnorePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Member_ignore",
  );

  late final _memberIgnore = _memberIgnorePtr.asFunction<int Function(int)>();
  late final _memberUnignorePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Member_unignore",
  );

  late final _memberUnignore =
      _memberUnignorePtr.asFunction<int Function(int)>();
  late final _memberKickPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Member_kick");

  late final _memberKick =
      _memberKickPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _memberBanPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Member_ban");

  late final _memberBan =
      _memberBanPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _memberUnbanPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Member_unban");

  late final _memberUnban =
      _memberUnbanPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _acterUserAppSettingsAutoDownloadChatPtr = _lookup<
      ffi.NativeFunction<
          _ActerUserAppSettingsAutoDownloadChatReturn Function(
              ffi.IntPtr)>>("__ActerUserAppSettings_auto_download_chat");

  late final _acterUserAppSettingsAutoDownloadChat =
      _acterUserAppSettingsAutoDownloadChatPtr.asFunction<
          _ActerUserAppSettingsAutoDownloadChatReturn Function(int)>();
  late final _acterUserAppSettingsTypingNoticePtr = _lookup<
      ffi.NativeFunction<
          _ActerUserAppSettingsTypingNoticeReturn Function(
              ffi.IntPtr)>>("__ActerUserAppSettings_typing_notice");

  late final _acterUserAppSettingsTypingNotice =
      _acterUserAppSettingsTypingNoticePtr
          .asFunction<_ActerUserAppSettingsTypingNoticeReturn Function(int)>();
  late final _acterUserAppSettingsAutoSubscribeOnActivityPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__ActerUserAppSettings_auto_subscribe_on_activity",
  );

  late final _acterUserAppSettingsAutoSubscribeOnActivity =
      _acterUserAppSettingsAutoSubscribeOnActivityPtr
          .asFunction<int Function(int)>();
  late final _acterUserAppSettingsUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerUserAppSettings_update_builder",
  );

  late final _acterUserAppSettingsUpdateBuilder =
      _acterUserAppSettingsUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _acterUserAppSettingsBuilderAutoDownloadChatPtr = _lookup<
          ffi.NativeFunction<
              ffi.Void Function(
                  ffi.IntPtr, ffi.IntPtr, ffi.UintPtr, ffi.UintPtr)>>(
      "__ActerUserAppSettingsBuilder_auto_download_chat");

  late final _acterUserAppSettingsBuilderAutoDownloadChat =
      _acterUserAppSettingsBuilderAutoDownloadChatPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _acterUserAppSettingsBuilderTypingNoticePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__ActerUserAppSettingsBuilder_typing_notice",
  );

  late final _acterUserAppSettingsBuilderTypingNotice =
      _acterUserAppSettingsBuilderTypingNoticePtr
          .asFunction<void Function(int, int)>();
  late final _acterUserAppSettingsBuilderAutoSubscribeOnActivityPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__ActerUserAppSettingsBuilder_auto_subscribe_on_activity",
  );

  late final _acterUserAppSettingsBuilderAutoSubscribeOnActivity =
      _acterUserAppSettingsBuilderAutoSubscribeOnActivityPtr
          .asFunction<void Function(int, int)>();
  late final _acterUserAppSettingsBuilderSendPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__ActerUserAppSettingsBuilder_send",
  );

  late final _acterUserAppSettingsBuilderSend =
      _acterUserAppSettingsBuilderSendPtr.asFunction<int Function(int)>();
  late final _appPermissionsBuilderNewsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__AppPermissionsBuilder_news",
  );

  late final _appPermissionsBuilderNews =
      _appPermissionsBuilderNewsPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderPinsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__AppPermissionsBuilder_pins",
  );

  late final _appPermissionsBuilderPins =
      _appPermissionsBuilderPinsPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderStoriesPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__AppPermissionsBuilder_stories",
  );

  late final _appPermissionsBuilderStories =
      _appPermissionsBuilderStoriesPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderCalendarEventsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__AppPermissionsBuilder_calendar_events",
  );

  late final _appPermissionsBuilderCalendarEvents =
      _appPermissionsBuilderCalendarEventsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderTasksPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__AppPermissionsBuilder_tasks",
  );

  late final _appPermissionsBuilderTasks =
      _appPermissionsBuilderTasksPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderNewsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_news_permissions",
  );

  late final _appPermissionsBuilderNewsPermissions =
      _appPermissionsBuilderNewsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderStoriesPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_stories_permissions",
  );

  late final _appPermissionsBuilderStoriesPermissions =
      _appPermissionsBuilderStoriesPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderCalendarEventsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_calendar_events_permissions",
  );

  late final _appPermissionsBuilderCalendarEventsPermissions =
      _appPermissionsBuilderCalendarEventsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderTaskListsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_task_lists_permissions",
  );

  late final _appPermissionsBuilderTaskListsPermissions =
      _appPermissionsBuilderTaskListsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderTasksPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_tasks_permissions",
  );

  late final _appPermissionsBuilderTasksPermissions =
      _appPermissionsBuilderTasksPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderPinsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_pins_permissions",
  );

  late final _appPermissionsBuilderPinsPermissions =
      _appPermissionsBuilderPinsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderCommentsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_comments_permissions",
  );

  late final _appPermissionsBuilderCommentsPermissions =
      _appPermissionsBuilderCommentsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderAttachmentsPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_attachments_permissions",
  );

  late final _appPermissionsBuilderAttachmentsPermissions =
      _appPermissionsBuilderAttachmentsPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderRsvpPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_rsvp_permissions",
  );

  late final _appPermissionsBuilderRsvpPermissions =
      _appPermissionsBuilderRsvpPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderKickPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_kick",
  );

  late final _appPermissionsBuilderKick =
      _appPermissionsBuilderKickPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderBanPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_ban",
  );

  late final _appPermissionsBuilderBan =
      _appPermissionsBuilderBanPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderInvitePtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_invite",
  );

  late final _appPermissionsBuilderInvite =
      _appPermissionsBuilderInvitePtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderRedactPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_redact",
  );

  late final _appPermissionsBuilderRedact =
      _appPermissionsBuilderRedactPtr.asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderEventsDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_events_default",
  );

  late final _appPermissionsBuilderEventsDefault =
      _appPermissionsBuilderEventsDefaultPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderUsersDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_users_default",
  );

  late final _appPermissionsBuilderUsersDefault =
      _appPermissionsBuilderUsersDefaultPtr
          .asFunction<void Function(int, int)>();
  late final _appPermissionsBuilderStateDefaultPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint32)>>(
    "__AppPermissionsBuilder_state_default",
  );

  late final _appPermissionsBuilderStateDefault =
      _appPermissionsBuilderStateDefaultPtr
          .asFunction<void Function(int, int)>();
  late final _accountUserIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_user_id",
  );

  late final _accountUserId = _accountUserIdPtr.asFunction<int Function(int)>();
  late final _accountDisplayNamePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_display_name",
  );

  late final _accountDisplayName =
      _accountDisplayNamePtr.asFunction<int Function(int)>();
  late final _accountSetDisplayNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_set_display_name");

  late final _accountSetDisplayName =
      _accountSetDisplayNamePtr.asFunction<int Function(int, int, int, int)>();
  late final _accountAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.IntPtr)>>("__Account_avatar");

  late final _accountAvatar =
      _accountAvatarPtr.asFunction<int Function(int, int, int)>();
  late final _accountUploadAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_upload_avatar");

  late final _accountUploadAvatar =
      _accountUploadAvatarPtr.asFunction<int Function(int, int, int, int)>();
  late final _accountIgnoredUsersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_ignored_users",
  );

  late final _accountIgnoredUsers =
      _accountIgnoredUsersPtr.asFunction<int Function(int)>();
  late final _accountIgnoreUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_ignore_user");

  late final _accountIgnoreUser =
      _accountIgnoreUserPtr.asFunction<int Function(int, int, int, int)>();
  late final _accountUnignoreUserPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_unignore_user");

  late final _accountUnignoreUser =
      _accountUnignoreUserPtr.asFunction<int Function(int, int, int, int)>();
  late final _accountActerAppSettingsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_acter_app_settings",
  );

  late final _accountActerAppSettings =
      _accountActerAppSettingsPtr.asFunction<int Function(int)>();
  late final _accountSubscribeAppSettingsStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_subscribe_app_settings_stream",
  );

  late final _accountSubscribeAppSettingsStream =
      _accountSubscribeAppSettingsStreamPtr.asFunction<int Function(int)>();
  late final _accountDeactivatePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_deactivate");

  late final _accountDeactivate =
      _accountDeactivatePtr.asFunction<int Function(int, int, int, int)>();
  late final _accountChangePasswordPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Account_change_password");

  late final _accountChangePassword = _accountChangePasswordPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _accountConfirmedEmailAddressesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_confirmed_email_addresses",
  );

  late final _accountConfirmedEmailAddresses =
      _accountConfirmedEmailAddressesPtr.asFunction<int Function(int)>();
  late final _accountRequestedEmailAddressesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_requested_email_addresses",
  );

  late final _accountRequestedEmailAddresses =
      _accountRequestedEmailAddressesPtr.asFunction<int Function(int)>();
  late final _accountRequest3pidManagementTokenViaEmailPtr = _lookup<
          ffi.NativeFunction<
              ffi.IntPtr Function(
                  ffi.IntPtr, ffi.IntPtr, ffi.UintPtr, ffi.UintPtr)>>(
      "__Account_request_3pid_management_token_via_email");

  late final _accountRequest3pidManagementTokenViaEmail =
      _accountRequest3pidManagementTokenViaEmailPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _accountExternalIdsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_external_ids",
  );

  late final _accountExternalIds =
      _accountExternalIdsPtr.asFunction<int Function(int)>();
  late final _accountTryConfirmEmailStatusPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Account_try_confirm_email_status");

  late final _accountTryConfirmEmailStatus = _accountTryConfirmEmailStatusPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _accountSubmitTokenFromEmailPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Account_submit_token_from_email");

  late final _accountSubmitTokenFromEmail =
      _accountSubmitTokenFromEmailPtr.asFunction<
          int Function(int, int, int, int, int, int, int, int, int, int)>();
  late final _accountRemoveEmailAddressPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Account_remove_email_address");

  late final _accountRemoveEmailAddress = _accountRemoveEmailAddressPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _accountBookmarksPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Account_bookmarks",
  );

  late final _accountBookmarks =
      _accountBookmarksPtr.asFunction<int Function(int)>();
  late final _externalIdAddressPtr = _lookup<
          ffi.NativeFunction<_ExternalIdAddressReturn Function(ffi.IntPtr)>>(
      "__ExternalId_address");

  late final _externalIdAddress = _externalIdAddressPtr
      .asFunction<_ExternalIdAddressReturn Function(int)>();
  late final _externalIdMediumPtr =
      _lookup<ffi.NativeFunction<_ExternalIdMediumReturn Function(ffi.IntPtr)>>(
    "__ExternalId_medium",
  );

  late final _externalIdMedium =
      _externalIdMediumPtr.asFunction<_ExternalIdMediumReturn Function(int)>();
  late final _externalIdAddedAtPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__ExternalId_added_at",
  );

  late final _externalIdAddedAt =
      _externalIdAddedAtPtr.asFunction<int Function(int)>();
  late final _externalIdValidatedAtPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__ExternalId_validated_at",
  );

  late final _externalIdValidatedAt =
      _externalIdValidatedAtPtr.asFunction<int Function(int)>();
  late final _threePidEmailTokenResponseSidPtr = _lookup<
      ffi.NativeFunction<
          _ThreePidEmailTokenResponseSidReturn Function(
              ffi.IntPtr)>>("__ThreePidEmailTokenResponse_sid");

  late final _threePidEmailTokenResponseSid = _threePidEmailTokenResponseSidPtr
      .asFunction<_ThreePidEmailTokenResponseSidReturn Function(int)>();
  late final _threePidEmailTokenResponseSubmitUrlPtr = _lookup<
      ffi.NativeFunction<
          _ThreePidEmailTokenResponseSubmitUrlReturn Function(
              ffi.IntPtr)>>("__ThreePidEmailTokenResponse_submit_url");

  late final _threePidEmailTokenResponseSubmitUrl =
      _threePidEmailTokenResponseSubmitUrlPtr.asFunction<
          _ThreePidEmailTokenResponseSubmitUrlReturn Function(int)>();
  late final _threePidEmailTokenResponseClientSecretPtr = _lookup<
      ffi.NativeFunction<
          _ThreePidEmailTokenResponseClientSecretReturn Function(
              ffi.IntPtr)>>("__ThreePidEmailTokenResponse_client_secret");

  late final _threePidEmailTokenResponseClientSecret =
      _threePidEmailTokenResponseClientSecretPtr.asFunction<
          _ThreePidEmailTokenResponseClientSecretReturn Function(int)>();
  late final _bookmarksEntriesPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Bookmarks_entries");

  late final _bookmarksEntries =
      _bookmarksEntriesPtr.asFunction<int Function(int, int, int, int)>();
  late final _bookmarksAddPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Bookmarks_add");

  late final _bookmarksAdd = _bookmarksAddPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _bookmarksRemovePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Bookmarks_remove");

  late final _bookmarksRemove = _bookmarksRemovePtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _syncStateFirstSyncedRxPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SyncState_first_synced_rx",
  );

  late final _syncStateFirstSyncedRx =
      _syncStateFirstSyncedRxPtr.asFunction<int Function(int)>();
  late final _syncStateSyncErrorRxPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SyncState_sync_error_rx",
  );

  late final _syncStateSyncErrorRx =
      _syncStateSyncErrorRxPtr.asFunction<int Function(int)>();
  late final _syncStateCancelPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr)>>(
    "__SyncState_cancel",
  );

  late final _syncStateCancel =
      _syncStateCancelPtr.asFunction<void Function(int)>();
  late final _publicSearchResultItemNamePtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemNameReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_name");

  late final _publicSearchResultItemName = _publicSearchResultItemNamePtr
      .asFunction<_PublicSearchResultItemNameReturn Function(int)>();
  late final _publicSearchResultItemTopicPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemTopicReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_topic");

  late final _publicSearchResultItemTopic = _publicSearchResultItemTopicPtr
      .asFunction<_PublicSearchResultItemTopicReturn Function(int)>();
  late final _publicSearchResultItemWorldReadablePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__PublicSearchResultItem_world_readable",
  );

  late final _publicSearchResultItemWorldReadable =
      _publicSearchResultItemWorldReadablePtr.asFunction<int Function(int)>();
  late final _publicSearchResultItemGuestCanJoinPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__PublicSearchResultItem_guest_can_join",
  );

  late final _publicSearchResultItemGuestCanJoin =
      _publicSearchResultItemGuestCanJoinPtr.asFunction<int Function(int)>();
  late final _publicSearchResultItemCanonicalAliasStrPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemCanonicalAliasStrReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_canonical_alias_str");

  late final _publicSearchResultItemCanonicalAliasStr =
      _publicSearchResultItemCanonicalAliasStrPtr.asFunction<
          _PublicSearchResultItemCanonicalAliasStrReturn Function(int)>();
  late final _publicSearchResultItemNumJoinedMembersPtr =
      _lookup<ffi.NativeFunction<ffi.Uint64 Function(ffi.IntPtr)>>(
    "__PublicSearchResultItem_num_joined_members",
  );

  late final _publicSearchResultItemNumJoinedMembers =
      _publicSearchResultItemNumJoinedMembersPtr
          .asFunction<int Function(int)>();
  late final _publicSearchResultItemRoomIdStrPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemRoomIdStrReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_room_id_str");

  late final _publicSearchResultItemRoomIdStr =
      _publicSearchResultItemRoomIdStrPtr
          .asFunction<_PublicSearchResultItemRoomIdStrReturn Function(int)>();
  late final _publicSearchResultItemAvatarUrlStrPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemAvatarUrlStrReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_avatar_url_str");

  late final _publicSearchResultItemAvatarUrlStr =
      _publicSearchResultItemAvatarUrlStrPtr.asFunction<
          _PublicSearchResultItemAvatarUrlStrReturn Function(int)>();
  late final _publicSearchResultItemJoinRuleStrPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemJoinRuleStrReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_join_rule_str");

  late final _publicSearchResultItemJoinRuleStr =
      _publicSearchResultItemJoinRuleStrPtr
          .asFunction<_PublicSearchResultItemJoinRuleStrReturn Function(int)>();
  late final _publicSearchResultItemRoomTypeStrPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemRoomTypeStrReturn Function(
              ffi.IntPtr)>>("__PublicSearchResultItem_room_type_str");

  late final _publicSearchResultItemRoomTypeStr =
      _publicSearchResultItemRoomTypeStrPtr
          .asFunction<_PublicSearchResultItemRoomTypeStrReturn Function(int)>();
  late final _publicSearchResultItemHasAvatarPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__PublicSearchResultItem_has_avatar",
  );

  late final _publicSearchResultItemHasAvatar =
      _publicSearchResultItemHasAvatarPtr.asFunction<int Function(int)>();
  late final _publicSearchResultItemGetAvatarPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.IntPtr)>>("__PublicSearchResultItem_get_avatar");

  late final _publicSearchResultItemGetAvatar =
      _publicSearchResultItemGetAvatarPtr
          .asFunction<int Function(int, int, int)>();
  late final _publicSearchResultNextBatchPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultNextBatchReturn Function(
              ffi.IntPtr)>>("__PublicSearchResult_next_batch");

  late final _publicSearchResultNextBatch = _publicSearchResultNextBatchPtr
      .asFunction<_PublicSearchResultNextBatchReturn Function(int)>();
  late final _publicSearchResultPrevBatchPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultPrevBatchReturn Function(
              ffi.IntPtr)>>("__PublicSearchResult_prev_batch");

  late final _publicSearchResultPrevBatch = _publicSearchResultPrevBatchPtr
      .asFunction<_PublicSearchResultPrevBatchReturn Function(int)>();
  late final _publicSearchResultTotalRoomCountEstimatePtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultTotalRoomCountEstimateReturn Function(
              ffi.IntPtr)>>("__PublicSearchResult_total_room_count_estimate");

  late final _publicSearchResultTotalRoomCountEstimate =
      _publicSearchResultTotalRoomCountEstimatePtr.asFunction<
          _PublicSearchResultTotalRoomCountEstimateReturn Function(int)>();
  late final _publicSearchResultChunksPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__PublicSearchResult_chunks",
  );

  late final _publicSearchResultChunks =
      _publicSearchResultChunksPtr.asFunction<int Function(int)>();
  late final _notificationSenderUserIdPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSenderUserIdReturn Function(
              ffi.IntPtr)>>("__NotificationSender_user_id");

  late final _notificationSenderUserId = _notificationSenderUserIdPtr
      .asFunction<_NotificationSenderUserIdReturn Function(int)>();
  late final _notificationSenderDisplayNamePtr = _lookup<
      ffi.NativeFunction<
          _NotificationSenderDisplayNameReturn Function(
              ffi.IntPtr)>>("__NotificationSender_display_name");

  late final _notificationSenderDisplayName = _notificationSenderDisplayNamePtr
      .asFunction<_NotificationSenderDisplayNameReturn Function(int)>();
  late final _notificationSenderHasImagePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NotificationSender_has_image",
  );

  late final _notificationSenderHasImage =
      _notificationSenderHasImagePtr.asFunction<int Function(int)>();
  late final _notificationSenderImagePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationSender_image",
  );

  late final _notificationSenderImage =
      _notificationSenderImagePtr.asFunction<int Function(int)>();
  late final _notificationRoomRoomIdPtr = _lookup<
          ffi
          .NativeFunction<_NotificationRoomRoomIdReturn Function(ffi.IntPtr)>>(
      "__NotificationRoom_room_id");

  late final _notificationRoomRoomId = _notificationRoomRoomIdPtr
      .asFunction<_NotificationRoomRoomIdReturn Function(int)>();
  late final _notificationRoomDisplayNamePtr = _lookup<
      ffi.NativeFunction<
          _NotificationRoomDisplayNameReturn Function(
              ffi.IntPtr)>>("__NotificationRoom_display_name");

  late final _notificationRoomDisplayName = _notificationRoomDisplayNamePtr
      .asFunction<_NotificationRoomDisplayNameReturn Function(int)>();
  late final _notificationRoomHasImagePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NotificationRoom_has_image",
  );

  late final _notificationRoomHasImage =
      _notificationRoomHasImagePtr.asFunction<int Function(int)>();
  late final _notificationRoomImagePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationRoom_image",
  );

  late final _notificationRoomImage =
      _notificationRoomImagePtr.asFunction<int Function(int)>();
  late final _notificationItemPushStylePtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemPushStyleReturn Function(
              ffi.IntPtr)>>("__NotificationItem_push_style");

  late final _notificationItemPushStyle = _notificationItemPushStylePtr
      .asFunction<_NotificationItemPushStyleReturn Function(int)>();
  late final _notificationItemTitlePtr = _lookup<
          ffi
          .NativeFunction<_NotificationItemTitleReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_title");

  late final _notificationItemTitle = _notificationItemTitlePtr
      .asFunction<_NotificationItemTitleReturn Function(int)>();
  late final _notificationItemSenderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationItem_sender",
  );

  late final _notificationItemSender =
      _notificationItemSenderPtr.asFunction<int Function(int)>();
  late final _notificationItemParentPtr = _lookup<
          ffi
          .NativeFunction<_NotificationItemParentReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_parent");

  late final _notificationItemParent = _notificationItemParentPtr
      .asFunction<_NotificationItemParentReturn Function(int)>();
  late final _notificationItemParentIdStrPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemParentIdStrReturn Function(
              ffi.IntPtr)>>("__NotificationItem_parent_id_str");

  late final _notificationItemParentIdStr = _notificationItemParentIdStrPtr
      .asFunction<_NotificationItemParentIdStrReturn Function(int)>();
  late final _notificationItemRoomPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationItem_room",
  );

  late final _notificationItemRoom =
      _notificationItemRoomPtr.asFunction<int Function(int)>();
  late final _notificationItemTargetUrlPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemTargetUrlReturn Function(
              ffi.IntPtr)>>("__NotificationItem_target_url");

  late final _notificationItemTargetUrl = _notificationItemTargetUrlPtr
      .asFunction<_NotificationItemTargetUrlReturn Function(int)>();
  late final _notificationItemBodyPtr = _lookup<
          ffi.NativeFunction<_NotificationItemBodyReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_body");

  late final _notificationItemBody = _notificationItemBodyPtr
      .asFunction<_NotificationItemBodyReturn Function(int)>();
  late final _notificationItemIconUrlPtr = _lookup<
          ffi
          .NativeFunction<_NotificationItemIconUrlReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_icon_url");

  late final _notificationItemIconUrl = _notificationItemIconUrlPtr
      .asFunction<_NotificationItemIconUrlReturn Function(int)>();
  late final _notificationItemThreadIdPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemThreadIdReturn Function(
              ffi.IntPtr)>>("__NotificationItem_thread_id");

  late final _notificationItemThreadId = _notificationItemThreadIdPtr
      .asFunction<_NotificationItemThreadIdReturn Function(int)>();
  late final _notificationItemNoisyPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NotificationItem_noisy",
  );

  late final _notificationItemNoisy =
      _notificationItemNoisyPtr.asFunction<int Function(int)>();
  late final _notificationItemHasImagePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NotificationItem_has_image",
  );

  late final _notificationItemHasImage =
      _notificationItemHasImagePtr.asFunction<int Function(int)>();
  late final _notificationItemImagePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationItem_image",
  );

  late final _notificationItemImage =
      _notificationItemImagePtr.asFunction<int Function(int)>();
  late final _notificationItemImagePathPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__NotificationItem_image_path");

  late final _notificationItemImagePath = _notificationItemImagePathPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _notificationItemRoomInviteStrPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemRoomInviteStrReturn Function(
              ffi.IntPtr)>>("__NotificationItem_room_invite_str");

  late final _notificationItemRoomInviteStr = _notificationItemRoomInviteStrPtr
      .asFunction<_NotificationItemRoomInviteStrReturn Function(int)>();
  late final _notificationItemReactionKeyPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemReactionKeyReturn Function(
              ffi.IntPtr)>>("__NotificationItem_reaction_key");

  late final _notificationItemReactionKey = _notificationItemReactionKeyPtr
      .asFunction<_NotificationItemReactionKeyReturn Function(int)>();
  late final _notificationItemUtcStartPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemUtcStartReturn Function(
              ffi.IntPtr)>>("__NotificationItem_utc_start");

  late final _notificationItemUtcStart = _notificationItemUtcStartPtr
      .asFunction<_NotificationItemUtcStartReturn Function(int)>();
  late final _notificationItemUtcEndPtr = _lookup<
          ffi
          .NativeFunction<_NotificationItemUtcEndReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_utc_end");

  late final _notificationItemUtcEnd = _notificationItemUtcEndPtr
      .asFunction<_NotificationItemUtcEndReturn Function(int)>();
  late final _notificationItemDueDatePtr = _lookup<
          ffi
          .NativeFunction<_NotificationItemDueDateReturn Function(ffi.IntPtr)>>(
      "__NotificationItem_due_date");

  late final _notificationItemDueDate = _notificationItemDueDatePtr
      .asFunction<_NotificationItemDueDateReturn Function(int)>();
  late final _notificationItemMentionsYouPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__NotificationItem_mentions_you",
  );

  late final _notificationItemMentionsYou =
      _notificationItemMentionsYouPtr.asFunction<int Function(int)>();
  late final _notificationItemWhomPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationItem_whom",
  );

  late final _notificationItemWhom =
      _notificationItemWhomPtr.asFunction<int Function(int)>();
  late final _pusherIsEmailPusherPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Pusher_is_email_pusher",
  );

  late final _pusherIsEmailPusher =
      _pusherIsEmailPusherPtr.asFunction<int Function(int)>();
  late final _pusherPushkeyPtr =
      _lookup<ffi.NativeFunction<_PusherPushkeyReturn Function(ffi.IntPtr)>>(
    "__Pusher_pushkey",
  );

  late final _pusherPushkey =
      _pusherPushkeyPtr.asFunction<_PusherPushkeyReturn Function(int)>();
  late final _pusherAppIdPtr =
      _lookup<ffi.NativeFunction<_PusherAppIdReturn Function(ffi.IntPtr)>>(
    "__Pusher_app_id",
  );

  late final _pusherAppId =
      _pusherAppIdPtr.asFunction<_PusherAppIdReturn Function(int)>();
  late final _pusherAppDisplayNamePtr = _lookup<
          ffi.NativeFunction<_PusherAppDisplayNameReturn Function(ffi.IntPtr)>>(
      "__Pusher_app_display_name");

  late final _pusherAppDisplayName = _pusherAppDisplayNamePtr
      .asFunction<_PusherAppDisplayNameReturn Function(int)>();
  late final _pusherDeviceDisplayNamePtr = _lookup<
          ffi
          .NativeFunction<_PusherDeviceDisplayNameReturn Function(ffi.IntPtr)>>(
      "__Pusher_device_display_name");

  late final _pusherDeviceDisplayName = _pusherDeviceDisplayNamePtr
      .asFunction<_PusherDeviceDisplayNameReturn Function(int)>();
  late final _pusherLangPtr =
      _lookup<ffi.NativeFunction<_PusherLangReturn Function(ffi.IntPtr)>>(
    "__Pusher_lang",
  );

  late final _pusherLang =
      _pusherLangPtr.asFunction<_PusherLangReturn Function(int)>();
  late final _pusherProfileTagPtr =
      _lookup<ffi.NativeFunction<_PusherProfileTagReturn Function(ffi.IntPtr)>>(
    "__Pusher_profile_tag",
  );

  late final _pusherProfileTag =
      _pusherProfileTagPtr.asFunction<_PusherProfileTagReturn Function(int)>();
  late final _pusherDeletePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Pusher_delete",
  );

  late final _pusherDelete = _pusherDeletePtr.asFunction<int Function(int)>();
  late final _createConvoSettingsBuilderSetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateConvoSettingsBuilder_set_name");

  late final _createConvoSettingsBuilderSetName =
      _createConvoSettingsBuilderSetNamePtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createConvoSettingsBuilderSetAliasPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateConvoSettingsBuilder_set_alias");

  late final _createConvoSettingsBuilderSetAlias =
      _createConvoSettingsBuilderSetAliasPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createConvoSettingsBuilderAddInviteePtr = _lookup<
      ffi.NativeFunction<
          _CreateConvoSettingsBuilderAddInviteeReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CreateConvoSettingsBuilder_add_invitee");

  late final _createConvoSettingsBuilderAddInvitee =
      _createConvoSettingsBuilderAddInviteePtr.asFunction<
          _CreateConvoSettingsBuilderAddInviteeReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _createConvoSettingsBuilderSetTopicPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateConvoSettingsBuilder_set_topic");

  late final _createConvoSettingsBuilderSetTopic =
      _createConvoSettingsBuilderSetTopicPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createConvoSettingsBuilderSetAvatarUriPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateConvoSettingsBuilder_set_avatar_uri");

  late final _createConvoSettingsBuilderSetAvatarUri =
      _createConvoSettingsBuilderSetAvatarUriPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createConvoSettingsBuilderSetParentPtr = _lookup<
      ffi.NativeFunction<
          _CreateConvoSettingsBuilderSetParentReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CreateConvoSettingsBuilder_set_parent");

  late final _createConvoSettingsBuilderSetParent =
      _createConvoSettingsBuilderSetParentPtr.asFunction<
          _CreateConvoSettingsBuilderSetParentReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _createConvoSettingsBuilderBuildPtr = _lookup<
      ffi.NativeFunction<
          _CreateConvoSettingsBuilderBuildReturn Function(
              ffi.IntPtr)>>("__CreateConvoSettingsBuilder_build");

  late final _createConvoSettingsBuilderBuild =
      _createConvoSettingsBuilderBuildPtr
          .asFunction<_CreateConvoSettingsBuilderBuildReturn Function(int)>();
  late final _createSpaceSettingsBuilderSetNamePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_set_name");

  late final _createSpaceSettingsBuilderSetName =
      _createSpaceSettingsBuilderSetNamePtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderSetVisibilityPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_set_visibility");

  late final _createSpaceSettingsBuilderSetVisibility =
      _createSpaceSettingsBuilderSetVisibilityPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderJoinRulePtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_join_rule");

  late final _createSpaceSettingsBuilderJoinRule =
      _createSpaceSettingsBuilderJoinRulePtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderAddInviteePtr = _lookup<
      ffi.NativeFunction<
          _CreateSpaceSettingsBuilderAddInviteeReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CreateSpaceSettingsBuilder_add_invitee");

  late final _createSpaceSettingsBuilderAddInvitee =
      _createSpaceSettingsBuilderAddInviteePtr.asFunction<
          _CreateSpaceSettingsBuilderAddInviteeReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _createSpaceSettingsBuilderSetAliasPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_set_alias");

  late final _createSpaceSettingsBuilderSetAlias =
      _createSpaceSettingsBuilderSetAliasPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderSetTopicPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_set_topic");

  late final _createSpaceSettingsBuilderSetTopic =
      _createSpaceSettingsBuilderSetTopicPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderSetAvatarUriPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__CreateSpaceSettingsBuilder_set_avatar_uri");

  late final _createSpaceSettingsBuilderSetAvatarUri =
      _createSpaceSettingsBuilderSetAvatarUriPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _createSpaceSettingsBuilderSetParentPtr = _lookup<
      ffi.NativeFunction<
          _CreateSpaceSettingsBuilderSetParentReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__CreateSpaceSettingsBuilder_set_parent");

  late final _createSpaceSettingsBuilderSetParent =
      _createSpaceSettingsBuilderSetParentPtr.asFunction<
          _CreateSpaceSettingsBuilderSetParentReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _createSpaceSettingsBuilderSetPermissionsPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__CreateSpaceSettingsBuilder_set_permissions",
  );

  late final _createSpaceSettingsBuilderSetPermissions =
      _createSpaceSettingsBuilderSetPermissionsPtr
          .asFunction<void Function(int, int)>();
  late final _createSpaceSettingsBuilderBuildPtr = _lookup<
      ffi.NativeFunction<
          _CreateSpaceSettingsBuilderBuildReturn Function(
              ffi.IntPtr)>>("__CreateSpaceSettingsBuilder_build");

  late final _createSpaceSettingsBuilderBuild =
      _createSpaceSettingsBuilderBuildPtr
          .asFunction<_CreateSpaceSettingsBuilderBuildReturn Function(int)>();
  late final _invitationsManagerRoomInvitationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__InvitationsManager_room_invitations",
  );

  late final _invitationsManagerRoomInvitations =
      _invitationsManagerRoomInvitationsPtr.asFunction<int Function(int)>();
  late final _invitationsManagerObjectInvitationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__InvitationsManager_object_invitations",
  );

  late final _invitationsManagerObjectInvitations =
      _invitationsManagerObjectInvitationsPtr.asFunction<int Function(int)>();
  late final _invitationsManagerSubscribeStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__InvitationsManager_subscribe_stream",
  );

  late final _invitationsManagerSubscribeStream =
      _invitationsManagerSubscribeStreamPtr.asFunction<int Function(int)>();
  late final _clientStartSyncPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_start_sync",
  );

  late final _clientStartSync =
      _clientStartSyncPtr.asFunction<int Function(int)>();
  late final _clientRestoreTokenPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_restore_token",
  );

  late final _clientRestoreToken =
      _clientRestoreTokenPtr.asFunction<int Function(int)>();
  late final _clientIsGuestPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Client_is_guest",
  );

  late final _clientIsGuest = _clientIsGuestPtr.asFunction<int Function(int)>();
  late final _clientHasFirstSyncedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Client_has_first_synced",
  );

  late final _clientHasFirstSynced =
      _clientHasFirstSyncedPtr.asFunction<int Function(int)>();
  late final _clientIsSyncingPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__Client_is_syncing",
  );

  late final _clientIsSyncing =
      _clientIsSyncingPtr.asFunction<int Function(int)>();
  late final _clientAccountPtr =
      _lookup<ffi.NativeFunction<_ClientAccountReturn Function(ffi.IntPtr)>>(
    "__Client_account",
  );

  late final _clientAccount =
      _clientAccountPtr.asFunction<_ClientAccountReturn Function(int)>();
  late final _clientDeviceIdPtr =
      _lookup<ffi.NativeFunction<_ClientDeviceIdReturn Function(ffi.IntPtr)>>(
    "__Client_device_id",
  );

  late final _clientDeviceId =
      _clientDeviceIdPtr.asFunction<_ClientDeviceIdReturn Function(int)>();
  late final _clientUserIdPtr =
      _lookup<ffi.NativeFunction<_ClientUserIdReturn Function(ffi.IntPtr)>>(
    "__Client_user_id",
  );

  late final _clientUserId =
      _clientUserIdPtr.asFunction<_ClientUserIdReturn Function(int)>();
  late final _clientRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_room");

  late final _clientRoom =
      _clientRoomPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientConvoPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_convo");

  late final _clientConvo =
      _clientConvoPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientHasConvoPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_has_convo");

  late final _clientHasConvo =
      _clientHasConvoPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientConvoWithRetryPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__Client_convo_with_retry");

  late final _clientConvoWithRetry = _clientConvoWithRetryPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _clientDmWithUserPtr = _lookup<
      ffi.NativeFunction<
          _ClientDmWithUserReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_dm_with_user");

  late final _clientDmWithUser = _clientDmWithUserPtr
      .asFunction<_ClientDmWithUserReturn Function(int, int, int, int)>();
  late final _clientUploadMediaPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_upload_media");

  late final _clientUploadMedia =
      _clientUploadMediaPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientConvosStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_convos_stream",
  );

  late final _clientConvosStream =
      _clientConvosStreamPtr.asFunction<int Function(int)>();
  late final _clientSpacesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_spaces",
  );

  late final _clientSpaces = _clientSpacesPtr.asFunction<int Function(int)>();
  late final _clientSpacesStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_spaces_stream",
  );

  late final _clientSpacesStream =
      _clientSpacesStreamPtr.asFunction<int Function(int)>();
  late final _clientJoinRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__Client_join_room");

  late final _clientJoinRoom =
      _clientJoinRoomPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _clientSpacePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_space");

  late final _clientSpace =
      _clientSpacePtr.asFunction<int Function(int, int, int, int)>();
  late final _clientInvitationsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_invitations",
  );

  late final _clientInvitations =
      _clientInvitationsPtr.asFunction<int Function(int)>();
  late final _clientSuggestedUsersPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_suggested_users");

  late final _clientSuggestedUsers = _clientSuggestedUsersPtr
      .asFunction<int Function(int, int, int, int, int)>();
  late final _clientSearchUsersPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_search_users");

  late final _clientSearchUsers =
      _clientSearchUsersPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientSearchPublicRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_search_public_room");

  late final _clientSearchPublicRoom = _clientSearchPublicRoomPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _clientVerifiedDevicePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_verified_device");

  late final _clientVerifiedDevice =
      _clientVerifiedDevicePtr.asFunction<int Function(int, int, int, int)>();
  late final _clientLogoutPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_logout",
  );

  late final _clientLogout = _clientLogoutPtr.asFunction<int Function(int)>();
  late final _clientVerificationEventRxPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_verification_event_rx",
  );

  late final _clientVerificationEventRx =
      _clientVerificationEventRxPtr.asFunction<int Function(int)>();
  late final _clientSessionManagerPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_session_manager",
  );

  late final _clientSessionManager =
      _clientSessionManagerPtr.asFunction<int Function(int)>();
  late final _clientRequestVerificationPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_request_verification");

  late final _clientRequestVerification = _clientRequestVerificationPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _clientInstallRequestEventHandlerPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_install_request_event_handler");

  late final _clientInstallRequestEventHandler =
      _clientInstallRequestEventHandlerPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _clientInstallSasEventHandlerPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_install_sas_event_handler");

  late final _clientInstallSasEventHandler = _clientInstallSasEventHandlerPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _clientDeviceEventRxPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_device_event_rx",
  );

  late final _clientDeviceEventRx =
      _clientDeviceEventRxPtr.asFunction<int Function(int)>();
  late final _clientSubscribeToTypingEventStreamPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_subscribe_to_typing_event_stream");

  late final _clientSubscribeToTypingEventStream =
      _clientSubscribeToTypingEventStreamPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _clientCreateConvoPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__Client_create_convo",
  );

  late final _clientCreateConvo =
      _clientCreateConvoPtr.asFunction<int Function(int, int)>();
  late final _clientCreateActerSpacePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__Client_create_acter_space",
  );

  late final _clientCreateActerSpace =
      _clientCreateActerSpacePtr.asFunction<int Function(int, int)>();
  late final _clientSubscribeSectionStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeSectionStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_section_stream");

  late final _clientSubscribeSectionStream =
      _clientSubscribeSectionStreamPtr.asFunction<
          _ClientSubscribeSectionStreamReturn Function(int, int, int, int)>();
  late final _clientSubscribeModelStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_model_stream");

  late final _clientSubscribeModelStream =
      _clientSubscribeModelStreamPtr.asFunction<
          _ClientSubscribeModelStreamReturn Function(int, int, int, int)>();
  late final _clientSubscribeModelObjectsStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelObjectsStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_model_objects_stream");

  late final _clientSubscribeModelObjectsStream =
      _clientSubscribeModelObjectsStreamPtr.asFunction<
          _ClientSubscribeModelObjectsStreamReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeModelParamStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelParamStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_model_param_stream");

  late final _clientSubscribeModelParamStream =
      _clientSubscribeModelParamStreamPtr.asFunction<
          _ClientSubscribeModelParamStreamReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_room_stream");

  late final _clientSubscribeRoomStream =
      _clientSubscribeRoomStreamPtr.asFunction<
          _ClientSubscribeRoomStreamReturn Function(int, int, int, int)>();
  late final _clientSubscribeRoomParamStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomParamStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_room_param_stream");

  late final _clientSubscribeRoomParamStream =
      _clientSubscribeRoomParamStreamPtr.asFunction<
          _ClientSubscribeRoomParamStreamReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomSectionStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomSectionStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_room_section_stream");

  late final _clientSubscribeRoomSectionStream =
      _clientSubscribeRoomSectionStreamPtr.asFunction<
          _ClientSubscribeRoomSectionStreamReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeEventTypeStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeEventTypeStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_event_type_stream");

  late final _clientSubscribeEventTypeStream =
      _clientSubscribeEventTypeStreamPtr.asFunction<
          _ClientSubscribeEventTypeStreamReturn Function(int, int, int, int)>();
  late final _clientSubscribeAccountDataStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeAccountDataStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_account_data_stream");

  late final _clientSubscribeAccountDataStream =
      _clientSubscribeAccountDataStreamPtr.asFunction<
          _ClientSubscribeAccountDataStreamReturn Function(
              int, int, int, int)>();
  late final _clientSubscribeRoomAccountDataStreamPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomAccountDataStreamReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_subscribe_room_account_data_stream");

  late final _clientSubscribeRoomAccountDataStream =
      _clientSubscribeRoomAccountDataStreamPtr.asFunction<
          _ClientSubscribeRoomAccountDataStreamReturn Function(
            int,
            int,
            int,
            int,
            int,
            int,
            int,
          )>();
  late final _clientWaitForRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_room");

  late final _clientWaitForRoom = _clientWaitForRoomPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientWaitForCommentPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_comment");

  late final _clientWaitForComment = _clientWaitForCommentPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientWaitForNewsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_news");

  late final _clientWaitForNews = _clientWaitForNewsPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientLatestNewsEntriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__Client_latest_news_entries",
  );

  late final _clientLatestNewsEntries =
      _clientLatestNewsEntriesPtr.asFunction<int Function(int, int)>();
  late final _clientWaitForStoryPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_story");

  late final _clientWaitForStory = _clientWaitForStoryPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientLatestStoriesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__Client_latest_stories",
  );

  late final _clientLatestStories =
      _clientLatestStoriesPtr.asFunction<int Function(int, int)>();
  late final _clientWaitForPinPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_pin");

  late final _clientWaitForPin = _clientWaitForPinPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientPinsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_pins",
  );

  late final _clientPins = _clientPinsPtr.asFunction<int Function(int)>();
  late final _clientPinPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_pin");

  late final _clientPin =
      _clientPinPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientTaskListPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_task_list");

  late final _clientTaskList = _clientTaskListPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientTaskListsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_task_lists",
  );

  late final _clientTaskLists =
      _clientTaskListsPtr.asFunction<int Function(int)>();
  late final _clientWaitForTaskPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_task");

  late final _clientWaitForTask = _clientWaitForTaskPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientMyOpenTasksPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_my_open_tasks",
  );

  late final _clientMyOpenTasks =
      _clientMyOpenTasksPtr.asFunction<int Function(int)>();
  late final _clientSubscribeMyOpenTasksStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_subscribe_my_open_tasks_stream",
  );

  late final _clientSubscribeMyOpenTasksStream =
      _clientSubscribeMyOpenTasksStreamPtr.asFunction<int Function(int)>();
  late final _clientCalendarEventsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_calendar_events",
  );

  late final _clientCalendarEvents =
      _clientCalendarEventsPtr.asFunction<int Function(int)>();
  late final _clientCalendarEventPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_calendar_event");

  late final _clientCalendarEvent =
      _clientCalendarEventPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientWaitForCalendarEventPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_calendar_event");

  late final _clientWaitForCalendarEvent = _clientWaitForCalendarEventPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientWaitForReactionPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_reaction");

  late final _clientWaitForReaction = _clientWaitForReactionPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientWaitForRsvpPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
          )>>("__Client_wait_for_rsvp");

  late final _clientWaitForRsvp = _clientWaitForRsvpPtr
      .asFunction<int Function(int, int, int, int, int, int)>();
  late final _clientInstallDefaultActerPushRulesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_install_default_acter_push_rules",
  );

  late final _clientInstallDefaultActerPushRules =
      _clientInstallDefaultActerPushRulesPtr.asFunction<int Function(int)>();
  late final _clientPushersPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_pushers",
  );

  late final _clientPushers = _clientPushersPtr.asFunction<int Function(int)>();
  late final _clientAddPusherPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_add_pusher");

  late final _clientAddPusher = _clientAddPusherPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _clientAddEmailPusherPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_add_email_pusher");

  late final _clientAddEmailPusher = _clientAddEmailPusherPtr.asFunction<
      int Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _clientGetNotificationItemPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_get_notification_item");

  late final _clientGetNotificationItem = _clientGetNotificationItemPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientAllUpcomingEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.Uint32)>>("__Client_all_upcoming_events");

  late final _clientAllUpcomingEvents =
      _clientAllUpcomingEventsPtr.asFunction<int Function(int, int, int)>();
  late final _clientMyUpcomingEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.Uint32)>>("__Client_my_upcoming_events");

  late final _clientMyUpcomingEvents =
      _clientMyUpcomingEventsPtr.asFunction<int Function(int, int, int)>();
  late final _clientMyPastEventsPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
              ffi.IntPtr, ffi.Uint8, ffi.Uint32)>>("__Client_my_past_events");

  late final _clientMyPastEvents =
      _clientMyPastEventsPtr.asFunction<int Function(int, int, int)>();
  late final _clientSuperInvitesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_super_invites",
  );

  late final _clientSuperInvites =
      _clientSuperInvitesPtr.asFunction<int Function(int)>();
  late final _clientNotificationSettingsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_notification_settings",
  );

  late final _clientNotificationSettings =
      _clientNotificationSettingsPtr.asFunction<int Function(int)>();
  late final _clientDeviceRecordsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8)>>(
    "__Client_device_records",
  );

  late final _clientDeviceRecords =
      _clientDeviceRecordsPtr.asFunction<int Function(int, int)>();
  late final _clientTextPlainDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_text_plain_draft");

  late final _clientTextPlainDraft =
      _clientTextPlainDraftPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientTextMarkdownDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_text_markdown_draft");

  late final _clientTextMarkdownDraft = _clientTextMarkdownDraftPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _clientTextHtmlDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_text_html_draft");

  late final _clientTextHtmlDraft = _clientTextHtmlDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientImageDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_image_draft");

  late final _clientImageDraft = _clientImageDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientAudioDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_audio_draft");

  late final _clientAudioDraft = _clientAudioDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientVideoDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_video_draft");

  late final _clientVideoDraft = _clientVideoDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientFileDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_file_draft");

  late final _clientFileDraft = _clientFileDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientLocationDraftPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_location_draft");

  late final _clientLocationDraft = _clientLocationDraftPtr
      .asFunction<int Function(int, int, int, int, int, int, int)>();
  late final _clientBackupManagerPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__Client_backup_manager",
  );

  late final _clientBackupManager =
      _clientBackupManagerPtr.asFunction<int Function(int)>();
  late final _clientRoomPreviewPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
          )>>("__Client_room_preview");

  late final _clientRoomPreview =
      _clientRoomPreviewPtr.asFunction<int Function(int, int, int, int, int)>();
  late final _clientNewLinkRefDetailsPtr = _lookup<
      ffi.NativeFunction<
          _ClientNewLinkRefDetailsReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_new_link_ref_details");

  late final _clientNewLinkRefDetails = _clientNewLinkRefDetailsPtr.asFunction<
      _ClientNewLinkRefDetailsReturn Function(
        int,
        int,
        int,
        int,
        int,
        int,
        int,
      )>();
  late final _clientActivityPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_activity");

  late final _clientActivity =
      _clientActivityPtr.asFunction<int Function(int, int, int, int)>();
  late final _clientActivitiesForRoomPtr = _lookup<
      ffi.NativeFunction<
          _ClientActivitiesForRoomReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_activities_for_room");

  late final _clientActivitiesForRoom = _clientActivitiesForRoomPtr.asFunction<
      _ClientActivitiesForRoomReturn Function(int, int, int, int)>();
  late final _clientAllActivitiesPtr = _lookup<
          ffi.NativeFunction<_ClientAllActivitiesReturn Function(ffi.IntPtr)>>(
      "__Client_all_activities");

  late final _clientAllActivities = _clientAllActivitiesPtr
      .asFunction<_ClientAllActivitiesReturn Function(int)>();
  late final _clientActivitiesForObjPtr = _lookup<
      ffi.NativeFunction<
          _ClientActivitiesForObjReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__Client_activities_for_obj");

  late final _clientActivitiesForObj = _clientActivitiesForObjPtr
      .asFunction<_ClientActivitiesForObjReturn Function(int, int, int, int)>();
  late final _clientUrlPreviewPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__Client_url_preview");

  late final _clientUrlPreview =
      _clientUrlPreviewPtr.asFunction<int Function(int, int, int, int)>();
  late final _notificationSettingsChangesStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__NotificationSettings_changes_stream",
  );

  late final _notificationSettingsChangesStream =
      _notificationSettingsChangesStreamPtr.asFunction<int Function(int)>();
  late final _notificationSettingsDefaultNotificationModePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.Uint8,
              ffi.Uint8)>>("__NotificationSettings_default_notification_mode");

  late final _notificationSettingsDefaultNotificationMode =
      _notificationSettingsDefaultNotificationModePtr
          .asFunction<int Function(int, int, int)>();
  late final _notificationSettingsSetDefaultNotificationModePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.Uint8,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__NotificationSettings_set_default_notification_mode");

  late final _notificationSettingsSetDefaultNotificationMode =
      _notificationSettingsSetDefaultNotificationModePtr
          .asFunction<int Function(int, int, int, int, int, int)>();
  late final _notificationSettingsGlobalContentSettingPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__NotificationSettings_global_content_setting");

  late final _notificationSettingsGlobalContentSetting =
      _notificationSettingsGlobalContentSettingPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _notificationSettingsSetGlobalContentSettingPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
          )>>("__NotificationSettings_set_global_content_setting");

  late final _notificationSettingsSetGlobalContentSetting =
      _notificationSettingsSetGlobalContentSettingPtr
          .asFunction<int Function(int, int, int, int, int)>();
  late final _notificationSettingsObjectPushSubscriptionStatusStrPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__NotificationSettings_object_push_subscription_status_str");

  late final _notificationSettingsObjectPushSubscriptionStatusStr =
      _notificationSettingsObjectPushSubscriptionStatusStrPtr
          .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _notificationSettingsSubscribeObjectPushPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__NotificationSettings_subscribe_object_push");

  late final _notificationSettingsSubscribeObjectPush =
      _notificationSettingsSubscribeObjectPushPtr
          .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _notificationSettingsUnsubscribeObjectPushPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.Uint8,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__NotificationSettings_unsubscribe_object_push");

  late final _notificationSettingsUnsubscribeObjectPush =
      _notificationSettingsUnsubscribeObjectPushPtr
          .asFunction<int Function(int, int, int, int, int, int, int, int)>();
  late final _roomInvitationIsDmPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__RoomInvitation_is_dm",
  );

  late final _roomInvitationIsDm =
      _roomInvitationIsDmPtr.asFunction<int Function(int)>();
  late final _roomInvitationRoomIdStrPtr = _lookup<
          ffi
          .NativeFunction<_RoomInvitationRoomIdStrReturn Function(ffi.IntPtr)>>(
      "__RoomInvitation_room_id_str");

  late final _roomInvitationRoomIdStr = _roomInvitationRoomIdStrPtr
      .asFunction<_RoomInvitationRoomIdStrReturn Function(int)>();
  late final _roomInvitationRoomPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomInvitation_room",
  );

  late final _roomInvitationRoom =
      _roomInvitationRoomPtr.asFunction<int Function(int)>();
  late final _roomInvitationSenderIdStrPtr = _lookup<
      ffi.NativeFunction<
          _RoomInvitationSenderIdStrReturn Function(
              ffi.IntPtr)>>("__RoomInvitation_sender_id_str");

  late final _roomInvitationSenderIdStr = _roomInvitationSenderIdStrPtr
      .asFunction<_RoomInvitationSenderIdStrReturn Function(int)>();
  late final _roomInvitationSenderProfilePtr = _lookup<
      ffi.NativeFunction<
          _RoomInvitationSenderProfileReturn Function(
              ffi.IntPtr)>>("__RoomInvitation_sender_profile");

  late final _roomInvitationSenderProfile = _roomInvitationSenderProfilePtr
      .asFunction<_RoomInvitationSenderProfileReturn Function(int)>();
  late final _roomInvitationAcceptPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomInvitation_accept",
  );

  late final _roomInvitationAccept =
      _roomInvitationAcceptPtr.asFunction<int Function(int)>();
  late final _roomInvitationRejectPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__RoomInvitation_reject",
  );

  late final _roomInvitationReject =
      _roomInvitationRejectPtr.asFunction<int Function(int)>();
  late final _superInvitesTokensPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SuperInvites_tokens",
  );

  late final _superInvitesTokens =
      _superInvitesTokensPtr.asFunction<int Function(int)>();
  late final _superInvitesNewTokenUpdaterPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SuperInvites_new_token_updater",
  );

  late final _superInvitesNewTokenUpdater =
      _superInvitesNewTokenUpdaterPtr.asFunction<int Function(int)>();
  late final _superInvitesCreateOrUpdateTokenPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__SuperInvites_create_or_update_token",
  );

  late final _superInvitesCreateOrUpdateToken =
      _superInvitesCreateOrUpdateTokenPtr.asFunction<int Function(int, int)>();
  late final _superInvitesDeletePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvites_delete");

  late final _superInvitesDelete =
      _superInvitesDeletePtr.asFunction<int Function(int, int, int, int)>();
  late final _superInvitesRedeemPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvites_redeem");

  late final _superInvitesRedeem =
      _superInvitesRedeemPtr.asFunction<int Function(int, int, int, int)>();
  late final _superInvitesInfoPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvites_info");

  late final _superInvitesInfo =
      _superInvitesInfoPtr.asFunction<int Function(int, int, int, int)>();
  late final _superInviteInfoCreateDmPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SuperInviteInfo_create_dm",
  );

  late final _superInviteInfoCreateDm =
      _superInviteInfoCreateDmPtr.asFunction<int Function(int)>();
  late final _superInviteInfoHasRedeemedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SuperInviteInfo_has_redeemed",
  );

  late final _superInviteInfoHasRedeemed =
      _superInviteInfoHasRedeemedPtr.asFunction<int Function(int)>();
  late final _superInviteInfoRoomsCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__SuperInviteInfo_rooms_count",
  );

  late final _superInviteInfoRoomsCount =
      _superInviteInfoRoomsCountPtr.asFunction<int Function(int)>();
  late final _superInviteInfoInviterUserIdStrPtr = _lookup<
      ffi.NativeFunction<
          _SuperInviteInfoInviterUserIdStrReturn Function(
              ffi.IntPtr)>>("__SuperInviteInfo_inviter_user_id_str");

  late final _superInviteInfoInviterUserIdStr =
      _superInviteInfoInviterUserIdStrPtr
          .asFunction<_SuperInviteInfoInviterUserIdStrReturn Function(int)>();
  late final _superInviteInfoInviterDisplayNameStrPtr = _lookup<
      ffi.NativeFunction<
          _SuperInviteInfoInviterDisplayNameStrReturn Function(
              ffi.IntPtr)>>("__SuperInviteInfo_inviter_display_name_str");

  late final _superInviteInfoInviterDisplayNameStr =
      _superInviteInfoInviterDisplayNameStrPtr.asFunction<
          _SuperInviteInfoInviterDisplayNameStrReturn Function(int)>();
  late final _superInviteInfoInviterAvatarUrlStrPtr = _lookup<
      ffi.NativeFunction<
          _SuperInviteInfoInviterAvatarUrlStrReturn Function(
              ffi.IntPtr)>>("__SuperInviteInfo_inviter_avatar_url_str");

  late final _superInviteInfoInviterAvatarUrlStr =
      _superInviteInfoInviterAvatarUrlStrPtr.asFunction<
          _SuperInviteInfoInviterAvatarUrlStrReturn Function(int)>();
  late final _superInviteTokenTokenPtr = _lookup<
          ffi
          .NativeFunction<_SuperInviteTokenTokenReturn Function(ffi.IntPtr)>>(
      "__SuperInviteToken_token");

  late final _superInviteTokenToken = _superInviteTokenTokenPtr
      .asFunction<_SuperInviteTokenTokenReturn Function(int)>();
  late final _superInviteTokenCreateDmPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__SuperInviteToken_create_dm",
  );

  late final _superInviteTokenCreateDm =
      _superInviteTokenCreateDmPtr.asFunction<int Function(int)>();
  late final _superInviteTokenRoomsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SuperInviteToken_rooms",
  );

  late final _superInviteTokenRooms =
      _superInviteTokenRoomsPtr.asFunction<int Function(int)>();
  late final _superInviteTokenAcceptedCountPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__SuperInviteToken_accepted_count",
  );

  late final _superInviteTokenAcceptedCount =
      _superInviteTokenAcceptedCountPtr.asFunction<int Function(int)>();
  late final _superInviteTokenUpdateBuilderPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SuperInviteToken_update_builder",
  );

  late final _superInviteTokenUpdateBuilder =
      _superInviteTokenUpdateBuilderPtr.asFunction<int Function(int)>();
  late final _superInviteTokenRefDetailsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SuperInviteToken_ref_details",
  );

  late final _superInviteTokenRefDetails =
      _superInviteTokenRefDetailsPtr.asFunction<int Function(int)>();
  late final _superInvitesTokenUpdateBuilderTokenPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvitesTokenUpdateBuilder_token");

  late final _superInvitesTokenUpdateBuilderToken =
      _superInvitesTokenUpdateBuilderTokenPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _superInvitesTokenUpdateBuilderAddRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvitesTokenUpdateBuilder_add_room");

  late final _superInvitesTokenUpdateBuilderAddRoom =
      _superInvitesTokenUpdateBuilderAddRoomPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _superInvitesTokenUpdateBuilderRemoveRoomPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SuperInvitesTokenUpdateBuilder_remove_room");

  late final _superInvitesTokenUpdateBuilderRemoveRoom =
      _superInvitesTokenUpdateBuilderRemoveRoomPtr
          .asFunction<void Function(int, int, int, int)>();
  late final _superInvitesTokenUpdateBuilderCreateDmPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.Uint8)>>(
    "__SuperInvitesTokenUpdateBuilder_create_dm",
  );

  late final _superInvitesTokenUpdateBuilderCreateDm =
      _superInvitesTokenUpdateBuilderCreateDmPtr
          .asFunction<void Function(int, int)>();
  late final _verificationEventEventTypePtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventEventTypeReturn Function(
              ffi.IntPtr)>>("__VerificationEvent_event_type");

  late final _verificationEventEventType = _verificationEventEventTypePtr
      .asFunction<_VerificationEventEventTypeReturn Function(int)>();
  late final _verificationEventFlowIdPtr = _lookup<
          ffi
          .NativeFunction<_VerificationEventFlowIdReturn Function(ffi.IntPtr)>>(
      "__VerificationEvent_flow_id");

  late final _verificationEventFlowId = _verificationEventFlowIdPtr
      .asFunction<_VerificationEventFlowIdReturn Function(int)>();
  late final _verificationEventSenderPtr = _lookup<
          ffi
          .NativeFunction<_VerificationEventSenderReturn Function(ffi.IntPtr)>>(
      "__VerificationEvent_sender");

  late final _verificationEventSender = _verificationEventSenderPtr
      .asFunction<_VerificationEventSenderReturn Function(int)>();
  late final _verificationEventGetContentPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventGetContentReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__VerificationEvent_get_content");

  late final _verificationEventGetContent =
      _verificationEventGetContentPtr.asFunction<
          _VerificationEventGetContentReturn Function(int, int, int, int)>();
  late final _verificationEventEmojisPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_emojis",
  );

  late final _verificationEventEmojis =
      _verificationEventEmojisPtr.asFunction<int Function(int)>();
  late final _verificationEventGetEmojisPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_get_emojis",
  );

  late final _verificationEventGetEmojis =
      _verificationEventGetEmojisPtr.asFunction<int Function(int)>();
  late final _verificationEventAcceptVerificationRequestPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_accept_verification_request",
  );

  late final _verificationEventAcceptVerificationRequest =
      _verificationEventAcceptVerificationRequestPtr
          .asFunction<int Function(int)>();
  late final _verificationEventCancelVerificationRequestPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_cancel_verification_request",
  );

  late final _verificationEventCancelVerificationRequest =
      _verificationEventCancelVerificationRequestPtr
          .asFunction<int Function(int)>();
  late final _verificationEventAcceptVerificationRequestWithMethodPtr = _lookup<
          ffi.NativeFunction<
              ffi.IntPtr Function(
                  ffi.IntPtr, ffi.IntPtr, ffi.UintPtr, ffi.UintPtr)>>(
      "__VerificationEvent_accept_verification_request_with_method");

  late final _verificationEventAcceptVerificationRequestWithMethod =
      _verificationEventAcceptVerificationRequestWithMethodPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _verificationEventStartSasVerificationPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_start_sas_verification",
  );

  late final _verificationEventStartSasVerification =
      _verificationEventStartSasVerificationPtr.asFunction<int Function(int)>();
  late final _verificationEventAcceptSasVerificationPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_accept_sas_verification",
  );

  late final _verificationEventAcceptSasVerification =
      _verificationEventAcceptSasVerificationPtr
          .asFunction<int Function(int)>();
  late final _verificationEventCancelSasVerificationPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_cancel_sas_verification",
  );

  late final _verificationEventCancelSasVerification =
      _verificationEventCancelSasVerificationPtr
          .asFunction<int Function(int)>();
  late final _verificationEventConfirmSasVerificationPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_confirm_sas_verification",
  );

  late final _verificationEventConfirmSasVerification =
      _verificationEventConfirmSasVerificationPtr
          .asFunction<int Function(int)>();
  late final _verificationEventMismatchSasVerificationPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__VerificationEvent_mismatch_sas_verification",
  );

  late final _verificationEventMismatchSasVerification =
      _verificationEventMismatchSasVerificationPtr
          .asFunction<int Function(int)>();
  late final _verificationEmojiSymbolPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__VerificationEmoji_symbol",
  );

  late final _verificationEmojiSymbol =
      _verificationEmojiSymbolPtr.asFunction<int Function(int)>();
  late final _verificationEmojiDescriptionPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEmojiDescriptionReturn Function(
              ffi.IntPtr)>>("__VerificationEmoji_description");

  late final _verificationEmojiDescription = _verificationEmojiDescriptionPtr
      .asFunction<_VerificationEmojiDescriptionReturn Function(int)>();
  late final _sessionManagerAllSessionsPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__SessionManager_all_sessions",
  );

  late final _sessionManagerAllSessions =
      _sessionManagerAllSessionsPtr.asFunction<int Function(int)>();
  late final _sessionManagerDeleteDevicePtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
            ffi.IntPtr,
            ffi.UintPtr,
            ffi.UintPtr,
          )>>("__SessionManager_delete_device");

  late final _sessionManagerDeleteDevice =
      _sessionManagerDeleteDevicePtr.asFunction<
          int Function(int, int, int, int, int, int, int, int, int, int)>();
  late final _sessionManagerRequestVerificationPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SessionManager_request_verification");

  late final _sessionManagerRequestVerification =
      _sessionManagerRequestVerificationPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _sessionManagerTerminateVerificationPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__SessionManager_terminate_verification");

  late final _sessionManagerTerminateVerification =
      _sessionManagerTerminateVerificationPtr
          .asFunction<int Function(int, int, int, int)>();
  late final _deviceEventNewDevicesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__DeviceEvent_new_devices",
  );

  late final _deviceEventNewDevices =
      _deviceEventNewDevicesPtr.asFunction<int Function(int)>();
  late final _deviceEventChangedDevicesPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__DeviceEvent_changed_devices",
  );

  late final _deviceEventChangedDevices =
      _deviceEventChangedDevicesPtr.asFunction<int Function(int)>();
  late final _deviceRecordDeviceIdPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__DeviceRecord_device_id",
  );

  late final _deviceRecordDeviceId =
      _deviceRecordDeviceIdPtr.asFunction<int Function(int)>();
  late final _deviceRecordDisplayNamePtr = _lookup<
          ffi
          .NativeFunction<_DeviceRecordDisplayNameReturn Function(ffi.IntPtr)>>(
      "__DeviceRecord_display_name");

  late final _deviceRecordDisplayName = _deviceRecordDisplayNamePtr
      .asFunction<_DeviceRecordDisplayNameReturn Function(int)>();
  late final _deviceRecordLastSeenIpPtr = _lookup<
          ffi
          .NativeFunction<_DeviceRecordLastSeenIpReturn Function(ffi.IntPtr)>>(
      "__DeviceRecord_last_seen_ip");

  late final _deviceRecordLastSeenIp = _deviceRecordLastSeenIpPtr
      .asFunction<_DeviceRecordLastSeenIpReturn Function(int)>();
  late final _deviceRecordLastSeenTsPtr = _lookup<
          ffi
          .NativeFunction<_DeviceRecordLastSeenTsReturn Function(ffi.IntPtr)>>(
      "__DeviceRecord_last_seen_ts");

  late final _deviceRecordLastSeenTs = _deviceRecordLastSeenTsPtr
      .asFunction<_DeviceRecordLastSeenTsReturn Function(int)>();
  late final _deviceRecordIsVerifiedPtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__DeviceRecord_is_verified",
  );

  late final _deviceRecordIsVerified =
      _deviceRecordIsVerifiedPtr.asFunction<int Function(int)>();
  late final _deviceRecordIsActivePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__DeviceRecord_is_active",
  );

  late final _deviceRecordIsActive =
      _deviceRecordIsActivePtr.asFunction<int Function(int)>();
  late final _deviceRecordIsMePtr =
      _lookup<ffi.NativeFunction<ffi.Uint8 Function(ffi.IntPtr)>>(
    "__DeviceRecord_is_me",
  );

  late final _deviceRecordIsMe =
      _deviceRecordIsMePtr.asFunction<int Function(int)>();
  late final _backupManagerEnablePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_enable",
  );

  late final _backupManagerEnable =
      _backupManagerEnablePtr.asFunction<int Function(int)>();
  late final _backupManagerResetKeyPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_reset_key",
  );

  late final _backupManagerResetKey =
      _backupManagerResetKeyPtr.asFunction<int Function(int)>();
  late final _backupManagerResetIdentityPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__BackupManager_reset_identity");

  late final _backupManagerResetIdentity = _backupManagerResetIdentityPtr
      .asFunction<int Function(int, int, int, int)>();
  late final _backupManagerDisablePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_disable",
  );

  late final _backupManagerDisable =
      _backupManagerDisablePtr.asFunction<int Function(int)>();
  late final _backupManagerStateStrPtr = _lookup<
          ffi
          .NativeFunction<_BackupManagerStateStrReturn Function(ffi.IntPtr)>>(
      "__BackupManager_state_str");

  late final _backupManagerStateStr = _backupManagerStateStrPtr
      .asFunction<_BackupManagerStateStrReturn Function(int)>();
  late final _backupManagerStateStreamPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_state_stream",
  );

  late final _backupManagerStateStream =
      _backupManagerStateStreamPtr.asFunction<int Function(int)>();
  late final _backupManagerRecoverPtr = _lookup<
      ffi.NativeFunction<
          ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr, ffi.UintPtr,
              ffi.UintPtr)>>("__BackupManager_recover");

  late final _backupManagerRecover =
      _backupManagerRecoverPtr.asFunction<int Function(int, int, int, int)>();
  late final _backupManagerStoredEncKeyPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_stored_enc_key",
  );

  late final _backupManagerStoredEncKey =
      _backupManagerStoredEncKeyPtr.asFunction<int Function(int)>();
  late final _backupManagerStoredEncKeyWhenPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_stored_enc_key_when",
  );

  late final _backupManagerStoredEncKeyWhen =
      _backupManagerStoredEncKeyWhenPtr.asFunction<int Function(int)>();
  late final _backupManagerDestroyStoredEncKeyPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr)>>(
    "__BackupManager_destroy_stored_enc_key",
  );

  late final _backupManagerDestroyStoredEncKey =
      _backupManagerDestroyStoredEncKeyPtr.asFunction<int Function(int)>();
  late final _loginNewClientFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _LoginNewClientFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__login_new_client_future_poll");

  late final _loginNewClientFuturePoll = _loginNewClientFuturePollPtr
      .asFunction<_LoginNewClientFuturePollReturn Function(int, int, int)>();
  late final _loginWithTokenFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _LoginWithTokenFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__login_with_token_future_poll");

  late final _loginWithTokenFuturePoll = _loginWithTokenFuturePollPtr
      .asFunction<_LoginWithTokenFuturePollReturn Function(int, int, int)>();
  late final _guestClientFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _GuestClientFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__guest_client_future_poll");

  late final _guestClientFuturePoll = _guestClientFuturePollPtr
      .asFunction<_GuestClientFuturePollReturn Function(int, int, int)>();
  late final _registerWithTokenFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RegisterWithTokenFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__register_with_token_future_poll");

  late final _registerWithTokenFuturePoll = _registerWithTokenFuturePollPtr
      .asFunction<_RegisterWithTokenFuturePollReturn Function(int, int, int)>();
  late final _requestRegistrationTokenViaEmailFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RequestRegistrationTokenViaEmailFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__request_registration_token_via_email_future_poll");

  late final _requestRegistrationTokenViaEmailFuturePoll =
      _requestRegistrationTokenViaEmailFuturePollPtr.asFunction<
          _RequestRegistrationTokenViaEmailFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _requestPasswordChangeTokenViaEmailFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RequestPasswordChangeTokenViaEmailFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__request_password_change_token_via_email_future_poll");

  late final _requestPasswordChangeTokenViaEmailFuturePoll =
      _requestPasswordChangeTokenViaEmailFuturePollPtr.asFunction<
          _RequestPasswordChangeTokenViaEmailFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _resetPasswordFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ResetPasswordFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__reset_password_future_poll");

  late final _resetPasswordFuturePoll = _resetPasswordFuturePollPtr
      .asFunction<_ResetPasswordFuturePollReturn Function(int, int, int)>();
  late final _destroyLocalDataFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _DestroyLocalDataFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__destroy_local_data_future_poll");

  late final _destroyLocalDataFuturePoll = _destroyLocalDataFuturePollPtr
      .asFunction<_DestroyLocalDataFuturePollReturn Function(int, int, int)>();
  late final _refDetailsGenerateExternalLinkFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RefDetailsGenerateExternalLinkFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RefDetails_generate_external_link_future_poll");

  late final _refDetailsGenerateExternalLinkFuturePoll =
      _refDetailsGenerateExternalLinkFuturePollPtr.asFunction<
          _RefDetailsGenerateExternalLinkFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _userProfileGetAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _UserProfileGetAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__UserProfile_get_avatar_future_poll");

  late final _userProfileGetAvatarFuturePoll =
      _userProfileGetAvatarFuturePollPtr.asFunction<
          _UserProfileGetAvatarFuturePollReturn Function(int, int, int)>();
  late final _newsSlideSourceBinaryFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsSlideSourceBinaryFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsSlide_source_binary_future_poll");

  late final _newsSlideSourceBinaryFuturePoll =
      _newsSlideSourceBinaryFuturePollPtr.asFunction<
          _NewsSlideSourceBinaryFuturePollReturn Function(int, int, int)>();
  late final _newsEntryCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntry_can_redact_future_poll");

  late final _newsEntryCanRedactFuturePoll =
      _newsEntryCanRedactFuturePollPtr.asFunction<
          _NewsEntryCanRedactFuturePollReturn Function(int, int, int)>();
  late final _newsEntryReactionsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryReactionsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntry_reactions_future_poll");

  late final _newsEntryReactionsFuturePoll =
      _newsEntryReactionsFuturePollPtr.asFunction<
          _NewsEntryReactionsFuturePollReturn Function(int, int, int)>();
  late final _newsEntryReadReceiptsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryReadReceiptsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntry_read_receipts_future_poll");

  late final _newsEntryReadReceiptsFuturePoll =
      _newsEntryReadReceiptsFuturePollPtr.asFunction<
          _NewsEntryReadReceiptsFuturePollReturn Function(int, int, int)>();
  late final _newsEntryCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntry_comments_future_poll");

  late final _newsEntryCommentsFuturePoll = _newsEntryCommentsFuturePollPtr
      .asFunction<_NewsEntryCommentsFuturePollReturn Function(int, int, int)>();
  late final _newsEntryRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntry_ref_details_future_poll");

  late final _newsEntryRefDetailsFuturePoll =
      _newsEntryRefDetailsFuturePollPtr.asFunction<
          _NewsEntryRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _newsEntryDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntryDraft_send_future_poll");

  late final _newsEntryDraftSendFuturePoll =
      _newsEntryDraftSendFuturePollPtr.asFunction<
          _NewsEntryDraftSendFuturePollReturn Function(int, int, int)>();
  late final _newsEntryUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NewsEntryUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NewsEntryUpdateBuilder_send_future_poll");

  late final _newsEntryUpdateBuilderSendFuturePoll =
      _newsEntryUpdateBuilderSendFuturePollPtr.asFunction<
          _NewsEntryUpdateBuilderSendFuturePollReturn Function(
              int, int, int)>();
  late final _storySlideSourceBinaryFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StorySlideSourceBinaryFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__StorySlide_source_binary_future_poll");

  late final _storySlideSourceBinaryFuturePoll =
      _storySlideSourceBinaryFuturePollPtr.asFunction<
          _StorySlideSourceBinaryFuturePollReturn Function(int, int, int)>();
  late final _storyCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Story_can_redact_future_poll");

  late final _storyCanRedactFuturePoll = _storyCanRedactFuturePollPtr
      .asFunction<_StoryCanRedactFuturePollReturn Function(int, int, int)>();
  late final _storyReactionsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryReactionsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Story_reactions_future_poll");

  late final _storyReactionsFuturePoll = _storyReactionsFuturePollPtr
      .asFunction<_StoryReactionsFuturePollReturn Function(int, int, int)>();
  late final _storyReadReceiptsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryReadReceiptsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Story_read_receipts_future_poll");

  late final _storyReadReceiptsFuturePoll = _storyReadReceiptsFuturePollPtr
      .asFunction<_StoryReadReceiptsFuturePollReturn Function(int, int, int)>();
  late final _storyCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Story_comments_future_poll");

  late final _storyCommentsFuturePoll = _storyCommentsFuturePollPtr
      .asFunction<_StoryCommentsFuturePollReturn Function(int, int, int)>();
  late final _storyDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__StoryDraft_send_future_poll");

  late final _storyDraftSendFuturePoll = _storyDraftSendFuturePollPtr
      .asFunction<_StoryDraftSendFuturePollReturn Function(int, int, int)>();
  late final _storyUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _StoryUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__StoryUpdateBuilder_send_future_poll");

  late final _storyUpdateBuilderSendFuturePoll =
      _storyUpdateBuilderSendFuturePollPtr.asFunction<
          _StoryUpdateBuilderSendFuturePollReturn Function(int, int, int)>();
  late final _pinDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _PinDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__PinDraft_send_future_poll");

  late final _pinDraftSendFuturePoll = _pinDraftSendFuturePollPtr
      .asFunction<_PinDraftSendFuturePollReturn Function(int, int, int)>();
  late final _acterPinRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerPin_ref_details_future_poll");

  late final _acterPinRefDetailsFuturePoll =
      _acterPinRefDetailsFuturePollPtr.asFunction<
          _ActerPinRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _acterPinRefreshFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinRefreshFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerPin_refresh_future_poll");

  late final _acterPinRefreshFuturePoll = _acterPinRefreshFuturePollPtr
      .asFunction<_ActerPinRefreshFuturePollReturn Function(int, int, int)>();
  late final _acterPinCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerPin_can_redact_future_poll");

  late final _acterPinCanRedactFuturePoll = _acterPinCanRedactFuturePollPtr
      .asFunction<_ActerPinCanRedactFuturePollReturn Function(int, int, int)>();
  late final _acterPinCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerPin_comments_future_poll");

  late final _acterPinCommentsFuturePoll = _acterPinCommentsFuturePollPtr
      .asFunction<_ActerPinCommentsFuturePollReturn Function(int, int, int)>();
  late final _acterPinAttachmentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinAttachmentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerPin_attachments_future_poll");

  late final _acterPinAttachmentsFuturePoll =
      _acterPinAttachmentsFuturePollPtr.asFunction<
          _ActerPinAttachmentsFuturePollReturn Function(int, int, int)>();
  late final _pinUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _PinUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__PinUpdateBuilder_send_future_poll");

  late final _pinUpdateBuilderSendFuturePoll =
      _pinUpdateBuilderSendFuturePollPtr.asFunction<
          _PinUpdateBuilderSendFuturePollReturn Function(int, int, int)>();
  late final _calendarEventRsvpsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventRsvpsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_rsvps_future_poll");

  late final _calendarEventRsvpsFuturePoll =
      _calendarEventRsvpsFuturePollPtr.asFunction<
          _CalendarEventRsvpsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventReactionsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventReactionsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_reactions_future_poll");

  late final _calendarEventReactionsFuturePoll =
      _calendarEventReactionsFuturePollPtr.asFunction<
          _CalendarEventReactionsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventRespondedByMeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventRespondedByMeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_responded_by_me_future_poll");

  late final _calendarEventRespondedByMeFuturePoll =
      _calendarEventRespondedByMeFuturePollPtr.asFunction<
          _CalendarEventRespondedByMeFuturePollReturn Function(
              int, int, int)>();
  late final _calendarEventParticipantsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventParticipantsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_participants_future_poll");

  late final _calendarEventParticipantsFuturePoll =
      _calendarEventParticipantsFuturePollPtr.asFunction<
          _CalendarEventParticipantsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_can_redact_future_poll");

  late final _calendarEventCanRedactFuturePoll =
      _calendarEventCanRedactFuturePollPtr.asFunction<
          _CalendarEventCanRedactFuturePollReturn Function(int, int, int)>();
  late final _calendarEventCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_comments_future_poll");

  late final _calendarEventCommentsFuturePoll =
      _calendarEventCommentsFuturePollPtr.asFunction<
          _CalendarEventCommentsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventAttachmentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventAttachmentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_attachments_future_poll");

  late final _calendarEventAttachmentsFuturePoll =
      _calendarEventAttachmentsFuturePollPtr.asFunction<
          _CalendarEventAttachmentsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEvent_ref_details_future_poll");

  late final _calendarEventRefDetailsFuturePoll =
      _calendarEventRefDetailsFuturePollPtr.asFunction<
          _CalendarEventRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _calendarEventUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEventUpdateBuilder_send_future_poll");

  late final _calendarEventUpdateBuilderSendFuturePoll =
      _calendarEventUpdateBuilderSendFuturePollPtr.asFunction<
          _CalendarEventUpdateBuilderSendFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _calendarEventDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CalendarEventDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CalendarEventDraft_send_future_poll");

  late final _calendarEventDraftSendFuturePoll =
      _calendarEventDraftSendFuturePollPtr.asFunction<
          _CalendarEventDraftSendFuturePollReturn Function(int, int, int)>();
  late final _rsvpManagerRsvpEntriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpManagerRsvpEntriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RsvpManager_rsvp_entries_future_poll");

  late final _rsvpManagerRsvpEntriesFuturePoll =
      _rsvpManagerRsvpEntriesFuturePollPtr.asFunction<
          _RsvpManagerRsvpEntriesFuturePollReturn Function(int, int, int)>();
  late final _rsvpManagerRespondedByMeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpManagerRespondedByMeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RsvpManager_responded_by_me_future_poll");

  late final _rsvpManagerRespondedByMeFuturePoll =
      _rsvpManagerRespondedByMeFuturePollPtr.asFunction<
          _RsvpManagerRespondedByMeFuturePollReturn Function(int, int, int)>();
  late final _rsvpManagerCountAtStatusFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpManagerCountAtStatusFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RsvpManager_count_at_status_future_poll");

  late final _rsvpManagerCountAtStatusFuturePoll =
      _rsvpManagerCountAtStatusFuturePollPtr.asFunction<
          _RsvpManagerCountAtStatusFuturePollReturn Function(int, int, int)>();
  late final _rsvpManagerUsersAtStatusFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpManagerUsersAtStatusFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RsvpManager_users_at_status_future_poll");

  late final _rsvpManagerUsersAtStatusFuturePoll =
      _rsvpManagerUsersAtStatusFuturePollPtr.asFunction<
          _RsvpManagerUsersAtStatusFuturePollReturn Function(int, int, int)>();
  late final _rsvpDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RsvpDraft_send_future_poll");

  late final _rsvpDraftSendFuturePoll = _rsvpDraftSendFuturePollPtr
      .asFunction<_RsvpDraftSendFuturePollReturn Function(int, int, int)>();
  late final _reactionManagerReactionEntriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerReactionEntriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_reaction_entries_future_poll");

  late final _reactionManagerReactionEntriesFuturePoll =
      _reactionManagerReactionEntriesFuturePollPtr.asFunction<
          _ReactionManagerReactionEntriesFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _reactionManagerSendLikeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerSendLikeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_send_like_future_poll");

  late final _reactionManagerSendLikeFuturePoll =
      _reactionManagerSendLikeFuturePollPtr.asFunction<
          _ReactionManagerSendLikeFuturePollReturn Function(int, int, int)>();
  late final _reactionManagerSendReactionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerSendReactionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_send_reaction_future_poll");

  late final _reactionManagerSendReactionFuturePoll =
      _reactionManagerSendReactionFuturePollPtr.asFunction<
          _ReactionManagerSendReactionFuturePollReturn Function(
              int, int, int)>();
  late final _reactionManagerRedactLikeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerRedactLikeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_redact_like_future_poll");

  late final _reactionManagerRedactLikeFuturePoll =
      _reactionManagerRedactLikeFuturePollPtr.asFunction<
          _ReactionManagerRedactLikeFuturePollReturn Function(int, int, int)>();
  late final _reactionManagerRedactReactionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerRedactReactionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_redact_reaction_future_poll");

  late final _reactionManagerRedactReactionFuturePoll =
      _reactionManagerRedactReactionFuturePollPtr.asFunction<
          _ReactionManagerRedactReactionFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _reactionManagerReloadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerReloadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReactionManager_reload_future_poll");

  late final _reactionManagerReloadFuturePoll =
      _reactionManagerReloadFuturePollPtr.asFunction<
          _ReactionManagerReloadFuturePollReturn Function(int, int, int)>();
  late final _readReceiptsManagerAnnounceReadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReadReceiptsManagerAnnounceReadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReadReceiptsManager_announce_read_future_poll");

  late final _readReceiptsManagerAnnounceReadFuturePoll =
      _readReceiptsManagerAnnounceReadFuturePollPtr.asFunction<
          _ReadReceiptsManagerAnnounceReadFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _readReceiptsManagerReloadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ReadReceiptsManagerReloadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ReadReceiptsManager_reload_future_poll");

  late final _readReceiptsManagerReloadFuturePoll =
      _readReceiptsManagerReloadFuturePollPtr.asFunction<
          _ReadReceiptsManagerReloadFuturePollReturn Function(int, int, int)>();
  late final _eventSendStateAbortFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _EventSendStateAbortFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__EventSendState_abort_future_poll");

  late final _eventSendStateAbortFuturePoll =
      _eventSendStateAbortFuturePollPtr.asFunction<
          _EventSendStateAbortFuturePollReturn Function(int, int, int)>();
  late final _roomAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_avatar_future_poll");

  late final _roomAvatarFuturePoll = _roomAvatarFuturePollPtr
      .asFunction<_RoomAvatarFuturePollReturn Function(int, int, int)>();
  late final _roomDisplayNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomDisplayNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_display_name_future_poll");

  late final _roomDisplayNameFuturePoll = _roomDisplayNameFuturePollPtr
      .asFunction<_RoomDisplayNameFuturePollReturn Function(int, int, int)>();
  late final _roomSetJoinRuleFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSetJoinRuleFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_set_join_rule_future_poll");

  late final _roomSetJoinRuleFuturePoll = _roomSetJoinRuleFuturePollPtr
      .asFunction<_RoomSetJoinRuleFuturePollReturn Function(int, int, int)>();
  late final _roomSpaceRelationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSpaceRelationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_space_relations_future_poll");

  late final _roomSpaceRelationsFuturePoll =
      _roomSpaceRelationsFuturePollPtr.asFunction<
          _RoomSpaceRelationsFuturePollReturn Function(int, int, int)>();
  late final _roomIsDirectFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomIsDirectFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_is_direct_future_poll");

  late final _roomIsDirectFuturePoll = _roomIsDirectFuturePollPtr
      .asFunction<_RoomIsDirectFuturePollReturn Function(int, int, int)>();
  late final _roomAddParentRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomAddParentRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_add_parent_room_future_poll");

  late final _roomAddParentRoomFuturePoll = _roomAddParentRoomFuturePollPtr
      .asFunction<_RoomAddParentRoomFuturePollReturn Function(int, int, int)>();
  late final _roomRemoveParentRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomRemoveParentRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_remove_parent_room_future_poll");

  late final _roomRemoveParentRoomFuturePoll =
      _roomRemoveParentRoomFuturePollPtr.asFunction<
          _RoomRemoveParentRoomFuturePollReturn Function(int, int, int)>();
  late final _roomAddChildRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomAddChildRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_add_child_room_future_poll");

  late final _roomAddChildRoomFuturePoll = _roomAddChildRoomFuturePollPtr
      .asFunction<_RoomAddChildRoomFuturePollReturn Function(int, int, int)>();
  late final _roomRemoveChildRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomRemoveChildRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_remove_child_room_future_poll");

  late final _roomRemoveChildRoomFuturePoll =
      _roomRemoveChildRoomFuturePollPtr.asFunction<
          _RoomRemoveChildRoomFuturePollReturn Function(int, int, int)>();
  late final _roomGetMyMembershipFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomGetMyMembershipFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_get_my_membership_future_poll");

  late final _roomGetMyMembershipFuturePoll =
      _roomGetMyMembershipFuturePollPtr.asFunction<
          _RoomGetMyMembershipFuturePollReturn Function(int, int, int)>();
  late final _roomActiveMembersIdsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomActiveMembersIdsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_active_members_ids_future_poll");

  late final _roomActiveMembersIdsFuturePoll =
      _roomActiveMembersIdsFuturePollPtr.asFunction<
          _RoomActiveMembersIdsFuturePollReturn Function(int, int, int)>();
  late final _roomActiveMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomActiveMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_active_members_future_poll");

  late final _roomActiveMembersFuturePoll = _roomActiveMembersFuturePollPtr
      .asFunction<_RoomActiveMembersFuturePollReturn Function(int, int, int)>();
  late final _roomInvitedMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomInvitedMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_invited_members_future_poll");

  late final _roomInvitedMembersFuturePoll =
      _roomInvitedMembersFuturePollPtr.asFunction<
          _RoomInvitedMembersFuturePollReturn Function(int, int, int)>();
  late final _roomGetMemberFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomGetMemberFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_get_member_future_poll");

  late final _roomGetMemberFuturePoll = _roomGetMemberFuturePollPtr
      .asFunction<_RoomGetMemberFuturePollReturn Function(int, int, int)>();
  late final _roomInviteUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomInviteUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_invite_user_future_poll");

  late final _roomInviteUserFuturePoll = _roomInviteUserFuturePollPtr
      .asFunction<_RoomInviteUserFuturePollReturn Function(int, int, int)>();
  late final _roomNotificationModeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomNotificationModeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_notification_mode_future_poll");

  late final _roomNotificationModeFuturePoll =
      _roomNotificationModeFuturePollPtr.asFunction<
          _RoomNotificationModeFuturePollReturn Function(int, int, int)>();
  late final _roomDefaultNotificationModeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomDefaultNotificationModeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_default_notification_mode_future_poll");

  late final _roomDefaultNotificationModeFuturePoll =
      _roomDefaultNotificationModeFuturePollPtr.asFunction<
          _RoomDefaultNotificationModeFuturePollReturn Function(
              int, int, int)>();
  late final _roomUnmuteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomUnmuteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_unmute_future_poll");

  late final _roomUnmuteFuturePoll = _roomUnmuteFuturePollPtr
      .asFunction<_RoomUnmuteFuturePollReturn Function(int, int, int)>();
  late final _roomSetNotificationModeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSetNotificationModeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_set_notification_mode_future_poll");

  late final _roomSetNotificationModeFuturePoll =
      _roomSetNotificationModeFuturePollPtr.asFunction<
          _RoomSetNotificationModeFuturePollReturn Function(int, int, int)>();
  late final _roomUpdatePowerLevelFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomUpdatePowerLevelFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_update_power_level_future_poll");

  late final _roomUpdatePowerLevelFuturePoll =
      _roomUpdatePowerLevelFuturePollPtr.asFunction<
          _RoomUpdatePowerLevelFuturePollReturn Function(int, int, int)>();
  late final _roomUploadAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomUploadAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_upload_avatar_future_poll");

  late final _roomUploadAvatarFuturePoll = _roomUploadAvatarFuturePollPtr
      .asFunction<_RoomUploadAvatarFuturePollReturn Function(int, int, int)>();
  late final _roomRemoveAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomRemoveAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_remove_avatar_future_poll");

  late final _roomRemoveAvatarFuturePoll = _roomRemoveAvatarFuturePollPtr
      .asFunction<_RoomRemoveAvatarFuturePollReturn Function(int, int, int)>();
  late final _roomSetTopicFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSetTopicFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_set_topic_future_poll");

  late final _roomSetTopicFuturePoll = _roomSetTopicFuturePollPtr
      .asFunction<_RoomSetTopicFuturePollReturn Function(int, int, int)>();
  late final _roomSetNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSetNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_set_name_future_poll");

  late final _roomSetNameFuturePoll = _roomSetNameFuturePollPtr
      .asFunction<_RoomSetNameFuturePollReturn Function(int, int, int)>();
  late final _roomLeaveFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomLeaveFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Room_leave_future_poll");

  late final _roomLeaveFuturePoll = _roomLeaveFuturePollPtr
      .asFunction<_RoomLeaveFuturePollReturn Function(int, int, int)>();
  late final _roomUserSettingsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomUserSettingsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Room_user_settings_future_poll");

  late final _roomUserSettingsFuturePoll = _roomUserSettingsFuturePollPtr
      .asFunction<_RoomUserSettingsFuturePollReturn Function(int, int, int)>();
  late final _userRoomSettingsSetHasSeenSuggestedFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _UserRoomSettingsSetHasSeenSuggestedFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__UserRoomSettings_set_has_seen_suggested_future_poll");

  late final _userRoomSettingsSetHasSeenSuggestedFuturePoll =
      _userRoomSettingsSetHasSeenSuggestedFuturePollPtr.asFunction<
          _UserRoomSettingsSetHasSeenSuggestedFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _userRoomSettingsSetIncludeCalSyncFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _UserRoomSettingsSetIncludeCalSyncFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__UserRoomSettings_set_include_cal_sync_future_poll");

  late final _userRoomSettingsSetIncludeCalSyncFuturePoll =
      _userRoomSettingsSetIncludeCalSyncFuturePollPtr.asFunction<
          _UserRoomSettingsSetIncludeCalSyncFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _timelineStreamGetMessageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamGetMessageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_get_message_future_poll");

  late final _timelineStreamGetMessageFuturePoll =
      _timelineStreamGetMessageFuturePollPtr.asFunction<
          _TimelineStreamGetMessageFuturePollReturn Function(int, int, int)>();
  late final _timelineStreamFetchDetailsForEventFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamFetchDetailsForEventFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_fetch_details_for_event_future_poll");

  late final _timelineStreamFetchDetailsForEventFuturePoll =
      _timelineStreamFetchDetailsForEventFuturePollPtr.asFunction<
          _TimelineStreamFetchDetailsForEventFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _timelineStreamPaginateBackwardsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamPaginateBackwardsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_paginate_backwards_future_poll");

  late final _timelineStreamPaginateBackwardsFuturePoll =
      _timelineStreamPaginateBackwardsFuturePollPtr.asFunction<
          _TimelineStreamPaginateBackwardsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _timelineStreamSendMessageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamSendMessageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_send_message_future_poll");

  late final _timelineStreamSendMessageFuturePoll =
      _timelineStreamSendMessageFuturePollPtr.asFunction<
          _TimelineStreamSendMessageFuturePollReturn Function(int, int, int)>();
  late final _timelineStreamEditMessageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamEditMessageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_edit_message_future_poll");

  late final _timelineStreamEditMessageFuturePoll =
      _timelineStreamEditMessageFuturePollPtr.asFunction<
          _TimelineStreamEditMessageFuturePollReturn Function(int, int, int)>();
  late final _timelineStreamReplyMessageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamReplyMessageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_reply_message_future_poll");

  late final _timelineStreamReplyMessageFuturePoll =
      _timelineStreamReplyMessageFuturePollPtr.asFunction<
          _TimelineStreamReplyMessageFuturePollReturn Function(
              int, int, int)>();
  late final _timelineStreamMarkAsReadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamMarkAsReadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_mark_as_read_future_poll");

  late final _timelineStreamMarkAsReadFuturePoll =
      _timelineStreamMarkAsReadFuturePollPtr.asFunction<
          _TimelineStreamMarkAsReadFuturePollReturn Function(int, int, int)>();
  late final _timelineStreamToggleReactionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamToggleReactionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TimelineStream_toggle_reaction_future_poll");

  late final _timelineStreamToggleReactionFuturePoll =
      _timelineStreamToggleReactionFuturePollPtr.asFunction<
          _TimelineStreamToggleReactionFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _convoSpaceRelationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSpaceRelationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_space_relations_future_poll");

  late final _convoSpaceRelationsFuturePoll =
      _convoSpaceRelationsFuturePollPtr.asFunction<
          _ConvoSpaceRelationsFuturePollReturn Function(int, int, int)>();
  late final _convoUploadAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoUploadAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_upload_avatar_future_poll");

  late final _convoUploadAvatarFuturePoll = _convoUploadAvatarFuturePollPtr
      .asFunction<_ConvoUploadAvatarFuturePollReturn Function(int, int, int)>();
  late final _convoRemoveAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoRemoveAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_remove_avatar_future_poll");

  late final _convoRemoveAvatarFuturePoll = _convoRemoveAvatarFuturePollPtr
      .asFunction<_ConvoRemoveAvatarFuturePollReturn Function(int, int, int)>();
  late final _convoSetNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_name_future_poll");

  late final _convoSetNameFuturePoll = _convoSetNameFuturePollPtr
      .asFunction<_ConvoSetNameFuturePollReturn Function(int, int, int)>();
  late final _convoSetTopicFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetTopicFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_topic_future_poll");

  late final _convoSetTopicFuturePoll = _convoSetTopicFuturePollPtr
      .asFunction<_ConvoSetTopicFuturePollReturn Function(int, int, int)>();
  late final _convoActiveMembersIdsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoActiveMembersIdsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_active_members_ids_future_poll");

  late final _convoActiveMembersIdsFuturePoll =
      _convoActiveMembersIdsFuturePollPtr.asFunction<
          _ConvoActiveMembersIdsFuturePollReturn Function(int, int, int)>();
  late final _convoActiveMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoActiveMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_active_members_future_poll");

  late final _convoActiveMembersFuturePoll =
      _convoActiveMembersFuturePollPtr.asFunction<
          _ConvoActiveMembersFuturePollReturn Function(int, int, int)>();
  late final _convoInvitedMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoInvitedMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_invited_members_future_poll");

  late final _convoInvitedMembersFuturePoll =
      _convoInvitedMembersFuturePollPtr.asFunction<
          _ConvoInvitedMembersFuturePollReturn Function(int, int, int)>();
  late final _convoGetMemberFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoGetMemberFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_get_member_future_poll");

  late final _convoGetMemberFuturePoll = _convoGetMemberFuturePollPtr
      .asFunction<_ConvoGetMemberFuturePollReturn Function(int, int, int)>();
  late final _convoGetMyMembershipFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoGetMyMembershipFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_get_my_membership_future_poll");

  late final _convoGetMyMembershipFuturePoll =
      _convoGetMyMembershipFuturePollPtr.asFunction<
          _ConvoGetMyMembershipFuturePollReturn Function(int, int, int)>();
  late final _convoTypingNoticeFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoTypingNoticeFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_typing_notice_future_poll");

  late final _convoTypingNoticeFuturePoll = _convoTypingNoticeFuturePollPtr
      .asFunction<_ConvoTypingNoticeFuturePollReturn Function(int, int, int)>();
  late final _convoMediaBinaryFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoMediaBinaryFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_media_binary_future_poll");

  late final _convoMediaBinaryFuturePoll = _convoMediaBinaryFuturePollPtr
      .asFunction<_ConvoMediaBinaryFuturePollReturn Function(int, int, int)>();
  late final _convoSetBookmarkedFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetBookmarkedFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_bookmarked_future_poll");

  late final _convoSetBookmarkedFuturePoll =
      _convoSetBookmarkedFuturePollPtr.asFunction<
          _ConvoSetBookmarkedFuturePollReturn Function(int, int, int)>();
  late final _convoInviteUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoInviteUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_invite_user_future_poll");

  late final _convoInviteUserFuturePoll = _convoInviteUserFuturePollPtr
      .asFunction<_ConvoInviteUserFuturePollReturn Function(int, int, int)>();
  late final _convoPermalinkFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoPermalinkFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_permalink_future_poll");

  late final _convoPermalinkFuturePoll = _convoPermalinkFuturePollPtr
      .asFunction<_ConvoPermalinkFuturePollReturn Function(int, int, int)>();
  late final _convoJoinFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoJoinFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Convo_join_future_poll");

  late final _convoJoinFuturePoll = _convoJoinFuturePollPtr
      .asFunction<_ConvoJoinFuturePollReturn Function(int, int, int)>();
  late final _convoLeaveFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoLeaveFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_leave_future_poll");

  late final _convoLeaveFuturePoll = _convoLeaveFuturePollPtr
      .asFunction<_ConvoLeaveFuturePollReturn Function(int, int, int)>();
  late final _convoGetInviteesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoGetInviteesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_get_invitees_future_poll");

  late final _convoGetInviteesFuturePoll = _convoGetInviteesFuturePollPtr
      .asFunction<_ConvoGetInviteesFuturePollReturn Function(int, int, int)>();
  late final _convoDownloadMediaFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoDownloadMediaFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_download_media_future_poll");

  late final _convoDownloadMediaFuturePoll =
      _convoDownloadMediaFuturePollPtr.asFunction<
          _ConvoDownloadMediaFuturePollReturn Function(int, int, int)>();
  late final _convoMediaPathFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoMediaPathFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_media_path_future_poll");

  late final _convoMediaPathFuturePoll = _convoMediaPathFuturePollPtr
      .asFunction<_ConvoMediaPathFuturePollReturn Function(int, int, int)>();
  late final _convoIsEncryptedFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoIsEncryptedFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_is_encrypted_future_poll");

  late final _convoIsEncryptedFuturePoll = _convoIsEncryptedFuturePollPtr
      .asFunction<_ConvoIsEncryptedFuturePollReturn Function(int, int, int)>();
  late final _convoRedactMessageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoRedactMessageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_redact_message_future_poll");

  late final _convoRedactMessageFuturePoll =
      _convoRedactMessageFuturePollPtr.asFunction<
          _ConvoRedactMessageFuturePollReturn Function(int, int, int)>();
  late final _convoUpdatePowerLevelFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoUpdatePowerLevelFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_update_power_level_future_poll");

  late final _convoUpdatePowerLevelFuturePoll =
      _convoUpdatePowerLevelFuturePollPtr.asFunction<
          _ConvoUpdatePowerLevelFuturePollReturn Function(int, int, int)>();
  late final _convoReportContentFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoReportContentFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_report_content_future_poll");

  late final _convoReportContentFuturePoll =
      _convoReportContentFuturePollPtr.asFunction<
          _ConvoReportContentFuturePollReturn Function(int, int, int)>();
  late final _convoRedactContentFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoRedactContentFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_redact_content_future_poll");

  late final _convoRedactContentFuturePoll =
      _convoRedactContentFuturePollPtr.asFunction<
          _ConvoRedactContentFuturePollReturn Function(int, int, int)>();
  late final _convoMsgDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoMsgDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_msg_draft_future_poll");

  late final _convoMsgDraftFuturePoll = _convoMsgDraftFuturePollPtr
      .asFunction<_ConvoMsgDraftFuturePollReturn Function(int, int, int)>();
  late final _convoSaveMsgDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSaveMsgDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_save_msg_draft_future_poll");

  late final _convoSaveMsgDraftFuturePoll = _convoSaveMsgDraftFuturePollPtr
      .asFunction<_ConvoSaveMsgDraftFuturePollReturn Function(int, int, int)>();
  late final _convoClearMsgDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoClearMsgDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_clear_msg_draft_future_poll");

  late final _convoClearMsgDraftFuturePoll =
      _convoClearMsgDraftFuturePollPtr.asFunction<
          _ConvoClearMsgDraftFuturePollReturn Function(int, int, int)>();
  late final _convoRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_ref_details_future_poll");

  late final _convoRefDetailsFuturePoll = _convoRefDetailsFuturePollPtr
      .asFunction<_ConvoRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _convoSetPolicyRuleRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPolicyRuleRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_policy_rule_room_future_poll");

  late final _convoSetPolicyRuleRoomFuturePoll =
      _convoSetPolicyRuleRoomFuturePollPtr.asFunction<
          _ConvoSetPolicyRuleRoomFuturePollReturn Function(int, int, int)>();
  late final _convoSetPolicyRuleServerFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPolicyRuleServerFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_policy_rule_server_future_poll");

  late final _convoSetPolicyRuleServerFuturePoll =
      _convoSetPolicyRuleServerFuturePollPtr.asFunction<
          _ConvoSetPolicyRuleServerFuturePollReturn Function(int, int, int)>();
  late final _convoSetPolicyRuleUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPolicyRuleUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_policy_rule_user_future_poll");

  late final _convoSetPolicyRuleUserFuturePoll =
      _convoSetPolicyRuleUserFuturePollPtr.asFunction<
          _ConvoSetPolicyRuleUserFuturePollReturn Function(int, int, int)>();
  late final _convoSetEncryptionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetEncryptionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_encryption_future_poll");

  late final _convoSetEncryptionFuturePoll =
      _convoSetEncryptionFuturePollPtr.asFunction<
          _ConvoSetEncryptionFuturePollReturn Function(int, int, int)>();
  late final _convoSetGuestAccessFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetGuestAccessFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_guest_access_future_poll");

  late final _convoSetGuestAccessFuturePoll =
      _convoSetGuestAccessFuturePollPtr.asFunction<
          _ConvoSetGuestAccessFuturePollReturn Function(int, int, int)>();
  late final _convoSetHistoryVisibilityFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetHistoryVisibilityFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_history_visibility_future_poll");

  late final _convoSetHistoryVisibilityFuturePoll =
      _convoSetHistoryVisibilityFuturePollPtr.asFunction<
          _ConvoSetHistoryVisibilityFuturePollReturn Function(int, int, int)>();
  late final _convoSetJoinRulesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetJoinRulesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_join_rules_future_poll");

  late final _convoSetJoinRulesFuturePoll = _convoSetJoinRulesFuturePollPtr
      .asFunction<_ConvoSetJoinRulesFuturePollReturn Function(int, int, int)>();
  late final _convoSetPinnedEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPinnedEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_pinned_events_future_poll");

  late final _convoSetPinnedEventsFuturePoll =
      _convoSetPinnedEventsFuturePollPtr.asFunction<
          _ConvoSetPinnedEventsFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsBanFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsBanFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_ban_future_poll");

  late final _convoSetPowerLevelsBanFuturePoll =
      _convoSetPowerLevelsBanFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsBanFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_events_future_poll");

  late final _convoSetPowerLevelsEventsFuturePoll =
      _convoSetPowerLevelsEventsFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsEventsFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsEventsDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsEventsDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_events_default_future_poll");

  late final _convoSetPowerLevelsEventsDefaultFuturePoll =
      _convoSetPowerLevelsEventsDefaultFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsEventsDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _convoSetPowerLevelsInviteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsInviteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_invite_future_poll");

  late final _convoSetPowerLevelsInviteFuturePoll =
      _convoSetPowerLevelsInviteFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsInviteFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsKickFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsKickFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_kick_future_poll");

  late final _convoSetPowerLevelsKickFuturePoll =
      _convoSetPowerLevelsKickFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsKickFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_redact_future_poll");

  late final _convoSetPowerLevelsRedactFuturePoll =
      _convoSetPowerLevelsRedactFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsRedactFuturePollReturn Function(int, int, int)>();
  late final _convoSetPowerLevelsStateDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsStateDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_state_default_future_poll");

  late final _convoSetPowerLevelsStateDefaultFuturePoll =
      _convoSetPowerLevelsStateDefaultFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsStateDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _convoSetPowerLevelsUsersDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsUsersDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_users_default_future_poll");

  late final _convoSetPowerLevelsUsersDefaultFuturePoll =
      _convoSetPowerLevelsUsersDefaultFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsUsersDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _convoSetPowerLevelsNotificationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetPowerLevelsNotificationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_power_levels_notifications_future_poll");

  late final _convoSetPowerLevelsNotificationsFuturePoll =
      _convoSetPowerLevelsNotificationsFuturePollPtr.asFunction<
          _ConvoSetPowerLevelsNotificationsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _convoSetServerAclFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetServerAclFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_server_acl_future_poll");

  late final _convoSetServerAclFuturePoll = _convoSetServerAclFuturePollPtr
      .asFunction<_ConvoSetServerAclFuturePollReturn Function(int, int, int)>();
  late final _convoSetTombstoneFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ConvoSetTombstoneFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Convo_set_tombstone_future_poll");

  late final _convoSetTombstoneFuturePoll = _convoSetTombstoneFuturePollPtr
      .asFunction<_ConvoSetTombstoneFuturePollReturn Function(int, int, int)>();
  late final _commentDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CommentDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CommentDraft_send_future_poll");

  late final _commentDraftSendFuturePoll = _commentDraftSendFuturePollPtr
      .asFunction<_CommentDraftSendFuturePollReturn Function(int, int, int)>();
  late final _commentCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CommentCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Comment_can_redact_future_poll");

  late final _commentCanRedactFuturePoll = _commentCanRedactFuturePollPtr
      .asFunction<_CommentCanRedactFuturePollReturn Function(int, int, int)>();
  late final _commentsManagerCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CommentsManagerCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CommentsManager_comments_future_poll");

  late final _commentsManagerCommentsFuturePoll =
      _commentsManagerCommentsFuturePollPtr.asFunction<
          _CommentsManagerCommentsFuturePollReturn Function(int, int, int)>();
  late final _commentsManagerReloadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _CommentsManagerReloadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__CommentsManager_reload_future_poll");

  late final _commentsManagerReloadFuturePoll =
      _commentsManagerReloadFuturePollPtr.asFunction<
          _CommentsManagerReloadFuturePollReturn Function(int, int, int)>();
  late final _objectInvitationsManagerInviteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ObjectInvitationsManagerInviteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ObjectInvitationsManager_invite_future_poll");

  late final _objectInvitationsManagerInviteFuturePoll =
      _objectInvitationsManagerInviteFuturePollPtr.asFunction<
          _ObjectInvitationsManagerInviteFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _objectInvitationsManagerReloadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ObjectInvitationsManagerReloadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ObjectInvitationsManager_reload_future_poll");

  late final _objectInvitationsManagerReloadFuturePoll =
      _objectInvitationsManagerReloadFuturePollPtr.asFunction<
          _ObjectInvitationsManagerReloadFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _attachmentDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentDraft_send_future_poll");

  late final _attachmentDraftSendFuturePoll =
      _attachmentDraftSendFuturePollPtr.asFunction<
          _AttachmentDraftSendFuturePollReturn Function(int, int, int)>();
  late final _attachmentDownloadMediaFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentDownloadMediaFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Attachment_download_media_future_poll");

  late final _attachmentDownloadMediaFuturePoll =
      _attachmentDownloadMediaFuturePollPtr.asFunction<
          _AttachmentDownloadMediaFuturePollReturn Function(int, int, int)>();
  late final _attachmentMediaPathFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentMediaPathFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Attachment_media_path_future_poll");

  late final _attachmentMediaPathFuturePoll =
      _attachmentMediaPathFuturePollPtr.asFunction<
          _AttachmentMediaPathFuturePollReturn Function(int, int, int)>();
  late final _attachmentCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Attachment_can_redact_future_poll");

  late final _attachmentCanRedactFuturePoll =
      _attachmentCanRedactFuturePollPtr.asFunction<
          _AttachmentCanRedactFuturePollReturn Function(int, int, int)>();
  late final _attachmentsManagerAttachmentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerAttachmentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_attachments_future_poll");

  late final _attachmentsManagerAttachmentsFuturePoll =
      _attachmentsManagerAttachmentsFuturePollPtr.asFunction<
          _AttachmentsManagerAttachmentsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _attachmentsManagerContentDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerContentDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_content_draft_future_poll");

  late final _attachmentsManagerContentDraftFuturePoll =
      _attachmentsManagerContentDraftFuturePollPtr.asFunction<
          _AttachmentsManagerContentDraftFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _attachmentsManagerLinkDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerLinkDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_link_draft_future_poll");

  late final _attachmentsManagerLinkDraftFuturePoll =
      _attachmentsManagerLinkDraftFuturePollPtr.asFunction<
          _AttachmentsManagerLinkDraftFuturePollReturn Function(
              int, int, int)>();
  late final _attachmentsManagerReferenceDraftFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerReferenceDraftFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_reference_draft_future_poll");

  late final _attachmentsManagerReferenceDraftFuturePoll =
      _attachmentsManagerReferenceDraftFuturePollPtr.asFunction<
          _AttachmentsManagerReferenceDraftFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _attachmentsManagerReloadFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerReloadFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_reload_future_poll");

  late final _attachmentsManagerReloadFuturePoll =
      _attachmentsManagerReloadFuturePollPtr.asFunction<
          _AttachmentsManagerReloadFuturePollReturn Function(int, int, int)>();
  late final _attachmentsManagerRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__AttachmentsManager_redact_future_poll");

  late final _attachmentsManagerRedactFuturePoll =
      _attachmentsManagerRedactFuturePollPtr.asFunction<
          _AttachmentsManagerRedactFuturePollReturn Function(int, int, int)>();
  late final _taskAssignSelfFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskAssignSelfFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_assign_self_future_poll");

  late final _taskAssignSelfFuturePoll = _taskAssignSelfFuturePollPtr
      .asFunction<_TaskAssignSelfFuturePollReturn Function(int, int, int)>();
  late final _taskUnassignSelfFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskUnassignSelfFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_unassign_self_future_poll");

  late final _taskUnassignSelfFuturePoll = _taskUnassignSelfFuturePollPtr
      .asFunction<_TaskUnassignSelfFuturePollReturn Function(int, int, int)>();
  late final _taskRefreshFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskRefreshFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_refresh_future_poll");

  late final _taskRefreshFuturePoll = _taskRefreshFuturePollPtr
      .asFunction<_TaskRefreshFuturePollReturn Function(int, int, int)>();
  late final _taskCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_can_redact_future_poll");

  late final _taskCanRedactFuturePoll = _taskCanRedactFuturePollPtr
      .asFunction<_TaskCanRedactFuturePollReturn Function(int, int, int)>();
  late final _taskCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_comments_future_poll");

  late final _taskCommentsFuturePoll = _taskCommentsFuturePollPtr
      .asFunction<_TaskCommentsFuturePollReturn Function(int, int, int)>();
  late final _taskAttachmentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskAttachmentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_attachments_future_poll");

  late final _taskAttachmentsFuturePoll = _taskAttachmentsFuturePollPtr
      .asFunction<_TaskAttachmentsFuturePollReturn Function(int, int, int)>();
  late final _taskInvitationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskInvitationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Task_invitations_future_poll");

  late final _taskInvitationsFuturePoll = _taskInvitationsFuturePollPtr
      .asFunction<_TaskInvitationsFuturePollReturn Function(int, int, int)>();
  late final _taskUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskUpdateBuilder_send_future_poll");

  late final _taskUpdateBuilderSendFuturePoll =
      _taskUpdateBuilderSendFuturePollPtr.asFunction<
          _TaskUpdateBuilderSendFuturePollReturn Function(int, int, int)>();
  late final _taskDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskDraft_send_future_poll");

  late final _taskDraftSendFuturePoll = _taskDraftSendFuturePollPtr
      .asFunction<_TaskDraftSendFuturePollReturn Function(int, int, int)>();
  late final _taskListTasksFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListTasksFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_tasks_future_poll");

  late final _taskListTasksFuturePoll = _taskListTasksFuturePollPtr
      .asFunction<_TaskListTasksFuturePollReturn Function(int, int, int)>();
  late final _taskListTaskFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListTaskFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_task_future_poll");

  late final _taskListTaskFuturePoll = _taskListTaskFuturePollPtr
      .asFunction<_TaskListTaskFuturePollReturn Function(int, int, int)>();
  late final _taskListRefreshFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListRefreshFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_refresh_future_poll");

  late final _taskListRefreshFuturePoll = _taskListRefreshFuturePollPtr
      .asFunction<_TaskListRefreshFuturePollReturn Function(int, int, int)>();
  late final _taskListCanRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListCanRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_can_redact_future_poll");

  late final _taskListCanRedactFuturePoll = _taskListCanRedactFuturePollPtr
      .asFunction<_TaskListCanRedactFuturePollReturn Function(int, int, int)>();
  late final _taskListRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_ref_details_future_poll");

  late final _taskListRefDetailsFuturePoll =
      _taskListRefDetailsFuturePollPtr.asFunction<
          _TaskListRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _taskListCommentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListCommentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_comments_future_poll");

  late final _taskListCommentsFuturePoll = _taskListCommentsFuturePollPtr
      .asFunction<_TaskListCommentsFuturePollReturn Function(int, int, int)>();
  late final _taskListAttachmentsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListAttachmentsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskList_attachments_future_poll");

  late final _taskListAttachmentsFuturePoll =
      _taskListAttachmentsFuturePollPtr.asFunction<
          _TaskListAttachmentsFuturePollReturn Function(int, int, int)>();
  late final _taskListDraftSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListDraftSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskListDraft_send_future_poll");

  late final _taskListDraftSendFuturePoll = _taskListDraftSendFuturePollPtr
      .asFunction<_TaskListDraftSendFuturePollReturn Function(int, int, int)>();
  late final _taskListUpdateBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListUpdateBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__TaskListUpdateBuilder_send_future_poll");

  late final _taskListUpdateBuilderSendFuturePoll =
      _taskListUpdateBuilderSendFuturePollPtr.asFunction<
          _TaskListUpdateBuilderSendFuturePollReturn Function(int, int, int)>();
  late final _spaceHierarchyRoomInfoGetAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceHierarchyRoomInfoGetAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SpaceHierarchyRoomInfo_get_avatar_future_poll");

  late final _spaceHierarchyRoomInfoGetAvatarFuturePoll =
      _spaceHierarchyRoomInfoGetAvatarFuturePollPtr.asFunction<
          _SpaceHierarchyRoomInfoGetAvatarFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceRelationsQueryHierarchyFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRelationsQueryHierarchyFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SpaceRelations_query_hierarchy_future_poll");

  late final _spaceRelationsQueryHierarchyFuturePoll =
      _spaceRelationsQueryHierarchyFuturePollPtr.asFunction<
          _SpaceRelationsQueryHierarchyFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _activitiesGetIdsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActivitiesGetIdsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Activities_get_ids_future_poll");

  late final _activitiesGetIdsFuturePoll = _activitiesGetIdsFuturePollPtr
      .asFunction<_ActivitiesGetIdsFuturePollReturn Function(int, int, int)>();
  late final _roomPreviewAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomPreviewAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RoomPreview_avatar_future_poll");

  late final _roomPreviewAvatarFuturePoll = _roomPreviewAvatarFuturePollPtr
      .asFunction<_RoomPreviewAvatarFuturePollReturn Function(int, int, int)>();
  late final _spaceCreateOnboardingDataFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceCreateOnboardingDataFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_create_onboarding_data_future_poll");

  late final _spaceCreateOnboardingDataFuturePoll =
      _spaceCreateOnboardingDataFuturePollPtr.asFunction<
          _SpaceCreateOnboardingDataFuturePollReturn Function(int, int, int)>();
  late final _spaceSpaceRelationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSpaceRelationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_space_relations_future_poll");

  late final _spaceSpaceRelationsFuturePoll =
      _spaceSpaceRelationsFuturePollPtr.asFunction<
          _SpaceSpaceRelationsFuturePollReturn Function(int, int, int)>();
  late final _spaceIsChildSpaceOfFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceIsChildSpaceOfFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_is_child_space_of_future_poll");

  late final _spaceIsChildSpaceOfFuturePoll =
      _spaceIsChildSpaceOfFuturePollPtr.asFunction<
          _SpaceIsChildSpaceOfFuturePollReturn Function(int, int, int)>();
  late final _spaceAddChildRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceAddChildRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_add_child_room_future_poll");

  late final _spaceAddChildRoomFuturePoll = _spaceAddChildRoomFuturePollPtr
      .asFunction<_SpaceAddChildRoomFuturePollReturn Function(int, int, int)>();
  late final _spaceRemoveChildRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRemoveChildRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_remove_child_room_future_poll");

  late final _spaceRemoveChildRoomFuturePoll =
      _spaceRemoveChildRoomFuturePollPtr.asFunction<
          _SpaceRemoveChildRoomFuturePollReturn Function(int, int, int)>();
  late final _spaceUploadAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceUploadAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_upload_avatar_future_poll");

  late final _spaceUploadAvatarFuturePoll = _spaceUploadAvatarFuturePollPtr
      .asFunction<_SpaceUploadAvatarFuturePollReturn Function(int, int, int)>();
  late final _spaceSetActerSpaceStatesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetActerSpaceStatesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_acter_space_states_future_poll");

  late final _spaceSetActerSpaceStatesFuturePoll =
      _spaceSetActerSpaceStatesFuturePollPtr.asFunction<
          _SpaceSetActerSpaceStatesFuturePollReturn Function(int, int, int)>();
  late final _spaceRemoveAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRemoveAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_remove_avatar_future_poll");

  late final _spaceRemoveAvatarFuturePoll = _spaceRemoveAvatarFuturePollPtr
      .asFunction<_SpaceRemoveAvatarFuturePollReturn Function(int, int, int)>();
  late final _spaceSetTopicFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetTopicFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_topic_future_poll");

  late final _spaceSetTopicFuturePoll = _spaceSetTopicFuturePollPtr
      .asFunction<_SpaceSetTopicFuturePollReturn Function(int, int, int)>();
  late final _spaceSetNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_name_future_poll");

  late final _spaceSetNameFuturePoll = _spaceSetNameFuturePollPtr
      .asFunction<_SpaceSetNameFuturePollReturn Function(int, int, int)>();
  late final _spaceSetBookmarkedFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetBookmarkedFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_bookmarked_future_poll");

  late final _spaceSetBookmarkedFuturePoll =
      _spaceSetBookmarkedFuturePollPtr.asFunction<
          _SpaceSetBookmarkedFuturePollReturn Function(int, int, int)>();
  late final _spaceActiveMembersIdsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceActiveMembersIdsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_active_members_ids_future_poll");

  late final _spaceActiveMembersIdsFuturePoll =
      _spaceActiveMembersIdsFuturePollPtr.asFunction<
          _SpaceActiveMembersIdsFuturePollReturn Function(int, int, int)>();
  late final _spaceActiveMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceActiveMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_active_members_future_poll");

  late final _spaceActiveMembersFuturePoll =
      _spaceActiveMembersFuturePollPtr.asFunction<
          _SpaceActiveMembersFuturePollReturn Function(int, int, int)>();
  late final _spaceInvitedMembersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceInvitedMembersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_invited_members_future_poll");

  late final _spaceInvitedMembersFuturePoll =
      _spaceInvitedMembersFuturePollPtr.asFunction<
          _SpaceInvitedMembersFuturePollReturn Function(int, int, int)>();
  late final _spaceInviteUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceInviteUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_invite_user_future_poll");

  late final _spaceInviteUserFuturePoll = _spaceInviteUserFuturePollPtr
      .asFunction<_SpaceInviteUserFuturePollReturn Function(int, int, int)>();
  late final _spaceGetMemberFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceGetMemberFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_get_member_future_poll");

  late final _spaceGetMemberFuturePoll = _spaceGetMemberFuturePollPtr
      .asFunction<_SpaceGetMemberFuturePollReturn Function(int, int, int)>();
  late final _spaceGetMyMembershipFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceGetMyMembershipFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_get_my_membership_future_poll");

  late final _spaceGetMyMembershipFuturePoll =
      _spaceGetMyMembershipFuturePollPtr.asFunction<
          _SpaceGetMyMembershipFuturePollReturn Function(int, int, int)>();
  late final _spaceIsEncryptedFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceIsEncryptedFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_is_encrypted_future_poll");

  late final _spaceIsEncryptedFuturePoll = _spaceIsEncryptedFuturePollPtr
      .asFunction<_SpaceIsEncryptedFuturePollReturn Function(int, int, int)>();
  late final _spaceIsActerSpaceFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceIsActerSpaceFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_is_acter_space_future_poll");

  late final _spaceIsActerSpaceFuturePoll = _spaceIsActerSpaceFuturePollPtr
      .asFunction<_SpaceIsActerSpaceFuturePollReturn Function(int, int, int)>();
  late final _spaceTaskListsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceTaskListsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_task_lists_future_poll");

  late final _spaceTaskListsFuturePoll = _spaceTaskListsFuturePollPtr
      .asFunction<_SpaceTaskListsFuturePollReturn Function(int, int, int)>();
  late final _spaceLatestNewsEntriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceLatestNewsEntriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_latest_news_entries_future_poll");

  late final _spaceLatestNewsEntriesFuturePoll =
      _spaceLatestNewsEntriesFuturePollPtr.asFunction<
          _SpaceLatestNewsEntriesFuturePollReturn Function(int, int, int)>();
  late final _spaceLatestStoriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceLatestStoriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_latest_stories_future_poll");

  late final _spaceLatestStoriesFuturePoll =
      _spaceLatestStoriesFuturePollPtr.asFunction<
          _SpaceLatestStoriesFuturePollReturn Function(int, int, int)>();
  late final _spaceCalendarEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceCalendarEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_calendar_events_future_poll");

  late final _spaceCalendarEventsFuturePoll =
      _spaceCalendarEventsFuturePollPtr.asFunction<
          _SpaceCalendarEventsFuturePollReturn Function(int, int, int)>();
  late final _spacePinsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpacePinsFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Space_pins_future_poll");

  late final _spacePinsFuturePoll = _spacePinsFuturePollPtr
      .asFunction<_SpacePinsFuturePollReturn Function(int, int, int)>();
  late final _spaceJoinFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceJoinFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Space_join_future_poll");

  late final _spaceJoinFuturePoll = _spaceJoinFuturePollPtr
      .asFunction<_SpaceJoinFuturePollReturn Function(int, int, int)>();
  late final _spaceLeaveFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceLeaveFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_leave_future_poll");

  late final _spaceLeaveFuturePoll = _spaceLeaveFuturePollPtr
      .asFunction<_SpaceLeaveFuturePollReturn Function(int, int, int)>();
  late final _spacePowerLevelsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpacePowerLevelsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_power_levels_future_poll");

  late final _spacePowerLevelsFuturePoll = _spacePowerLevelsFuturePollPtr
      .asFunction<_SpacePowerLevelsFuturePollReturn Function(int, int, int)>();
  late final _spaceAppSettingsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceAppSettingsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_app_settings_future_poll");

  late final _spaceAppSettingsFuturePoll = _spaceAppSettingsFuturePollPtr
      .asFunction<_SpaceAppSettingsFuturePollReturn Function(int, int, int)>();
  late final _spaceUpdateAppSettingsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceUpdateAppSettingsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_update_app_settings_future_poll");

  late final _spaceUpdateAppSettingsFuturePoll =
      _spaceUpdateAppSettingsFuturePollPtr.asFunction<
          _SpaceUpdateAppSettingsFuturePollReturn Function(int, int, int)>();
  late final _spaceUpdateFeaturePowerLevelsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceUpdateFeaturePowerLevelsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_update_feature_power_levels_future_poll");

  late final _spaceUpdateFeaturePowerLevelsFuturePoll =
      _spaceUpdateFeaturePowerLevelsFuturePollPtr.asFunction<
          _SpaceUpdateFeaturePowerLevelsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceUpdateRegularPowerLevelsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceUpdateRegularPowerLevelsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_update_regular_power_levels_future_poll");

  late final _spaceUpdateRegularPowerLevelsFuturePoll =
      _spaceUpdateRegularPowerLevelsFuturePollPtr.asFunction<
          _SpaceUpdateRegularPowerLevelsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceReportContentFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceReportContentFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_report_content_future_poll");

  late final _spaceReportContentFuturePoll =
      _spaceReportContentFuturePollPtr.asFunction<
          _SpaceReportContentFuturePollReturn Function(int, int, int)>();
  late final _spaceRedactContentFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRedactContentFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_redact_content_future_poll");

  late final _spaceRedactContentFuturePoll =
      _spaceRedactContentFuturePollPtr.asFunction<
          _SpaceRedactContentFuturePollReturn Function(int, int, int)>();
  late final _spaceCategoriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceCategoriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_categories_future_poll");

  late final _spaceCategoriesFuturePoll = _spaceCategoriesFuturePollPtr
      .asFunction<_SpaceCategoriesFuturePollReturn Function(int, int, int)>();
  late final _spaceSetCategoriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetCategoriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_categories_future_poll");

  late final _spaceSetCategoriesFuturePoll =
      _spaceSetCategoriesFuturePollPtr.asFunction<
          _SpaceSetCategoriesFuturePollReturn Function(int, int, int)>();
  late final _spaceRefDetailsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceRefDetailsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_ref_details_future_poll");

  late final _spaceRefDetailsFuturePoll = _spaceRefDetailsFuturePollPtr
      .asFunction<_SpaceRefDetailsFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPolicyRuleRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPolicyRuleRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_policy_rule_room_future_poll");

  late final _spaceSetPolicyRuleRoomFuturePoll =
      _spaceSetPolicyRuleRoomFuturePollPtr.asFunction<
          _SpaceSetPolicyRuleRoomFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPolicyRuleServerFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPolicyRuleServerFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_policy_rule_server_future_poll");

  late final _spaceSetPolicyRuleServerFuturePoll =
      _spaceSetPolicyRuleServerFuturePollPtr.asFunction<
          _SpaceSetPolicyRuleServerFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPolicyRuleUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPolicyRuleUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_policy_rule_user_future_poll");

  late final _spaceSetPolicyRuleUserFuturePoll =
      _spaceSetPolicyRuleUserFuturePollPtr.asFunction<
          _SpaceSetPolicyRuleUserFuturePollReturn Function(int, int, int)>();
  late final _spaceSetEncryptionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetEncryptionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_encryption_future_poll");

  late final _spaceSetEncryptionFuturePoll =
      _spaceSetEncryptionFuturePollPtr.asFunction<
          _SpaceSetEncryptionFuturePollReturn Function(int, int, int)>();
  late final _spaceSetGuestAccessFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetGuestAccessFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_guest_access_future_poll");

  late final _spaceSetGuestAccessFuturePoll =
      _spaceSetGuestAccessFuturePollPtr.asFunction<
          _SpaceSetGuestAccessFuturePollReturn Function(int, int, int)>();
  late final _spaceSetHistoryVisibilityFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetHistoryVisibilityFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_history_visibility_future_poll");

  late final _spaceSetHistoryVisibilityFuturePoll =
      _spaceSetHistoryVisibilityFuturePollPtr.asFunction<
          _SpaceSetHistoryVisibilityFuturePollReturn Function(int, int, int)>();
  late final _spaceSetJoinRulesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetJoinRulesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_join_rules_future_poll");

  late final _spaceSetJoinRulesFuturePoll = _spaceSetJoinRulesFuturePollPtr
      .asFunction<_SpaceSetJoinRulesFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPinnedEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPinnedEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_pinned_events_future_poll");

  late final _spaceSetPinnedEventsFuturePoll =
      _spaceSetPinnedEventsFuturePollPtr.asFunction<
          _SpaceSetPinnedEventsFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsBanFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsBanFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_ban_future_poll");

  late final _spaceSetPowerLevelsBanFuturePoll =
      _spaceSetPowerLevelsBanFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsBanFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_events_future_poll");

  late final _spaceSetPowerLevelsEventsFuturePoll =
      _spaceSetPowerLevelsEventsFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsEventsFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsEventsDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsEventsDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_events_default_future_poll");

  late final _spaceSetPowerLevelsEventsDefaultFuturePoll =
      _spaceSetPowerLevelsEventsDefaultFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsEventsDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceSetPowerLevelsInviteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsInviteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_invite_future_poll");

  late final _spaceSetPowerLevelsInviteFuturePoll =
      _spaceSetPowerLevelsInviteFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsInviteFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsKickFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsKickFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_kick_future_poll");

  late final _spaceSetPowerLevelsKickFuturePoll =
      _spaceSetPowerLevelsKickFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsKickFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsRedactFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsRedactFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_redact_future_poll");

  late final _spaceSetPowerLevelsRedactFuturePoll =
      _spaceSetPowerLevelsRedactFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsRedactFuturePollReturn Function(int, int, int)>();
  late final _spaceSetPowerLevelsStateDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsStateDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_state_default_future_poll");

  late final _spaceSetPowerLevelsStateDefaultFuturePoll =
      _spaceSetPowerLevelsStateDefaultFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsStateDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceSetPowerLevelsUsersDefaultFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsUsersDefaultFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_users_default_future_poll");

  late final _spaceSetPowerLevelsUsersDefaultFuturePoll =
      _spaceSetPowerLevelsUsersDefaultFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsUsersDefaultFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceSetPowerLevelsNotificationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetPowerLevelsNotificationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_power_levels_notifications_future_poll");

  late final _spaceSetPowerLevelsNotificationsFuturePoll =
      _spaceSetPowerLevelsNotificationsFuturePollPtr.asFunction<
          _SpaceSetPowerLevelsNotificationsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _spaceSetServerAclFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetServerAclFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_server_acl_future_poll");

  late final _spaceSetServerAclFuturePoll = _spaceSetServerAclFuturePollPtr
      .asFunction<_SpaceSetServerAclFuturePollReturn Function(int, int, int)>();
  late final _spaceSetTombstoneFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SpaceSetTombstoneFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Space_set_tombstone_future_poll");

  late final _spaceSetTombstoneFuturePoll = _spaceSetTombstoneFuturePollPtr
      .asFunction<_SpaceSetTombstoneFuturePollReturn Function(int, int, int)>();
  late final _memberIgnoreFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _MemberIgnoreFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Member_ignore_future_poll");

  late final _memberIgnoreFuturePoll = _memberIgnoreFuturePollPtr
      .asFunction<_MemberIgnoreFuturePollReturn Function(int, int, int)>();
  late final _memberUnignoreFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _MemberUnignoreFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Member_unignore_future_poll");

  late final _memberUnignoreFuturePoll = _memberUnignoreFuturePollPtr
      .asFunction<_MemberUnignoreFuturePollReturn Function(int, int, int)>();
  late final _memberKickFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _MemberKickFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Member_kick_future_poll");

  late final _memberKickFuturePoll = _memberKickFuturePollPtr
      .asFunction<_MemberKickFuturePollReturn Function(int, int, int)>();
  late final _memberBanFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _MemberBanFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Member_ban_future_poll");

  late final _memberBanFuturePoll = _memberBanFuturePollPtr
      .asFunction<_MemberBanFuturePollReturn Function(int, int, int)>();
  late final _memberUnbanFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _MemberUnbanFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Member_unban_future_poll");

  late final _memberUnbanFuturePoll = _memberUnbanFuturePollPtr
      .asFunction<_MemberUnbanFuturePollReturn Function(int, int, int)>();
  late final _acterUserAppSettingsBuilderSendFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ActerUserAppSettingsBuilderSendFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__ActerUserAppSettingsBuilder_send_future_poll");

  late final _acterUserAppSettingsBuilderSendFuturePoll =
      _acterUserAppSettingsBuilderSendFuturePollPtr.asFunction<
          _ActerUserAppSettingsBuilderSendFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _accountDisplayNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountDisplayNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_display_name_future_poll");

  late final _accountDisplayNameFuturePoll =
      _accountDisplayNameFuturePollPtr.asFunction<
          _AccountDisplayNameFuturePollReturn Function(int, int, int)>();
  late final _accountSetDisplayNameFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountSetDisplayNameFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_set_display_name_future_poll");

  late final _accountSetDisplayNameFuturePoll =
      _accountSetDisplayNameFuturePollPtr.asFunction<
          _AccountSetDisplayNameFuturePollReturn Function(int, int, int)>();
  late final _accountAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_avatar_future_poll");

  late final _accountAvatarFuturePoll = _accountAvatarFuturePollPtr
      .asFunction<_AccountAvatarFuturePollReturn Function(int, int, int)>();
  late final _accountUploadAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountUploadAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_upload_avatar_future_poll");

  late final _accountUploadAvatarFuturePoll =
      _accountUploadAvatarFuturePollPtr.asFunction<
          _AccountUploadAvatarFuturePollReturn Function(int, int, int)>();
  late final _accountIgnoredUsersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountIgnoredUsersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_ignored_users_future_poll");

  late final _accountIgnoredUsersFuturePoll =
      _accountIgnoredUsersFuturePollPtr.asFunction<
          _AccountIgnoredUsersFuturePollReturn Function(int, int, int)>();
  late final _accountIgnoreUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountIgnoreUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_ignore_user_future_poll");

  late final _accountIgnoreUserFuturePoll = _accountIgnoreUserFuturePollPtr
      .asFunction<_AccountIgnoreUserFuturePollReturn Function(int, int, int)>();
  late final _accountUnignoreUserFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountUnignoreUserFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_unignore_user_future_poll");

  late final _accountUnignoreUserFuturePoll =
      _accountUnignoreUserFuturePollPtr.asFunction<
          _AccountUnignoreUserFuturePollReturn Function(int, int, int)>();
  late final _accountActerAppSettingsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountActerAppSettingsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_acter_app_settings_future_poll");

  late final _accountActerAppSettingsFuturePoll =
      _accountActerAppSettingsFuturePollPtr.asFunction<
          _AccountActerAppSettingsFuturePollReturn Function(int, int, int)>();
  late final _accountDeactivateFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountDeactivateFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_deactivate_future_poll");

  late final _accountDeactivateFuturePoll = _accountDeactivateFuturePollPtr
      .asFunction<_AccountDeactivateFuturePollReturn Function(int, int, int)>();
  late final _accountChangePasswordFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountChangePasswordFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_change_password_future_poll");

  late final _accountChangePasswordFuturePoll =
      _accountChangePasswordFuturePollPtr.asFunction<
          _AccountChangePasswordFuturePollReturn Function(int, int, int)>();
  late final _accountConfirmedEmailAddressesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountConfirmedEmailAddressesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_confirmed_email_addresses_future_poll");

  late final _accountConfirmedEmailAddressesFuturePoll =
      _accountConfirmedEmailAddressesFuturePollPtr.asFunction<
          _AccountConfirmedEmailAddressesFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _accountRequestedEmailAddressesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountRequestedEmailAddressesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_requested_email_addresses_future_poll");

  late final _accountRequestedEmailAddressesFuturePoll =
      _accountRequestedEmailAddressesFuturePollPtr.asFunction<
          _AccountRequestedEmailAddressesFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _accountRequest3pidManagementTokenViaEmailFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountRequest3pidManagementTokenViaEmailFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_request_3pid_management_token_via_email_future_poll");

  late final _accountRequest3pidManagementTokenViaEmailFuturePoll =
      _accountRequest3pidManagementTokenViaEmailFuturePollPtr.asFunction<
          _AccountRequest3pidManagementTokenViaEmailFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _accountExternalIdsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountExternalIdsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_external_ids_future_poll");

  late final _accountExternalIdsFuturePoll =
      _accountExternalIdsFuturePollPtr.asFunction<
          _AccountExternalIdsFuturePollReturn Function(int, int, int)>();
  late final _accountTryConfirmEmailStatusFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountTryConfirmEmailStatusFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_try_confirm_email_status_future_poll");

  late final _accountTryConfirmEmailStatusFuturePoll =
      _accountTryConfirmEmailStatusFuturePollPtr.asFunction<
          _AccountTryConfirmEmailStatusFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _accountSubmitTokenFromEmailFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountSubmitTokenFromEmailFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_submit_token_from_email_future_poll");

  late final _accountSubmitTokenFromEmailFuturePoll =
      _accountSubmitTokenFromEmailFuturePollPtr.asFunction<
          _AccountSubmitTokenFromEmailFuturePollReturn Function(
              int, int, int)>();
  late final _accountRemoveEmailAddressFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountRemoveEmailAddressFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_remove_email_address_future_poll");

  late final _accountRemoveEmailAddressFuturePoll =
      _accountRemoveEmailAddressFuturePollPtr.asFunction<
          _AccountRemoveEmailAddressFuturePollReturn Function(int, int, int)>();
  late final _accountBookmarksFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _AccountBookmarksFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Account_bookmarks_future_poll");

  late final _accountBookmarksFuturePoll = _accountBookmarksFuturePollPtr
      .asFunction<_AccountBookmarksFuturePollReturn Function(int, int, int)>();
  late final _bookmarksAddFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BookmarksAddFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Bookmarks_add_future_poll");

  late final _bookmarksAddFuturePoll = _bookmarksAddFuturePollPtr
      .asFunction<_BookmarksAddFuturePollReturn Function(int, int, int)>();
  late final _bookmarksRemoveFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BookmarksRemoveFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Bookmarks_remove_future_poll");

  late final _bookmarksRemoveFuturePoll = _bookmarksRemoveFuturePollPtr
      .asFunction<_BookmarksRemoveFuturePollReturn Function(int, int, int)>();
  late final _publicSearchResultItemGetAvatarFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _PublicSearchResultItemGetAvatarFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__PublicSearchResultItem_get_avatar_future_poll");

  late final _publicSearchResultItemGetAvatarFuturePoll =
      _publicSearchResultItemGetAvatarFuturePollPtr.asFunction<
          _PublicSearchResultItemGetAvatarFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _notificationSenderImageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSenderImageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationSender_image_future_poll");

  late final _notificationSenderImageFuturePoll =
      _notificationSenderImageFuturePollPtr.asFunction<
          _NotificationSenderImageFuturePollReturn Function(int, int, int)>();
  late final _notificationRoomImageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationRoomImageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationRoom_image_future_poll");

  late final _notificationRoomImageFuturePoll =
      _notificationRoomImageFuturePollPtr.asFunction<
          _NotificationRoomImageFuturePollReturn Function(int, int, int)>();
  late final _notificationItemImageFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemImageFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationItem_image_future_poll");

  late final _notificationItemImageFuturePoll =
      _notificationItemImageFuturePollPtr.asFunction<
          _NotificationItemImageFuturePollReturn Function(int, int, int)>();
  late final _notificationItemImagePathFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationItemImagePathFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationItem_image_path_future_poll");

  late final _notificationItemImagePathFuturePoll =
      _notificationItemImagePathFuturePollPtr.asFunction<
          _NotificationItemImagePathFuturePollReturn Function(int, int, int)>();
  late final _pusherDeleteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _PusherDeleteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Pusher_delete_future_poll");

  late final _pusherDeleteFuturePoll = _pusherDeleteFuturePollPtr
      .asFunction<_PusherDeleteFuturePollReturn Function(int, int, int)>();
  late final _invitationsManagerRoomInvitationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _InvitationsManagerRoomInvitationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__InvitationsManager_room_invitations_future_poll");

  late final _invitationsManagerRoomInvitationsFuturePoll =
      _invitationsManagerRoomInvitationsFuturePollPtr.asFunction<
          _InvitationsManagerRoomInvitationsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _invitationsManagerObjectInvitationsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _InvitationsManagerObjectInvitationsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__InvitationsManager_object_invitations_future_poll");

  late final _invitationsManagerObjectInvitationsFuturePoll =
      _invitationsManagerObjectInvitationsFuturePollPtr.asFunction<
          _InvitationsManagerObjectInvitationsFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _clientRestoreTokenFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientRestoreTokenFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_restore_token_future_poll");

  late final _clientRestoreTokenFuturePoll =
      _clientRestoreTokenFuturePollPtr.asFunction<
          _ClientRestoreTokenFuturePollReturn Function(int, int, int)>();
  late final _clientRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_room_future_poll");

  late final _clientRoomFuturePoll = _clientRoomFuturePollPtr
      .asFunction<_ClientRoomFuturePollReturn Function(int, int, int)>();
  late final _clientConvoFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientConvoFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_convo_future_poll");

  late final _clientConvoFuturePoll = _clientConvoFuturePollPtr
      .asFunction<_ClientConvoFuturePollReturn Function(int, int, int)>();
  late final _clientHasConvoFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientHasConvoFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_has_convo_future_poll");

  late final _clientHasConvoFuturePoll = _clientHasConvoFuturePollPtr
      .asFunction<_ClientHasConvoFuturePollReturn Function(int, int, int)>();
  late final _clientConvoWithRetryFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientConvoWithRetryFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_convo_with_retry_future_poll");

  late final _clientConvoWithRetryFuturePoll =
      _clientConvoWithRetryFuturePollPtr.asFunction<
          _ClientConvoWithRetryFuturePollReturn Function(int, int, int)>();
  late final _clientUploadMediaFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientUploadMediaFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_upload_media_future_poll");

  late final _clientUploadMediaFuturePoll = _clientUploadMediaFuturePollPtr
      .asFunction<_ClientUploadMediaFuturePollReturn Function(int, int, int)>();
  late final _clientSpacesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSpacesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_spaces_future_poll");

  late final _clientSpacesFuturePoll = _clientSpacesFuturePollPtr
      .asFunction<_ClientSpacesFuturePollReturn Function(int, int, int)>();
  late final _clientJoinRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientJoinRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_join_room_future_poll");

  late final _clientJoinRoomFuturePoll = _clientJoinRoomFuturePollPtr
      .asFunction<_ClientJoinRoomFuturePollReturn Function(int, int, int)>();
  late final _clientSpaceFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSpaceFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_space_future_poll");

  late final _clientSpaceFuturePoll = _clientSpaceFuturePollPtr
      .asFunction<_ClientSpaceFuturePollReturn Function(int, int, int)>();
  late final _clientSuggestedUsersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSuggestedUsersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_suggested_users_future_poll");

  late final _clientSuggestedUsersFuturePoll =
      _clientSuggestedUsersFuturePollPtr.asFunction<
          _ClientSuggestedUsersFuturePollReturn Function(int, int, int)>();
  late final _clientSearchUsersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSearchUsersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_search_users_future_poll");

  late final _clientSearchUsersFuturePoll = _clientSearchUsersFuturePollPtr
      .asFunction<_ClientSearchUsersFuturePollReturn Function(int, int, int)>();
  late final _clientSearchPublicRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSearchPublicRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_search_public_room_future_poll");

  late final _clientSearchPublicRoomFuturePoll =
      _clientSearchPublicRoomFuturePollPtr.asFunction<
          _ClientSearchPublicRoomFuturePollReturn Function(int, int, int)>();
  late final _clientVerifiedDeviceFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientVerifiedDeviceFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_verified_device_future_poll");

  late final _clientVerifiedDeviceFuturePoll =
      _clientVerifiedDeviceFuturePollPtr.asFunction<
          _ClientVerifiedDeviceFuturePollReturn Function(int, int, int)>();
  late final _clientLogoutFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientLogoutFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_logout_future_poll");

  late final _clientLogoutFuturePoll = _clientLogoutFuturePollPtr
      .asFunction<_ClientLogoutFuturePollReturn Function(int, int, int)>();
  late final _clientRequestVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientRequestVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_request_verification_future_poll");

  late final _clientRequestVerificationFuturePoll =
      _clientRequestVerificationFuturePollPtr.asFunction<
          _ClientRequestVerificationFuturePollReturn Function(int, int, int)>();
  late final _clientInstallRequestEventHandlerFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientInstallRequestEventHandlerFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_install_request_event_handler_future_poll");

  late final _clientInstallRequestEventHandlerFuturePoll =
      _clientInstallRequestEventHandlerFuturePollPtr.asFunction<
          _ClientInstallRequestEventHandlerFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _clientInstallSasEventHandlerFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientInstallSasEventHandlerFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_install_sas_event_handler_future_poll");

  late final _clientInstallSasEventHandlerFuturePoll =
      _clientInstallSasEventHandlerFuturePollPtr.asFunction<
          _ClientInstallSasEventHandlerFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _clientCreateConvoFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientCreateConvoFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_create_convo_future_poll");

  late final _clientCreateConvoFuturePoll = _clientCreateConvoFuturePollPtr
      .asFunction<_ClientCreateConvoFuturePollReturn Function(int, int, int)>();
  late final _clientCreateActerSpaceFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientCreateActerSpaceFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_create_acter_space_future_poll");

  late final _clientCreateActerSpaceFuturePoll =
      _clientCreateActerSpaceFuturePollPtr.asFunction<
          _ClientCreateActerSpaceFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForRoomFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForRoomFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_room_future_poll");

  late final _clientWaitForRoomFuturePoll = _clientWaitForRoomFuturePollPtr
      .asFunction<_ClientWaitForRoomFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForCommentFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForCommentFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_comment_future_poll");

  late final _clientWaitForCommentFuturePoll =
      _clientWaitForCommentFuturePollPtr.asFunction<
          _ClientWaitForCommentFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForNewsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForNewsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_news_future_poll");

  late final _clientWaitForNewsFuturePoll = _clientWaitForNewsFuturePollPtr
      .asFunction<_ClientWaitForNewsFuturePollReturn Function(int, int, int)>();
  late final _clientLatestNewsEntriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientLatestNewsEntriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_latest_news_entries_future_poll");

  late final _clientLatestNewsEntriesFuturePoll =
      _clientLatestNewsEntriesFuturePollPtr.asFunction<
          _ClientLatestNewsEntriesFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForStoryFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForStoryFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_story_future_poll");

  late final _clientWaitForStoryFuturePoll =
      _clientWaitForStoryFuturePollPtr.asFunction<
          _ClientWaitForStoryFuturePollReturn Function(int, int, int)>();
  late final _clientLatestStoriesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientLatestStoriesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_latest_stories_future_poll");

  late final _clientLatestStoriesFuturePoll =
      _clientLatestStoriesFuturePollPtr.asFunction<
          _ClientLatestStoriesFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForPinFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForPinFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_pin_future_poll");

  late final _clientWaitForPinFuturePoll = _clientWaitForPinFuturePollPtr
      .asFunction<_ClientWaitForPinFuturePollReturn Function(int, int, int)>();
  late final _clientPinsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientPinsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_pins_future_poll");

  late final _clientPinsFuturePoll = _clientPinsFuturePollPtr
      .asFunction<_ClientPinsFuturePollReturn Function(int, int, int)>();
  late final _clientPinFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientPinFuturePollReturn Function(
              ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>("__Client_pin_future_poll");

  late final _clientPinFuturePoll = _clientPinFuturePollPtr
      .asFunction<_ClientPinFuturePollReturn Function(int, int, int)>();
  late final _clientTaskListFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientTaskListFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_task_list_future_poll");

  late final _clientTaskListFuturePoll = _clientTaskListFuturePollPtr
      .asFunction<_ClientTaskListFuturePollReturn Function(int, int, int)>();
  late final _clientTaskListsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientTaskListsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_task_lists_future_poll");

  late final _clientTaskListsFuturePoll = _clientTaskListsFuturePollPtr
      .asFunction<_ClientTaskListsFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForTaskFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForTaskFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_task_future_poll");

  late final _clientWaitForTaskFuturePoll = _clientWaitForTaskFuturePollPtr
      .asFunction<_ClientWaitForTaskFuturePollReturn Function(int, int, int)>();
  late final _clientMyOpenTasksFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientMyOpenTasksFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_my_open_tasks_future_poll");

  late final _clientMyOpenTasksFuturePoll = _clientMyOpenTasksFuturePollPtr
      .asFunction<_ClientMyOpenTasksFuturePollReturn Function(int, int, int)>();
  late final _clientCalendarEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientCalendarEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_calendar_events_future_poll");

  late final _clientCalendarEventsFuturePoll =
      _clientCalendarEventsFuturePollPtr.asFunction<
          _ClientCalendarEventsFuturePollReturn Function(int, int, int)>();
  late final _clientCalendarEventFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientCalendarEventFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_calendar_event_future_poll");

  late final _clientCalendarEventFuturePoll =
      _clientCalendarEventFuturePollPtr.asFunction<
          _ClientCalendarEventFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForCalendarEventFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForCalendarEventFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_calendar_event_future_poll");

  late final _clientWaitForCalendarEventFuturePoll =
      _clientWaitForCalendarEventFuturePollPtr.asFunction<
          _ClientWaitForCalendarEventFuturePollReturn Function(
              int, int, int)>();
  late final _clientWaitForReactionFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForReactionFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_reaction_future_poll");

  late final _clientWaitForReactionFuturePoll =
      _clientWaitForReactionFuturePollPtr.asFunction<
          _ClientWaitForReactionFuturePollReturn Function(int, int, int)>();
  late final _clientWaitForRsvpFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientWaitForRsvpFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_wait_for_rsvp_future_poll");

  late final _clientWaitForRsvpFuturePoll = _clientWaitForRsvpFuturePollPtr
      .asFunction<_ClientWaitForRsvpFuturePollReturn Function(int, int, int)>();
  late final _clientInstallDefaultActerPushRulesFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientInstallDefaultActerPushRulesFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_install_default_acter_push_rules_future_poll");

  late final _clientInstallDefaultActerPushRulesFuturePoll =
      _clientInstallDefaultActerPushRulesFuturePollPtr.asFunction<
          _ClientInstallDefaultActerPushRulesFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _clientPushersFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientPushersFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_pushers_future_poll");

  late final _clientPushersFuturePoll = _clientPushersFuturePollPtr
      .asFunction<_ClientPushersFuturePollReturn Function(int, int, int)>();
  late final _clientAddPusherFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientAddPusherFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_add_pusher_future_poll");

  late final _clientAddPusherFuturePoll = _clientAddPusherFuturePollPtr
      .asFunction<_ClientAddPusherFuturePollReturn Function(int, int, int)>();
  late final _clientAddEmailPusherFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientAddEmailPusherFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_add_email_pusher_future_poll");

  late final _clientAddEmailPusherFuturePoll =
      _clientAddEmailPusherFuturePollPtr.asFunction<
          _ClientAddEmailPusherFuturePollReturn Function(int, int, int)>();
  late final _clientGetNotificationItemFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientGetNotificationItemFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_get_notification_item_future_poll");

  late final _clientGetNotificationItemFuturePoll =
      _clientGetNotificationItemFuturePollPtr.asFunction<
          _ClientGetNotificationItemFuturePollReturn Function(int, int, int)>();
  late final _clientAllUpcomingEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientAllUpcomingEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_all_upcoming_events_future_poll");

  late final _clientAllUpcomingEventsFuturePoll =
      _clientAllUpcomingEventsFuturePollPtr.asFunction<
          _ClientAllUpcomingEventsFuturePollReturn Function(int, int, int)>();
  late final _clientMyUpcomingEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientMyUpcomingEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_my_upcoming_events_future_poll");

  late final _clientMyUpcomingEventsFuturePoll =
      _clientMyUpcomingEventsFuturePollPtr.asFunction<
          _ClientMyUpcomingEventsFuturePollReturn Function(int, int, int)>();
  late final _clientMyPastEventsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientMyPastEventsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_my_past_events_future_poll");

  late final _clientMyPastEventsFuturePoll =
      _clientMyPastEventsFuturePollPtr.asFunction<
          _ClientMyPastEventsFuturePollReturn Function(int, int, int)>();
  late final _clientNotificationSettingsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientNotificationSettingsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_notification_settings_future_poll");

  late final _clientNotificationSettingsFuturePoll =
      _clientNotificationSettingsFuturePollPtr.asFunction<
          _ClientNotificationSettingsFuturePollReturn Function(
              int, int, int)>();
  late final _clientDeviceRecordsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientDeviceRecordsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_device_records_future_poll");

  late final _clientDeviceRecordsFuturePoll =
      _clientDeviceRecordsFuturePollPtr.asFunction<
          _ClientDeviceRecordsFuturePollReturn Function(int, int, int)>();
  late final _clientRoomPreviewFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientRoomPreviewFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_room_preview_future_poll");

  late final _clientRoomPreviewFuturePoll = _clientRoomPreviewFuturePollPtr
      .asFunction<_ClientRoomPreviewFuturePollReturn Function(int, int, int)>();
  late final _clientActivityFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientActivityFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_activity_future_poll");

  late final _clientActivityFuturePoll = _clientActivityFuturePollPtr
      .asFunction<_ClientActivityFuturePollReturn Function(int, int, int)>();
  late final _clientUrlPreviewFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _ClientUrlPreviewFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__Client_url_preview_future_poll");

  late final _clientUrlPreviewFuturePoll = _clientUrlPreviewFuturePollPtr
      .asFunction<_ClientUrlPreviewFuturePollReturn Function(int, int, int)>();
  late final _notificationSettingsDefaultNotificationModeFuturePollPtr =
      _lookup<
              ffi.NativeFunction<
                  _NotificationSettingsDefaultNotificationModeFuturePollReturn
                      Function(
                    ffi.IntPtr,
                    ffi.IntPtr,
                    ffi.Int64,
                  )>>(
          "__NotificationSettings_default_notification_mode_future_poll");

  late final _notificationSettingsDefaultNotificationModeFuturePoll =
      _notificationSettingsDefaultNotificationModeFuturePollPtr.asFunction<
          _NotificationSettingsDefaultNotificationModeFuturePollReturn Function(
              int, int, int)>();
  late final _notificationSettingsSetDefaultNotificationModeFuturePollPtr =
      _lookup<
              ffi.NativeFunction<
                  _NotificationSettingsSetDefaultNotificationModeFuturePollReturn
                      Function(ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>(
          "__NotificationSettings_set_default_notification_mode_future_poll");

  late final _notificationSettingsSetDefaultNotificationModeFuturePoll =
      _notificationSettingsSetDefaultNotificationModeFuturePollPtr.asFunction<
          _NotificationSettingsSetDefaultNotificationModeFuturePollReturn
              Function(int, int, int)>();
  late final _notificationSettingsGlobalContentSettingFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSettingsGlobalContentSettingFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationSettings_global_content_setting_future_poll");

  late final _notificationSettingsGlobalContentSettingFuturePoll =
      _notificationSettingsGlobalContentSettingFuturePollPtr.asFunction<
          _NotificationSettingsGlobalContentSettingFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _notificationSettingsSetGlobalContentSettingFuturePollPtr =
      _lookup<
              ffi.NativeFunction<
                  _NotificationSettingsSetGlobalContentSettingFuturePollReturn
                      Function(
                    ffi.IntPtr,
                    ffi.IntPtr,
                    ffi.Int64,
                  )>>(
          "__NotificationSettings_set_global_content_setting_future_poll");

  late final _notificationSettingsSetGlobalContentSettingFuturePoll =
      _notificationSettingsSetGlobalContentSettingFuturePollPtr.asFunction<
          _NotificationSettingsSetGlobalContentSettingFuturePollReturn Function(
              int, int, int)>();
  late final _notificationSettingsObjectPushSubscriptionStatusStrFuturePollPtr =
      _lookup<
          ffi.NativeFunction<
              _NotificationSettingsObjectPushSubscriptionStatusStrFuturePollReturn
                  Function(ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>(
    "__NotificationSettings_object_push_subscription_status_str_future_poll",
  );

  late final _notificationSettingsObjectPushSubscriptionStatusStrFuturePoll =
      _notificationSettingsObjectPushSubscriptionStatusStrFuturePollPtr
          .asFunction<
              _NotificationSettingsObjectPushSubscriptionStatusStrFuturePollReturn
                  Function(int, int, int)>();
  late final _notificationSettingsSubscribeObjectPushFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSettingsSubscribeObjectPushFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationSettings_subscribe_object_push_future_poll");

  late final _notificationSettingsSubscribeObjectPushFuturePoll =
      _notificationSettingsSubscribeObjectPushFuturePollPtr.asFunction<
          _NotificationSettingsSubscribeObjectPushFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _notificationSettingsUnsubscribeObjectPushFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSettingsUnsubscribeObjectPushFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__NotificationSettings_unsubscribe_object_push_future_poll");

  late final _notificationSettingsUnsubscribeObjectPushFuturePoll =
      _notificationSettingsUnsubscribeObjectPushFuturePollPtr.asFunction<
          _NotificationSettingsUnsubscribeObjectPushFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _roomInvitationAcceptFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomInvitationAcceptFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RoomInvitation_accept_future_poll");

  late final _roomInvitationAcceptFuturePoll =
      _roomInvitationAcceptFuturePollPtr.asFunction<
          _RoomInvitationAcceptFuturePollReturn Function(int, int, int)>();
  late final _roomInvitationRejectFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _RoomInvitationRejectFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__RoomInvitation_reject_future_poll");

  late final _roomInvitationRejectFuturePoll =
      _roomInvitationRejectFuturePollPtr.asFunction<
          _RoomInvitationRejectFuturePollReturn Function(int, int, int)>();
  late final _superInvitesTokensFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SuperInvitesTokensFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SuperInvites_tokens_future_poll");

  late final _superInvitesTokensFuturePoll =
      _superInvitesTokensFuturePollPtr.asFunction<
          _SuperInvitesTokensFuturePollReturn Function(int, int, int)>();
  late final _superInvitesCreateOrUpdateTokenFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SuperInvitesCreateOrUpdateTokenFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SuperInvites_create_or_update_token_future_poll");

  late final _superInvitesCreateOrUpdateTokenFuturePoll =
      _superInvitesCreateOrUpdateTokenFuturePollPtr.asFunction<
          _SuperInvitesCreateOrUpdateTokenFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _superInvitesDeleteFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SuperInvitesDeleteFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SuperInvites_delete_future_poll");

  late final _superInvitesDeleteFuturePoll =
      _superInvitesDeleteFuturePollPtr.asFunction<
          _SuperInvitesDeleteFuturePollReturn Function(int, int, int)>();
  late final _superInvitesRedeemFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SuperInvitesRedeemFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SuperInvites_redeem_future_poll");

  late final _superInvitesRedeemFuturePoll =
      _superInvitesRedeemFuturePollPtr.asFunction<
          _SuperInvitesRedeemFuturePollReturn Function(int, int, int)>();
  late final _superInvitesInfoFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SuperInvitesInfoFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SuperInvites_info_future_poll");

  late final _superInvitesInfoFuturePoll = _superInvitesInfoFuturePollPtr
      .asFunction<_SuperInvitesInfoFuturePollReturn Function(int, int, int)>();
  late final _verificationEventGetEmojisFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventGetEmojisFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_get_emojis_future_poll");

  late final _verificationEventGetEmojisFuturePoll =
      _verificationEventGetEmojisFuturePollPtr.asFunction<
          _VerificationEventGetEmojisFuturePollReturn Function(
              int, int, int)>();
  late final _verificationEventAcceptVerificationRequestFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventAcceptVerificationRequestFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_accept_verification_request_future_poll");

  late final _verificationEventAcceptVerificationRequestFuturePoll =
      _verificationEventAcceptVerificationRequestFuturePollPtr.asFunction<
          _VerificationEventAcceptVerificationRequestFuturePollReturn Function(
              int, int, int)>();
  late final _verificationEventCancelVerificationRequestFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventCancelVerificationRequestFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_cancel_verification_request_future_poll");

  late final _verificationEventCancelVerificationRequestFuturePoll =
      _verificationEventCancelVerificationRequestFuturePollPtr.asFunction<
          _VerificationEventCancelVerificationRequestFuturePollReturn Function(
              int, int, int)>();
  late final _verificationEventAcceptVerificationRequestWithMethodFuturePollPtr =
      _lookup<
          ffi.NativeFunction<
              _VerificationEventAcceptVerificationRequestWithMethodFuturePollReturn
                  Function(ffi.IntPtr, ffi.IntPtr, ffi.Int64)>>(
    "__VerificationEvent_accept_verification_request_with_method_future_poll",
  );

  late final _verificationEventAcceptVerificationRequestWithMethodFuturePoll =
      _verificationEventAcceptVerificationRequestWithMethodFuturePollPtr
          .asFunction<
              _VerificationEventAcceptVerificationRequestWithMethodFuturePollReturn
                  Function(int, int, int)>();
  late final _verificationEventStartSasVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventStartSasVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_start_sas_verification_future_poll");

  late final _verificationEventStartSasVerificationFuturePoll =
      _verificationEventStartSasVerificationFuturePollPtr.asFunction<
          _VerificationEventStartSasVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _verificationEventAcceptSasVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventAcceptSasVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_accept_sas_verification_future_poll");

  late final _verificationEventAcceptSasVerificationFuturePoll =
      _verificationEventAcceptSasVerificationFuturePollPtr.asFunction<
          _VerificationEventAcceptSasVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _verificationEventCancelSasVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventCancelSasVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_cancel_sas_verification_future_poll");

  late final _verificationEventCancelSasVerificationFuturePoll =
      _verificationEventCancelSasVerificationFuturePollPtr.asFunction<
          _VerificationEventCancelSasVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _verificationEventConfirmSasVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventConfirmSasVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_confirm_sas_verification_future_poll");

  late final _verificationEventConfirmSasVerificationFuturePoll =
      _verificationEventConfirmSasVerificationFuturePollPtr.asFunction<
          _VerificationEventConfirmSasVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _verificationEventMismatchSasVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _VerificationEventMismatchSasVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__VerificationEvent_mismatch_sas_verification_future_poll");

  late final _verificationEventMismatchSasVerificationFuturePoll =
      _verificationEventMismatchSasVerificationFuturePollPtr.asFunction<
          _VerificationEventMismatchSasVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _sessionManagerAllSessionsFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SessionManagerAllSessionsFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SessionManager_all_sessions_future_poll");

  late final _sessionManagerAllSessionsFuturePoll =
      _sessionManagerAllSessionsFuturePollPtr.asFunction<
          _SessionManagerAllSessionsFuturePollReturn Function(int, int, int)>();
  late final _sessionManagerDeleteDeviceFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SessionManagerDeleteDeviceFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SessionManager_delete_device_future_poll");

  late final _sessionManagerDeleteDeviceFuturePoll =
      _sessionManagerDeleteDeviceFuturePollPtr.asFunction<
          _SessionManagerDeleteDeviceFuturePollReturn Function(
              int, int, int)>();
  late final _sessionManagerRequestVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SessionManagerRequestVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SessionManager_request_verification_future_poll");

  late final _sessionManagerRequestVerificationFuturePoll =
      _sessionManagerRequestVerificationFuturePollPtr.asFunction<
          _SessionManagerRequestVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _sessionManagerTerminateVerificationFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _SessionManagerTerminateVerificationFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__SessionManager_terminate_verification_future_poll");

  late final _sessionManagerTerminateVerificationFuturePoll =
      _sessionManagerTerminateVerificationFuturePollPtr.asFunction<
          _SessionManagerTerminateVerificationFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _backupManagerEnableFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerEnableFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_enable_future_poll");

  late final _backupManagerEnableFuturePoll =
      _backupManagerEnableFuturePollPtr.asFunction<
          _BackupManagerEnableFuturePollReturn Function(int, int, int)>();
  late final _backupManagerResetKeyFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerResetKeyFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_reset_key_future_poll");

  late final _backupManagerResetKeyFuturePoll =
      _backupManagerResetKeyFuturePollPtr.asFunction<
          _BackupManagerResetKeyFuturePollReturn Function(int, int, int)>();
  late final _backupManagerResetIdentityFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerResetIdentityFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_reset_identity_future_poll");

  late final _backupManagerResetIdentityFuturePoll =
      _backupManagerResetIdentityFuturePollPtr.asFunction<
          _BackupManagerResetIdentityFuturePollReturn Function(
              int, int, int)>();
  late final _backupManagerDisableFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerDisableFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_disable_future_poll");

  late final _backupManagerDisableFuturePoll =
      _backupManagerDisableFuturePollPtr.asFunction<
          _BackupManagerDisableFuturePollReturn Function(int, int, int)>();
  late final _backupManagerRecoverFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerRecoverFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_recover_future_poll");

  late final _backupManagerRecoverFuturePoll =
      _backupManagerRecoverFuturePollPtr.asFunction<
          _BackupManagerRecoverFuturePollReturn Function(int, int, int)>();
  late final _backupManagerStoredEncKeyFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerStoredEncKeyFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_stored_enc_key_future_poll");

  late final _backupManagerStoredEncKeyFuturePoll =
      _backupManagerStoredEncKeyFuturePollPtr.asFunction<
          _BackupManagerStoredEncKeyFuturePollReturn Function(int, int, int)>();
  late final _backupManagerStoredEncKeyWhenFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerStoredEncKeyWhenFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_stored_enc_key_when_future_poll");

  late final _backupManagerStoredEncKeyWhenFuturePoll =
      _backupManagerStoredEncKeyWhenFuturePollPtr.asFunction<
          _BackupManagerStoredEncKeyWhenFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _backupManagerDestroyStoredEncKeyFuturePollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerDestroyStoredEncKeyFuturePollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
          )>>("__BackupManager_destroy_stored_enc_key_future_poll");

  late final _backupManagerDestroyStoredEncKeyFuturePoll =
      _backupManagerDestroyStoredEncKeyFuturePollPtr.asFunction<
          _BackupManagerDestroyStoredEncKeyFuturePollReturn Function(
            int,
            int,
            int,
          )>();
  late final _acterPinSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ActerPinSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__ActerPin_subscribe_stream_stream_poll");

  late final _acterPinSubscribeStreamStreamPoll =
      _acterPinSubscribeStreamStreamPollPtr.asFunction<
          _ActerPinSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _rsvpManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _RsvpManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__RsvpManager_subscribe_stream_stream_poll");

  late final _rsvpManagerSubscribeStreamStreamPoll =
      _rsvpManagerSubscribeStreamStreamPollPtr.asFunction<
          _RsvpManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _reactionManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ReactionManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__ReactionManager_subscribe_stream_stream_poll");

  late final _reactionManagerSubscribeStreamStreamPoll =
      _reactionManagerSubscribeStreamStreamPollPtr.asFunction<
          _ReactionManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _readReceiptsManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ReadReceiptsManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__ReadReceiptsManager_subscribe_stream_stream_poll");

  late final _readReceiptsManagerSubscribeStreamStreamPoll =
      _readReceiptsManagerSubscribeStreamStreamPollPtr.asFunction<
          _ReadReceiptsManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _roomSubscribeToUpdatesStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _RoomSubscribeToUpdatesStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Room_subscribe_to_updates_stream_poll");

  late final _roomSubscribeToUpdatesStreamPoll =
      _roomSubscribeToUpdatesStreamPollPtr.asFunction<
          _RoomSubscribeToUpdatesStreamPollReturn Function(
              int, int, int, int)>();
  late final _userRoomSettingsSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _UserRoomSettingsSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__UserRoomSettings_subscribe_stream_stream_poll");

  late final _userRoomSettingsSubscribeStreamStreamPoll =
      _userRoomSettingsSubscribeStreamStreamPollPtr.asFunction<
          _UserRoomSettingsSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _timelineStreamMessagesStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _TimelineStreamMessagesStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__TimelineStream_messages_stream_stream_poll");

  late final _timelineStreamMessagesStreamStreamPoll =
      _timelineStreamMessagesStreamStreamPollPtr.asFunction<
          _TimelineStreamMessagesStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _commentsManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _CommentsManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__CommentsManager_subscribe_stream_stream_poll");

  late final _commentsManagerSubscribeStreamStreamPoll =
      _commentsManagerSubscribeStreamStreamPollPtr.asFunction<
          _CommentsManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _objectInvitationsManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ObjectInvitationsManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__ObjectInvitationsManager_subscribe_stream_stream_poll");

  late final _objectInvitationsManagerSubscribeStreamStreamPoll =
      _objectInvitationsManagerSubscribeStreamStreamPollPtr.asFunction<
          _ObjectInvitationsManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _attachmentsManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _AttachmentsManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__AttachmentsManager_subscribe_stream_stream_poll");

  late final _attachmentsManagerSubscribeStreamStreamPoll =
      _attachmentsManagerSubscribeStreamStreamPollPtr.asFunction<
          _AttachmentsManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _taskSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _TaskSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Task_subscribe_stream_stream_poll");

  late final _taskSubscribeStreamStreamPoll =
      _taskSubscribeStreamStreamPollPtr.asFunction<
          _TaskSubscribeStreamStreamPollReturn Function(int, int, int, int)>();
  late final _taskListSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _TaskListSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__TaskList_subscribe_stream_stream_poll");

  late final _taskListSubscribeStreamStreamPoll =
      _taskListSubscribeStreamStreamPollPtr.asFunction<
          _TaskListSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _activitiesSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ActivitiesSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Activities_subscribe_stream_stream_poll");

  late final _activitiesSubscribeStreamStreamPoll =
      _activitiesSubscribeStreamStreamPollPtr.asFunction<
          _ActivitiesSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _accountSubscribeAppSettingsStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _AccountSubscribeAppSettingsStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Account_subscribe_app_settings_stream_stream_poll");

  late final _accountSubscribeAppSettingsStreamStreamPoll =
      _accountSubscribeAppSettingsStreamStreamPollPtr.asFunction<
          _AccountSubscribeAppSettingsStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _syncStateFirstSyncedRxStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _SyncStateFirstSyncedRxStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__SyncState_first_synced_rx_stream_poll");

  late final _syncStateFirstSyncedRxStreamPoll =
      _syncStateFirstSyncedRxStreamPollPtr.asFunction<
          _SyncStateFirstSyncedRxStreamPollReturn Function(
              int, int, int, int)>();
  late final _syncStateSyncErrorRxStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _SyncStateSyncErrorRxStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__SyncState_sync_error_rx_stream_poll");

  late final _syncStateSyncErrorRxStreamPoll =
      _syncStateSyncErrorRxStreamPollPtr.asFunction<
          _SyncStateSyncErrorRxStreamPollReturn Function(int, int, int, int)>();
  late final _invitationsManagerSubscribeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _InvitationsManagerSubscribeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__InvitationsManager_subscribe_stream_stream_poll");

  late final _invitationsManagerSubscribeStreamStreamPoll =
      _invitationsManagerSubscribeStreamStreamPollPtr.asFunction<
          _InvitationsManagerSubscribeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientConvosStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientConvosStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_convos_stream_stream_poll");

  late final _clientConvosStreamStreamPoll =
      _clientConvosStreamStreamPollPtr.asFunction<
          _ClientConvosStreamStreamPollReturn Function(int, int, int, int)>();
  late final _clientSpacesStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSpacesStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_spaces_stream_stream_poll");

  late final _clientSpacesStreamStreamPoll =
      _clientSpacesStreamStreamPollPtr.asFunction<
          _ClientSpacesStreamStreamPollReturn Function(int, int, int, int)>();
  late final _clientVerificationEventRxStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientVerificationEventRxStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_verification_event_rx_stream_poll");

  late final _clientVerificationEventRxStreamPoll =
      _clientVerificationEventRxStreamPollPtr.asFunction<
          _ClientVerificationEventRxStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientDeviceEventRxStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientDeviceEventRxStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_device_event_rx_stream_poll");

  late final _clientDeviceEventRxStreamPoll =
      _clientDeviceEventRxStreamPollPtr.asFunction<
          _ClientDeviceEventRxStreamPollReturn Function(int, int, int, int)>();
  late final _clientSubscribeToTypingEventStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeToTypingEventStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_to_typing_event_stream_stream_poll");

  late final _clientSubscribeToTypingEventStreamStreamPoll =
      _clientSubscribeToTypingEventStreamStreamPollPtr.asFunction<
          _ClientSubscribeToTypingEventStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeSectionStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeSectionStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_section_stream_stream_poll");

  late final _clientSubscribeSectionStreamStreamPoll =
      _clientSubscribeSectionStreamStreamPollPtr.asFunction<
          _ClientSubscribeSectionStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeModelStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_model_stream_stream_poll");

  late final _clientSubscribeModelStreamStreamPoll =
      _clientSubscribeModelStreamStreamPollPtr.asFunction<
          _ClientSubscribeModelStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeModelObjectsStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelObjectsStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_model_objects_stream_stream_poll");

  late final _clientSubscribeModelObjectsStreamStreamPoll =
      _clientSubscribeModelObjectsStreamStreamPollPtr.asFunction<
          _ClientSubscribeModelObjectsStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeModelParamStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeModelParamStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_model_param_stream_stream_poll");

  late final _clientSubscribeModelParamStreamStreamPoll =
      _clientSubscribeModelParamStreamStreamPollPtr.asFunction<
          _ClientSubscribeModelParamStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_room_stream_stream_poll");

  late final _clientSubscribeRoomStreamStreamPoll =
      _clientSubscribeRoomStreamStreamPollPtr.asFunction<
          _ClientSubscribeRoomStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomParamStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomParamStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_room_param_stream_stream_poll");

  late final _clientSubscribeRoomParamStreamStreamPoll =
      _clientSubscribeRoomParamStreamStreamPollPtr.asFunction<
          _ClientSubscribeRoomParamStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomSectionStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomSectionStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_room_section_stream_stream_poll");

  late final _clientSubscribeRoomSectionStreamStreamPoll =
      _clientSubscribeRoomSectionStreamStreamPollPtr.asFunction<
          _ClientSubscribeRoomSectionStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeEventTypeStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeEventTypeStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_event_type_stream_stream_poll");

  late final _clientSubscribeEventTypeStreamStreamPoll =
      _clientSubscribeEventTypeStreamStreamPollPtr.asFunction<
          _ClientSubscribeEventTypeStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeAccountDataStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeAccountDataStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_account_data_stream_stream_poll");

  late final _clientSubscribeAccountDataStreamStreamPoll =
      _clientSubscribeAccountDataStreamStreamPollPtr.asFunction<
          _ClientSubscribeAccountDataStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeRoomAccountDataStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeRoomAccountDataStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_room_account_data_stream_stream_poll");

  late final _clientSubscribeRoomAccountDataStreamStreamPoll =
      _clientSubscribeRoomAccountDataStreamStreamPollPtr.asFunction<
          _ClientSubscribeRoomAccountDataStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _clientSubscribeMyOpenTasksStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _ClientSubscribeMyOpenTasksStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__Client_subscribe_my_open_tasks_stream_stream_poll");

  late final _clientSubscribeMyOpenTasksStreamStreamPoll =
      _clientSubscribeMyOpenTasksStreamStreamPollPtr.asFunction<
          _ClientSubscribeMyOpenTasksStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _notificationSettingsChangesStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _NotificationSettingsChangesStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__NotificationSettings_changes_stream_stream_poll");

  late final _notificationSettingsChangesStreamStreamPoll =
      _notificationSettingsChangesStreamStreamPollPtr.asFunction<
          _NotificationSettingsChangesStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  late final _backupManagerStateStreamStreamPollPtr = _lookup<
      ffi.NativeFunction<
          _BackupManagerStateStreamStreamPollReturn Function(
            ffi.IntPtr,
            ffi.IntPtr,
            ffi.Int64,
            ffi.Int64,
          )>>("__BackupManager_state_stream_stream_poll");

  late final _backupManagerStateStreamStreamPoll =
      _backupManagerStateStreamStreamPollPtr.asFunction<
          _BackupManagerStateStreamStreamPollReturn Function(
            int,
            int,
            int,
            int,
          )>();
  FfiListActerPin createFfiListActerPin() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListActerPinCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListActerPin");
    return FfiListActerPin._(this, list_box);
  }

  late final _ffiListActerPinCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListActerPinCreate",
  );

  late final _ffiListActerPinCreate =
      _ffiListActerPinCreatePtr.asFunction<int Function()>();

  late final _ffiListActerPinLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListActerPinLen",
  );

  late final _ffiListActerPinLen =
      _ffiListActerPinLenPtr.asFunction<int Function(int)>();

  late final _ffiListActerPinElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListActerPinElementAt",
  );

  late final _ffiListActerPinElementAt =
      _ffiListActerPinElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListActerPinRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListActerPinRemove",
  );

  late final _ffiListActerPinRemove =
      _ffiListActerPinRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListActerPinAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListActerPinAdd",
  );

  late final _ffiListActerPinAdd =
      _ffiListActerPinAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListActerPinInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListActerPinInsert");

  late final _ffiListActerPinInsert =
      _ffiListActerPinInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListAttachment createFfiListAttachment() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListAttachmentCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListAttachment");
    return FfiListAttachment._(this, list_box);
  }

  late final _ffiListAttachmentCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListAttachmentCreate",
  );

  late final _ffiListAttachmentCreate =
      _ffiListAttachmentCreatePtr.asFunction<int Function()>();

  late final _ffiListAttachmentLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListAttachmentLen",
  );

  late final _ffiListAttachmentLen =
      _ffiListAttachmentLenPtr.asFunction<int Function(int)>();

  late final _ffiListAttachmentElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListAttachmentElementAt",
  );

  late final _ffiListAttachmentElementAt =
      _ffiListAttachmentElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListAttachmentRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListAttachmentRemove",
  );

  late final _ffiListAttachmentRemove =
      _ffiListAttachmentRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListAttachmentAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListAttachmentAdd",
  );

  late final _ffiListAttachmentAdd =
      _ffiListAttachmentAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListAttachmentInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListAttachmentInsert");

  late final _ffiListAttachmentInsert =
      _ffiListAttachmentInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListCalendarEvent createFfiListCalendarEvent() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListCalendarEventCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListCalendarEvent");
    return FfiListCalendarEvent._(this, list_box);
  }

  late final _ffiListCalendarEventCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListCalendarEventCreate",
  );

  late final _ffiListCalendarEventCreate =
      _ffiListCalendarEventCreatePtr.asFunction<int Function()>();

  late final _ffiListCalendarEventLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListCalendarEventLen",
  );

  late final _ffiListCalendarEventLen =
      _ffiListCalendarEventLenPtr.asFunction<int Function(int)>();

  late final _ffiListCalendarEventElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCalendarEventElementAt",
  );

  late final _ffiListCalendarEventElementAt =
      _ffiListCalendarEventElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListCalendarEventRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCalendarEventRemove",
  );

  late final _ffiListCalendarEventRemove =
      _ffiListCalendarEventRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListCalendarEventAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListCalendarEventAdd",
  );

  late final _ffiListCalendarEventAdd =
      _ffiListCalendarEventAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListCalendarEventInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListCalendarEventInsert");

  late final _ffiListCalendarEventInsert =
      _ffiListCalendarEventInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListCategory createFfiListCategory() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListCategoryCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListCategory");
    return FfiListCategory._(this, list_box);
  }

  late final _ffiListCategoryCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListCategoryCreate",
  );

  late final _ffiListCategoryCreate =
      _ffiListCategoryCreatePtr.asFunction<int Function()>();

  late final _ffiListCategoryLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListCategoryLen",
  );

  late final _ffiListCategoryLen =
      _ffiListCategoryLenPtr.asFunction<int Function(int)>();

  late final _ffiListCategoryElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCategoryElementAt",
  );

  late final _ffiListCategoryElementAt =
      _ffiListCategoryElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListCategoryRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCategoryRemove",
  );

  late final _ffiListCategoryRemove =
      _ffiListCategoryRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListCategoryAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListCategoryAdd",
  );

  late final _ffiListCategoryAdd =
      _ffiListCategoryAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListCategoryInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListCategoryInsert");

  late final _ffiListCategoryInsert =
      _ffiListCategoryInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListComment createFfiListComment() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListCommentCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListComment");
    return FfiListComment._(this, list_box);
  }

  late final _ffiListCommentCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListCommentCreate",
  );

  late final _ffiListCommentCreate =
      _ffiListCommentCreatePtr.asFunction<int Function()>();

  late final _ffiListCommentLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListCommentLen",
  );

  late final _ffiListCommentLen =
      _ffiListCommentLenPtr.asFunction<int Function(int)>();

  late final _ffiListCommentElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCommentElementAt",
  );

  late final _ffiListCommentElementAt =
      _ffiListCommentElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListCommentRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListCommentRemove",
  );

  late final _ffiListCommentRemove =
      _ffiListCommentRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListCommentAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListCommentAdd",
  );

  late final _ffiListCommentAdd =
      _ffiListCommentAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListCommentInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListCommentInsert");

  late final _ffiListCommentInsert =
      _ffiListCommentInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListConvo createFfiListConvo() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListConvoCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListConvo");
    return FfiListConvo._(this, list_box);
  }

  late final _ffiListConvoCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListConvoCreate",
  );

  late final _ffiListConvoCreate =
      _ffiListConvoCreatePtr.asFunction<int Function()>();

  late final _ffiListConvoLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListConvoLen",
  );

  late final _ffiListConvoLen =
      _ffiListConvoLenPtr.asFunction<int Function(int)>();

  late final _ffiListConvoElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListConvoElementAt",
  );

  late final _ffiListConvoElementAt =
      _ffiListConvoElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListConvoRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListConvoRemove",
  );

  late final _ffiListConvoRemove =
      _ffiListConvoRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListConvoAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListConvoAdd",
  );

  late final _ffiListConvoAdd =
      _ffiListConvoAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListConvoInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListConvoInsert");

  late final _ffiListConvoInsert =
      _ffiListConvoInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListDeviceRecord createFfiListDeviceRecord() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListDeviceRecordCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListDeviceRecord");
    return FfiListDeviceRecord._(this, list_box);
  }

  late final _ffiListDeviceRecordCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListDeviceRecordCreate",
  );

  late final _ffiListDeviceRecordCreate =
      _ffiListDeviceRecordCreatePtr.asFunction<int Function()>();

  late final _ffiListDeviceRecordLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListDeviceRecordLen",
  );

  late final _ffiListDeviceRecordLen =
      _ffiListDeviceRecordLenPtr.asFunction<int Function(int)>();

  late final _ffiListDeviceRecordElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListDeviceRecordElementAt",
  );

  late final _ffiListDeviceRecordElementAt =
      _ffiListDeviceRecordElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListDeviceRecordRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListDeviceRecordRemove",
  );

  late final _ffiListDeviceRecordRemove =
      _ffiListDeviceRecordRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListDeviceRecordAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListDeviceRecordAdd",
  );

  late final _ffiListDeviceRecordAdd =
      _ffiListDeviceRecordAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListDeviceRecordInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListDeviceRecordInsert");

  late final _ffiListDeviceRecordInsert =
      _ffiListDeviceRecordInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListEventLocationInfo createFfiListEventLocationInfo() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListEventLocationInfoCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListEventLocationInfo");
    return FfiListEventLocationInfo._(this, list_box);
  }

  late final _ffiListEventLocationInfoCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListEventLocationInfoCreate",
  );

  late final _ffiListEventLocationInfoCreate =
      _ffiListEventLocationInfoCreatePtr.asFunction<int Function()>();

  late final _ffiListEventLocationInfoLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListEventLocationInfoLen",
  );

  late final _ffiListEventLocationInfoLen =
      _ffiListEventLocationInfoLenPtr.asFunction<int Function(int)>();

  late final _ffiListEventLocationInfoElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListEventLocationInfoElementAt",
  );

  late final _ffiListEventLocationInfoElementAt =
      _ffiListEventLocationInfoElementAtPtr
          .asFunction<int Function(int, int)>();

  late final _ffiListEventLocationInfoRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListEventLocationInfoRemove",
  );

  late final _ffiListEventLocationInfoRemove =
      _ffiListEventLocationInfoRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListEventLocationInfoAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListEventLocationInfoAdd",
  );

  late final _ffiListEventLocationInfoAdd =
      _ffiListEventLocationInfoAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListEventLocationInfoInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListEventLocationInfoInsert");

  late final _ffiListEventLocationInfoInsert =
      _ffiListEventLocationInfoInsertPtr
          .asFunction<void Function(int, int, int)>();
  FfiListExternalId createFfiListExternalId() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListExternalIdCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListExternalId");
    return FfiListExternalId._(this, list_box);
  }

  late final _ffiListExternalIdCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListExternalIdCreate",
  );

  late final _ffiListExternalIdCreate =
      _ffiListExternalIdCreatePtr.asFunction<int Function()>();

  late final _ffiListExternalIdLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListExternalIdLen",
  );

  late final _ffiListExternalIdLen =
      _ffiListExternalIdLenPtr.asFunction<int Function(int)>();

  late final _ffiListExternalIdElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListExternalIdElementAt",
  );

  late final _ffiListExternalIdElementAt =
      _ffiListExternalIdElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListExternalIdRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListExternalIdRemove",
  );

  late final _ffiListExternalIdRemove =
      _ffiListExternalIdRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListExternalIdAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListExternalIdAdd",
  );

  late final _ffiListExternalIdAdd =
      _ffiListExternalIdAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListExternalIdInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListExternalIdInsert");

  late final _ffiListExternalIdInsert =
      _ffiListExternalIdInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListFfiString createFfiListFfiString() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListFfiStringCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListFfiString");
    return FfiListFfiString._(this, list_box);
  }

  late final _ffiListFfiStringCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListFfiStringCreate",
  );

  late final _ffiListFfiStringCreate =
      _ffiListFfiStringCreatePtr.asFunction<int Function()>();

  late final _ffiListFfiStringLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListFfiStringLen",
  );

  late final _ffiListFfiStringLen =
      _ffiListFfiStringLenPtr.asFunction<int Function(int)>();

  late final _ffiListFfiStringElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListFfiStringElementAt",
  );

  late final _ffiListFfiStringElementAt =
      _ffiListFfiStringElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListFfiStringRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListFfiStringRemove",
  );

  late final _ffiListFfiStringRemove =
      _ffiListFfiStringRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListFfiStringAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListFfiStringAdd",
  );

  late final _ffiListFfiStringAdd =
      _ffiListFfiStringAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListFfiStringInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListFfiStringInsert");

  late final _ffiListFfiStringInsert =
      _ffiListFfiStringInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListMember createFfiListMember() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListMemberCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListMember");
    return FfiListMember._(this, list_box);
  }

  late final _ffiListMemberCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListMemberCreate",
  );

  late final _ffiListMemberCreate =
      _ffiListMemberCreatePtr.asFunction<int Function()>();

  late final _ffiListMemberLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListMemberLen",
  );

  late final _ffiListMemberLen =
      _ffiListMemberLenPtr.asFunction<int Function(int)>();

  late final _ffiListMemberElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListMemberElementAt",
  );

  late final _ffiListMemberElementAt =
      _ffiListMemberElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListMemberRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListMemberRemove",
  );

  late final _ffiListMemberRemove =
      _ffiListMemberRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListMemberAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListMemberAdd",
  );

  late final _ffiListMemberAdd =
      _ffiListMemberAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListMemberInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListMemberInsert");

  late final _ffiListMemberInsert =
      _ffiListMemberInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListNewsEntry createFfiListNewsEntry() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListNewsEntryCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListNewsEntry");
    return FfiListNewsEntry._(this, list_box);
  }

  late final _ffiListNewsEntryCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListNewsEntryCreate",
  );

  late final _ffiListNewsEntryCreate =
      _ffiListNewsEntryCreatePtr.asFunction<int Function()>();

  late final _ffiListNewsEntryLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListNewsEntryLen",
  );

  late final _ffiListNewsEntryLen =
      _ffiListNewsEntryLenPtr.asFunction<int Function(int)>();

  late final _ffiListNewsEntryElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsEntryElementAt",
  );

  late final _ffiListNewsEntryElementAt =
      _ffiListNewsEntryElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsEntryRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsEntryRemove",
  );

  late final _ffiListNewsEntryRemove =
      _ffiListNewsEntryRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsEntryAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListNewsEntryAdd",
  );

  late final _ffiListNewsEntryAdd =
      _ffiListNewsEntryAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListNewsEntryInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListNewsEntryInsert");

  late final _ffiListNewsEntryInsert =
      _ffiListNewsEntryInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListNewsSlide createFfiListNewsSlide() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListNewsSlideCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListNewsSlide");
    return FfiListNewsSlide._(this, list_box);
  }

  late final _ffiListNewsSlideCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListNewsSlideCreate",
  );

  late final _ffiListNewsSlideCreate =
      _ffiListNewsSlideCreatePtr.asFunction<int Function()>();

  late final _ffiListNewsSlideLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListNewsSlideLen",
  );

  late final _ffiListNewsSlideLen =
      _ffiListNewsSlideLenPtr.asFunction<int Function(int)>();

  late final _ffiListNewsSlideElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsSlideElementAt",
  );

  late final _ffiListNewsSlideElementAt =
      _ffiListNewsSlideElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsSlideRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsSlideRemove",
  );

  late final _ffiListNewsSlideRemove =
      _ffiListNewsSlideRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsSlideAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListNewsSlideAdd",
  );

  late final _ffiListNewsSlideAdd =
      _ffiListNewsSlideAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListNewsSlideInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListNewsSlideInsert");

  late final _ffiListNewsSlideInsert =
      _ffiListNewsSlideInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListNewsSlideDraft createFfiListNewsSlideDraft() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListNewsSlideDraftCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListNewsSlideDraft");
    return FfiListNewsSlideDraft._(this, list_box);
  }

  late final _ffiListNewsSlideDraftCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListNewsSlideDraftCreate",
  );

  late final _ffiListNewsSlideDraftCreate =
      _ffiListNewsSlideDraftCreatePtr.asFunction<int Function()>();

  late final _ffiListNewsSlideDraftLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListNewsSlideDraftLen",
  );

  late final _ffiListNewsSlideDraftLen =
      _ffiListNewsSlideDraftLenPtr.asFunction<int Function(int)>();

  late final _ffiListNewsSlideDraftElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsSlideDraftElementAt",
  );

  late final _ffiListNewsSlideDraftElementAt =
      _ffiListNewsSlideDraftElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsSlideDraftRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListNewsSlideDraftRemove",
  );

  late final _ffiListNewsSlideDraftRemove =
      _ffiListNewsSlideDraftRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListNewsSlideDraftAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListNewsSlideDraftAdd",
  );

  late final _ffiListNewsSlideDraftAdd =
      _ffiListNewsSlideDraftAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListNewsSlideDraftInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListNewsSlideDraftInsert");

  late final _ffiListNewsSlideDraftInsert = _ffiListNewsSlideDraftInsertPtr
      .asFunction<void Function(int, int, int)>();
  FfiListObjRef createFfiListObjRef() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListObjRefCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListObjRef");
    return FfiListObjRef._(this, list_box);
  }

  late final _ffiListObjRefCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListObjRefCreate",
  );

  late final _ffiListObjRefCreate =
      _ffiListObjRefCreatePtr.asFunction<int Function()>();

  late final _ffiListObjRefLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListObjRefLen",
  );

  late final _ffiListObjRefLen =
      _ffiListObjRefLenPtr.asFunction<int Function(int)>();

  late final _ffiListObjRefElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListObjRefElementAt",
  );

  late final _ffiListObjRefElementAt =
      _ffiListObjRefElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListObjRefRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListObjRefRemove",
  );

  late final _ffiListObjRefRemove =
      _ffiListObjRefRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListObjRefAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListObjRefAdd",
  );

  late final _ffiListObjRefAdd =
      _ffiListObjRefAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListObjRefInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListObjRefInsert");

  late final _ffiListObjRefInsert =
      _ffiListObjRefInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListPublicSearchResultItem createFfiListPublicSearchResultItem() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListPublicSearchResultItemCreate(),
    );
    final list_box = _Box(
      this,
      list_ptr,
      "drop_box_FfiListPublicSearchResultItem",
    );
    return FfiListPublicSearchResultItem._(this, list_box);
  }

  late final _ffiListPublicSearchResultItemCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListPublicSearchResultItemCreate",
  );

  late final _ffiListPublicSearchResultItemCreate =
      _ffiListPublicSearchResultItemCreatePtr.asFunction<int Function()>();

  late final _ffiListPublicSearchResultItemLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListPublicSearchResultItemLen",
  );

  late final _ffiListPublicSearchResultItemLen =
      _ffiListPublicSearchResultItemLenPtr.asFunction<int Function(int)>();

  late final _ffiListPublicSearchResultItemElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListPublicSearchResultItemElementAt",
  );

  late final _ffiListPublicSearchResultItemElementAt =
      _ffiListPublicSearchResultItemElementAtPtr
          .asFunction<int Function(int, int)>();

  late final _ffiListPublicSearchResultItemRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListPublicSearchResultItemRemove",
  );

  late final _ffiListPublicSearchResultItemRemove =
      _ffiListPublicSearchResultItemRemovePtr
          .asFunction<int Function(int, int)>();

  late final _ffiListPublicSearchResultItemAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListPublicSearchResultItemAdd",
  );

  late final _ffiListPublicSearchResultItemAdd =
      _ffiListPublicSearchResultItemAddPtr
          .asFunction<void Function(int, int)>();

  late final _ffiListPublicSearchResultItemInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListPublicSearchResultItemInsert");

  late final _ffiListPublicSearchResultItemInsert =
      _ffiListPublicSearchResultItemInsertPtr
          .asFunction<void Function(int, int, int)>();
  FfiListPusher createFfiListPusher() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListPusherCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListPusher");
    return FfiListPusher._(this, list_box);
  }

  late final _ffiListPusherCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListPusherCreate",
  );

  late final _ffiListPusherCreate =
      _ffiListPusherCreatePtr.asFunction<int Function()>();

  late final _ffiListPusherLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListPusherLen",
  );

  late final _ffiListPusherLen =
      _ffiListPusherLenPtr.asFunction<int Function(int)>();

  late final _ffiListPusherElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListPusherElementAt",
  );

  late final _ffiListPusherElementAt =
      _ffiListPusherElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListPusherRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListPusherRemove",
  );

  late final _ffiListPusherRemove =
      _ffiListPusherRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListPusherAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListPusherAdd",
  );

  late final _ffiListPusherAdd =
      _ffiListPusherAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListPusherInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListPusherInsert");

  late final _ffiListPusherInsert =
      _ffiListPusherInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListReaction createFfiListReaction() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListReactionCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListReaction");
    return FfiListReaction._(this, list_box);
  }

  late final _ffiListReactionCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListReactionCreate",
  );

  late final _ffiListReactionCreate =
      _ffiListReactionCreatePtr.asFunction<int Function()>();

  late final _ffiListReactionLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListReactionLen",
  );

  late final _ffiListReactionLen =
      _ffiListReactionLenPtr.asFunction<int Function(int)>();

  late final _ffiListReactionElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListReactionElementAt",
  );

  late final _ffiListReactionElementAt =
      _ffiListReactionElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListReactionRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListReactionRemove",
  );

  late final _ffiListReactionRemove =
      _ffiListReactionRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListReactionAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListReactionAdd",
  );

  late final _ffiListReactionAdd =
      _ffiListReactionAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListReactionInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListReactionInsert");

  late final _ffiListReactionInsert =
      _ffiListReactionInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListReactionRecord createFfiListReactionRecord() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListReactionRecordCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListReactionRecord");
    return FfiListReactionRecord._(this, list_box);
  }

  late final _ffiListReactionRecordCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListReactionRecordCreate",
  );

  late final _ffiListReactionRecordCreate =
      _ffiListReactionRecordCreatePtr.asFunction<int Function()>();

  late final _ffiListReactionRecordLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListReactionRecordLen",
  );

  late final _ffiListReactionRecordLen =
      _ffiListReactionRecordLenPtr.asFunction<int Function(int)>();

  late final _ffiListReactionRecordElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListReactionRecordElementAt",
  );

  late final _ffiListReactionRecordElementAt =
      _ffiListReactionRecordElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListReactionRecordRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListReactionRecordRemove",
  );

  late final _ffiListReactionRecordRemove =
      _ffiListReactionRecordRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListReactionRecordAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListReactionRecordAdd",
  );

  late final _ffiListReactionRecordAdd =
      _ffiListReactionRecordAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListReactionRecordInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListReactionRecordInsert");

  late final _ffiListReactionRecordInsert = _ffiListReactionRecordInsertPtr
      .asFunction<void Function(int, int, int)>();
  FfiListRoomInvitation createFfiListRoomInvitation() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListRoomInvitationCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListRoomInvitation");
    return FfiListRoomInvitation._(this, list_box);
  }

  late final _ffiListRoomInvitationCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListRoomInvitationCreate",
  );

  late final _ffiListRoomInvitationCreate =
      _ffiListRoomInvitationCreatePtr.asFunction<int Function()>();

  late final _ffiListRoomInvitationLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListRoomInvitationLen",
  );

  late final _ffiListRoomInvitationLen =
      _ffiListRoomInvitationLenPtr.asFunction<int Function(int)>();

  late final _ffiListRoomInvitationElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListRoomInvitationElementAt",
  );

  late final _ffiListRoomInvitationElementAt =
      _ffiListRoomInvitationElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListRoomInvitationRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListRoomInvitationRemove",
  );

  late final _ffiListRoomInvitationRemove =
      _ffiListRoomInvitationRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListRoomInvitationAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListRoomInvitationAdd",
  );

  late final _ffiListRoomInvitationAdd =
      _ffiListRoomInvitationAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListRoomInvitationInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListRoomInvitationInsert");

  late final _ffiListRoomInvitationInsert = _ffiListRoomInvitationInsertPtr
      .asFunction<void Function(int, int, int)>();
  FfiListRsvp createFfiListRsvp() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListRsvpCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListRsvp");
    return FfiListRsvp._(this, list_box);
  }

  late final _ffiListRsvpCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>("__FfiListRsvpCreate");

  late final _ffiListRsvpCreate =
      _ffiListRsvpCreatePtr.asFunction<int Function()>();

  late final _ffiListRsvpLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListRsvpLen",
  );

  late final _ffiListRsvpLen =
      _ffiListRsvpLenPtr.asFunction<int Function(int)>();

  late final _ffiListRsvpElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListRsvpElementAt",
  );

  late final _ffiListRsvpElementAt =
      _ffiListRsvpElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListRsvpRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListRsvpRemove",
  );

  late final _ffiListRsvpRemove =
      _ffiListRsvpRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListRsvpAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListRsvpAdd",
  );

  late final _ffiListRsvpAdd =
      _ffiListRsvpAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListRsvpInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListRsvpInsert");

  late final _ffiListRsvpInsert =
      _ffiListRsvpInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListSpace createFfiListSpace() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListSpaceCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListSpace");
    return FfiListSpace._(this, list_box);
  }

  late final _ffiListSpaceCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListSpaceCreate",
  );

  late final _ffiListSpaceCreate =
      _ffiListSpaceCreatePtr.asFunction<int Function()>();

  late final _ffiListSpaceLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListSpaceLen",
  );

  late final _ffiListSpaceLen =
      _ffiListSpaceLenPtr.asFunction<int Function(int)>();

  late final _ffiListSpaceElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceElementAt",
  );

  late final _ffiListSpaceElementAt =
      _ffiListSpaceElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListSpaceRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceRemove",
  );

  late final _ffiListSpaceRemove =
      _ffiListSpaceRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListSpaceAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListSpaceAdd",
  );

  late final _ffiListSpaceAdd =
      _ffiListSpaceAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListSpaceInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListSpaceInsert");

  late final _ffiListSpaceInsert =
      _ffiListSpaceInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListSpaceHierarchyRoomInfo createFfiListSpaceHierarchyRoomInfo() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListSpaceHierarchyRoomInfoCreate(),
    );
    final list_box = _Box(
      this,
      list_ptr,
      "drop_box_FfiListSpaceHierarchyRoomInfo",
    );
    return FfiListSpaceHierarchyRoomInfo._(this, list_box);
  }

  late final _ffiListSpaceHierarchyRoomInfoCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListSpaceHierarchyRoomInfoCreate",
  );

  late final _ffiListSpaceHierarchyRoomInfoCreate =
      _ffiListSpaceHierarchyRoomInfoCreatePtr.asFunction<int Function()>();

  late final _ffiListSpaceHierarchyRoomInfoLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListSpaceHierarchyRoomInfoLen",
  );

  late final _ffiListSpaceHierarchyRoomInfoLen =
      _ffiListSpaceHierarchyRoomInfoLenPtr.asFunction<int Function(int)>();

  late final _ffiListSpaceHierarchyRoomInfoElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceHierarchyRoomInfoElementAt",
  );

  late final _ffiListSpaceHierarchyRoomInfoElementAt =
      _ffiListSpaceHierarchyRoomInfoElementAtPtr
          .asFunction<int Function(int, int)>();

  late final _ffiListSpaceHierarchyRoomInfoRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceHierarchyRoomInfoRemove",
  );

  late final _ffiListSpaceHierarchyRoomInfoRemove =
      _ffiListSpaceHierarchyRoomInfoRemovePtr
          .asFunction<int Function(int, int)>();

  late final _ffiListSpaceHierarchyRoomInfoAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListSpaceHierarchyRoomInfoAdd",
  );

  late final _ffiListSpaceHierarchyRoomInfoAdd =
      _ffiListSpaceHierarchyRoomInfoAddPtr
          .asFunction<void Function(int, int)>();

  late final _ffiListSpaceHierarchyRoomInfoInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListSpaceHierarchyRoomInfoInsert");

  late final _ffiListSpaceHierarchyRoomInfoInsert =
      _ffiListSpaceHierarchyRoomInfoInsertPtr
          .asFunction<void Function(int, int, int)>();
  FfiListSpaceRelation createFfiListSpaceRelation() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListSpaceRelationCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListSpaceRelation");
    return FfiListSpaceRelation._(this, list_box);
  }

  late final _ffiListSpaceRelationCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListSpaceRelationCreate",
  );

  late final _ffiListSpaceRelationCreate =
      _ffiListSpaceRelationCreatePtr.asFunction<int Function()>();

  late final _ffiListSpaceRelationLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListSpaceRelationLen",
  );

  late final _ffiListSpaceRelationLen =
      _ffiListSpaceRelationLenPtr.asFunction<int Function(int)>();

  late final _ffiListSpaceRelationElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceRelationElementAt",
  );

  late final _ffiListSpaceRelationElementAt =
      _ffiListSpaceRelationElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListSpaceRelationRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSpaceRelationRemove",
  );

  late final _ffiListSpaceRelationRemove =
      _ffiListSpaceRelationRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListSpaceRelationAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListSpaceRelationAdd",
  );

  late final _ffiListSpaceRelationAdd =
      _ffiListSpaceRelationAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListSpaceRelationInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListSpaceRelationInsert");

  late final _ffiListSpaceRelationInsert =
      _ffiListSpaceRelationInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListStory createFfiListStory() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListStoryCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListStory");
    return FfiListStory._(this, list_box);
  }

  late final _ffiListStoryCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListStoryCreate",
  );

  late final _ffiListStoryCreate =
      _ffiListStoryCreatePtr.asFunction<int Function()>();

  late final _ffiListStoryLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListStoryLen",
  );

  late final _ffiListStoryLen =
      _ffiListStoryLenPtr.asFunction<int Function(int)>();

  late final _ffiListStoryElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStoryElementAt",
  );

  late final _ffiListStoryElementAt =
      _ffiListStoryElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListStoryRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStoryRemove",
  );

  late final _ffiListStoryRemove =
      _ffiListStoryRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListStoryAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListStoryAdd",
  );

  late final _ffiListStoryAdd =
      _ffiListStoryAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListStoryInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListStoryInsert");

  late final _ffiListStoryInsert =
      _ffiListStoryInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListStorySlide createFfiListStorySlide() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListStorySlideCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListStorySlide");
    return FfiListStorySlide._(this, list_box);
  }

  late final _ffiListStorySlideCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListStorySlideCreate",
  );

  late final _ffiListStorySlideCreate =
      _ffiListStorySlideCreatePtr.asFunction<int Function()>();

  late final _ffiListStorySlideLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListStorySlideLen",
  );

  late final _ffiListStorySlideLen =
      _ffiListStorySlideLenPtr.asFunction<int Function(int)>();

  late final _ffiListStorySlideElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStorySlideElementAt",
  );

  late final _ffiListStorySlideElementAt =
      _ffiListStorySlideElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListStorySlideRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStorySlideRemove",
  );

  late final _ffiListStorySlideRemove =
      _ffiListStorySlideRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListStorySlideAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListStorySlideAdd",
  );

  late final _ffiListStorySlideAdd =
      _ffiListStorySlideAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListStorySlideInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListStorySlideInsert");

  late final _ffiListStorySlideInsert =
      _ffiListStorySlideInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListStorySlideDraft createFfiListStorySlideDraft() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListStorySlideDraftCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListStorySlideDraft");
    return FfiListStorySlideDraft._(this, list_box);
  }

  late final _ffiListStorySlideDraftCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListStorySlideDraftCreate",
  );

  late final _ffiListStorySlideDraftCreate =
      _ffiListStorySlideDraftCreatePtr.asFunction<int Function()>();

  late final _ffiListStorySlideDraftLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListStorySlideDraftLen",
  );

  late final _ffiListStorySlideDraftLen =
      _ffiListStorySlideDraftLenPtr.asFunction<int Function(int)>();

  late final _ffiListStorySlideDraftElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStorySlideDraftElementAt",
  );

  late final _ffiListStorySlideDraftElementAt =
      _ffiListStorySlideDraftElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListStorySlideDraftRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListStorySlideDraftRemove",
  );

  late final _ffiListStorySlideDraftRemove =
      _ffiListStorySlideDraftRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListStorySlideDraftAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListStorySlideDraftAdd",
  );

  late final _ffiListStorySlideDraftAdd =
      _ffiListStorySlideDraftAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListStorySlideDraftInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListStorySlideDraftInsert");

  late final _ffiListStorySlideDraftInsert = _ffiListStorySlideDraftInsertPtr
      .asFunction<void Function(int, int, int)>();
  FfiListSuperInviteToken createFfiListSuperInviteToken() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListSuperInviteTokenCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListSuperInviteToken");
    return FfiListSuperInviteToken._(this, list_box);
  }

  late final _ffiListSuperInviteTokenCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListSuperInviteTokenCreate",
  );

  late final _ffiListSuperInviteTokenCreate =
      _ffiListSuperInviteTokenCreatePtr.asFunction<int Function()>();

  late final _ffiListSuperInviteTokenLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListSuperInviteTokenLen",
  );

  late final _ffiListSuperInviteTokenLen =
      _ffiListSuperInviteTokenLenPtr.asFunction<int Function(int)>();

  late final _ffiListSuperInviteTokenElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSuperInviteTokenElementAt",
  );

  late final _ffiListSuperInviteTokenElementAt =
      _ffiListSuperInviteTokenElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListSuperInviteTokenRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListSuperInviteTokenRemove",
  );

  late final _ffiListSuperInviteTokenRemove =
      _ffiListSuperInviteTokenRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListSuperInviteTokenAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListSuperInviteTokenAdd",
  );

  late final _ffiListSuperInviteTokenAdd =
      _ffiListSuperInviteTokenAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListSuperInviteTokenInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListSuperInviteTokenInsert");

  late final _ffiListSuperInviteTokenInsert = _ffiListSuperInviteTokenInsertPtr
      .asFunction<void Function(int, int, int)>();
  FfiListTask createFfiListTask() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListTaskCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListTask");
    return FfiListTask._(this, list_box);
  }

  late final _ffiListTaskCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>("__FfiListTaskCreate");

  late final _ffiListTaskCreate =
      _ffiListTaskCreatePtr.asFunction<int Function()>();

  late final _ffiListTaskLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListTaskLen",
  );

  late final _ffiListTaskLen =
      _ffiListTaskLenPtr.asFunction<int Function(int)>();

  late final _ffiListTaskElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTaskElementAt",
  );

  late final _ffiListTaskElementAt =
      _ffiListTaskElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListTaskRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTaskRemove",
  );

  late final _ffiListTaskRemove =
      _ffiListTaskRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListTaskAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListTaskAdd",
  );

  late final _ffiListTaskAdd =
      _ffiListTaskAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListTaskInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListTaskInsert");

  late final _ffiListTaskInsert =
      _ffiListTaskInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListTaskList createFfiListTaskList() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListTaskListCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListTaskList");
    return FfiListTaskList._(this, list_box);
  }

  late final _ffiListTaskListCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListTaskListCreate",
  );

  late final _ffiListTaskListCreate =
      _ffiListTaskListCreatePtr.asFunction<int Function()>();

  late final _ffiListTaskListLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListTaskListLen",
  );

  late final _ffiListTaskListLen =
      _ffiListTaskListLenPtr.asFunction<int Function(int)>();

  late final _ffiListTaskListElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTaskListElementAt",
  );

  late final _ffiListTaskListElementAt =
      _ffiListTaskListElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListTaskListRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTaskListRemove",
  );

  late final _ffiListTaskListRemove =
      _ffiListTaskListRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListTaskListAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListTaskListAdd",
  );

  late final _ffiListTaskListAdd =
      _ffiListTaskListAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListTaskListInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListTaskListInsert");

  late final _ffiListTaskListInsert =
      _ffiListTaskListInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListTimelineItem createFfiListTimelineItem() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListTimelineItemCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListTimelineItem");
    return FfiListTimelineItem._(this, list_box);
  }

  late final _ffiListTimelineItemCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListTimelineItemCreate",
  );

  late final _ffiListTimelineItemCreate =
      _ffiListTimelineItemCreatePtr.asFunction<int Function()>();

  late final _ffiListTimelineItemLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListTimelineItemLen",
  );

  late final _ffiListTimelineItemLen =
      _ffiListTimelineItemLenPtr.asFunction<int Function(int)>();

  late final _ffiListTimelineItemElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTimelineItemElementAt",
  );

  late final _ffiListTimelineItemElementAt =
      _ffiListTimelineItemElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListTimelineItemRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListTimelineItemRemove",
  );

  late final _ffiListTimelineItemRemove =
      _ffiListTimelineItemRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListTimelineItemAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListTimelineItemAdd",
  );

  late final _ffiListTimelineItemAdd =
      _ffiListTimelineItemAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListTimelineItemInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListTimelineItemInsert");

  late final _ffiListTimelineItemInsert =
      _ffiListTimelineItemInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListUrlPreview createFfiListUrlPreview() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListUrlPreviewCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListUrlPreview");
    return FfiListUrlPreview._(this, list_box);
  }

  late final _ffiListUrlPreviewCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListUrlPreviewCreate",
  );

  late final _ffiListUrlPreviewCreate =
      _ffiListUrlPreviewCreatePtr.asFunction<int Function()>();

  late final _ffiListUrlPreviewLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListUrlPreviewLen",
  );

  late final _ffiListUrlPreviewLen =
      _ffiListUrlPreviewLenPtr.asFunction<int Function(int)>();

  late final _ffiListUrlPreviewElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUrlPreviewElementAt",
  );

  late final _ffiListUrlPreviewElementAt =
      _ffiListUrlPreviewElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListUrlPreviewRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUrlPreviewRemove",
  );

  late final _ffiListUrlPreviewRemove =
      _ffiListUrlPreviewRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListUrlPreviewAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListUrlPreviewAdd",
  );

  late final _ffiListUrlPreviewAdd =
      _ffiListUrlPreviewAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListUrlPreviewInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListUrlPreviewInsert");

  late final _ffiListUrlPreviewInsert =
      _ffiListUrlPreviewInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListUserId createFfiListUserId() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListUserIdCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListUserId");
    return FfiListUserId._(this, list_box);
  }

  late final _ffiListUserIdCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListUserIdCreate",
  );

  late final _ffiListUserIdCreate =
      _ffiListUserIdCreatePtr.asFunction<int Function()>();

  late final _ffiListUserIdLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListUserIdLen",
  );

  late final _ffiListUserIdLen =
      _ffiListUserIdLenPtr.asFunction<int Function(int)>();

  late final _ffiListUserIdElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUserIdElementAt",
  );

  late final _ffiListUserIdElementAt =
      _ffiListUserIdElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListUserIdRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUserIdRemove",
  );

  late final _ffiListUserIdRemove =
      _ffiListUserIdRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListUserIdAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListUserIdAdd",
  );

  late final _ffiListUserIdAdd =
      _ffiListUserIdAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListUserIdInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(
              ffi.IntPtr, ffi.Uint32, ffi.IntPtr)>>("__FfiListUserIdInsert");

  late final _ffiListUserIdInsert =
      _ffiListUserIdInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListUserProfile createFfiListUserProfile() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListUserProfileCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListUserProfile");
    return FfiListUserProfile._(this, list_box);
  }

  late final _ffiListUserProfileCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListUserProfileCreate",
  );

  late final _ffiListUserProfileCreate =
      _ffiListUserProfileCreatePtr.asFunction<int Function()>();

  late final _ffiListUserProfileLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListUserProfileLen",
  );

  late final _ffiListUserProfileLen =
      _ffiListUserProfileLenPtr.asFunction<int Function(int)>();

  late final _ffiListUserProfileElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUserProfileElementAt",
  );

  late final _ffiListUserProfileElementAt =
      _ffiListUserProfileElementAtPtr.asFunction<int Function(int, int)>();

  late final _ffiListUserProfileRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListUserProfileRemove",
  );

  late final _ffiListUserProfileRemove =
      _ffiListUserProfileRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListUserProfileAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListUserProfileAdd",
  );

  late final _ffiListUserProfileAdd =
      _ffiListUserProfileAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListUserProfileInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListUserProfileInsert");

  late final _ffiListUserProfileInsert =
      _ffiListUserProfileInsertPtr.asFunction<void Function(int, int, int)>();
  FfiListVerificationEmoji createFfiListVerificationEmoji() {
    final ffi.Pointer<ffi.Void> list_ptr = ffi.Pointer.fromAddress(
      _ffiListVerificationEmojiCreate(),
    );
    final list_box = _Box(this, list_ptr, "drop_box_FfiListVerificationEmoji");
    return FfiListVerificationEmoji._(this, list_box);
  }

  late final _ffiListVerificationEmojiCreatePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function()>>(
    "__FfiListVerificationEmojiCreate",
  );

  late final _ffiListVerificationEmojiCreate =
      _ffiListVerificationEmojiCreatePtr.asFunction<int Function()>();

  late final _ffiListVerificationEmojiLenPtr =
      _lookup<ffi.NativeFunction<ffi.Uint32 Function(ffi.IntPtr)>>(
    "__FfiListVerificationEmojiLen",
  );

  late final _ffiListVerificationEmojiLen =
      _ffiListVerificationEmojiLenPtr.asFunction<int Function(int)>();

  late final _ffiListVerificationEmojiElementAtPtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListVerificationEmojiElementAt",
  );

  late final _ffiListVerificationEmojiElementAt =
      _ffiListVerificationEmojiElementAtPtr
          .asFunction<int Function(int, int)>();

  late final _ffiListVerificationEmojiRemovePtr =
      _lookup<ffi.NativeFunction<ffi.IntPtr Function(ffi.IntPtr, ffi.Uint32)>>(
    "__FfiListVerificationEmojiRemove",
  );

  late final _ffiListVerificationEmojiRemove =
      _ffiListVerificationEmojiRemovePtr.asFunction<int Function(int, int)>();

  late final _ffiListVerificationEmojiAddPtr =
      _lookup<ffi.NativeFunction<ffi.Void Function(ffi.IntPtr, ffi.IntPtr)>>(
    "__FfiListVerificationEmojiAdd",
  );

  late final _ffiListVerificationEmojiAdd =
      _ffiListVerificationEmojiAddPtr.asFunction<void Function(int, int)>();

  late final _ffiListVerificationEmojiInsertPtr = _lookup<
      ffi.NativeFunction<
          ffi.Void Function(ffi.IntPtr, ffi.Uint32,
              ffi.IntPtr)>>("__FfiListVerificationEmojiInsert");

  late final _ffiListVerificationEmojiInsert =
      _ffiListVerificationEmojiInsertPtr
          .asFunction<void Function(int, int, int)>();
  late final _destructureRsvpStatusPtr =
      _lookup<ffi.NativeFunction<_EnumWrapper Function(ffi.IntPtr)>>(
    "destructure_enum_RsvpStatus",
  );

  late final _destructureRsvpStatus =
      _destructureRsvpStatusPtr.asFunction<_EnumWrapper Function(int)>();
  late final _destructureRelationTargetTypePtr =
      _lookup<ffi.NativeFunction<_EnumWrapper Function(ffi.IntPtr)>>(
    "destructure_enum_RelationTargetType",
  );

  late final _destructureRelationTargetType = _destructureRelationTargetTypePtr
      .asFunction<_EnumWrapper Function(int)>();
  late final _destructureMembershipStatusPtr =
      _lookup<ffi.NativeFunction<_EnumWrapper Function(ffi.IntPtr)>>(
    "destructure_enum_MembershipStatus",
  );

  late final _destructureMembershipStatus =
      _destructureMembershipStatusPtr.asFunction<_EnumWrapper Function(int)>();
  late final _destructureMemberPermissionPtr =
      _lookup<ffi.NativeFunction<_EnumWrapper Function(ffi.IntPtr)>>(
    "destructure_enum_MemberPermission",
  );

  late final _destructureMemberPermission =
      _destructureMemberPermissionPtr.asFunction<_EnumWrapper Function(int)>();
}

/// Representing a time frame
class EfkDuration {
  final Api _api;
  final _Box _box;

  EfkDuration._(this._api, this._box);

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class UtcDateTime {
  final Api _api;
  final _Box _box;

  UtcDateTime._(this._api, this._box);

  int timestamp() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._utcDateTimeTimestamp(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  String toRfc2822() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._utcDateTimeToRfc2822(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String toRfc3339() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._utcDateTimeToRfc3339(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int timestampMillis() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._utcDateTimeTimestampMillis(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RefDetails {
  final Api _api;
  final _Box _box;

  RefDetails._(this._api, this._box);

  /// the target id
  String? targetIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsTargetIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// if that is in a different room, specified here
  String? roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// gives either `link`, `task`, `task-list` or `calendar-event`
  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// what type of embed action is requested_inputs
  String embedActionStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsEmbedActionStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// if this is a `task` type, what `task-list-id` does it belong to
  String? taskListIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsTaskListIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the display title of the reference
  String? title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the room display name from the preview data
  String? roomDisplayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsRoomDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the participants count if this is a calendar event
  int? participants() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsParticipants(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// When the event starts according to the calender preview data
  UtcDateTime? utcStart() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsUtcStart(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UtcDateTime");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UtcDateTime._(_api, tmp4_1);
    return tmp2;
  }

  /// if ref is `link`, its uri
  String? uri() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsUri(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the via-server names for this room
  FfiListFfiString viaServers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsViaServers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// generating an internal acter:-link
  String generateInternalLink(bool includePreview) {
    final tmp1 = includePreview;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._refDetailsGenerateInternalLink(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    final tmp7 = tmp3.arg2;
    final tmp8 = tmp3.arg3;
    final tmp9 = tmp3.arg4;
    final tmp10 = tmp3.arg5;
    final tmp11 = tmp3.arg6;
    if (tmp5 == 0) {
      debugAllocation("handle error", tmp6, tmp7);
      final ffi.Pointer<ffi.Uint8> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
      final tmp5_0 = utf8.decode(
        tmp6_0.asTypedList(tmp7),
        allowMalformed: true,
      );
      if (tmp7 > 0) {
        final ffi.Pointer<ffi.Void> tmp6_0;
        tmp6_0 = ffi.Pointer.fromAddress(tmp6);
        _api.__deallocate(tmp6_0, tmp8, 1);
      }
      throw tmp5_0;
    }
    if (tmp10 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp9_ptr = ffi.Pointer.fromAddress(tmp9);
    List<int> tmp9_buf = [];
    final tmp9_precast = tmp9_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp10; i++) {
      int char = tmp9_precast.elementAt(i).value;
      tmp9_buf.add(char);
    }
    final tmp4 = utf8.decode(tmp9_buf, allowMalformed: true);
    if (tmp11 > 0) {
      final ffi.Pointer<ffi.Void> tmp9_0;
      tmp9_0 = ffi.Pointer.fromAddress(tmp9);
      _api.__deallocate(tmp9_0, tmp11 * 1, 1);
    }
    return tmp4;
  }

  /// generating the external link
  Future<String> generateExternalLink() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._refDetailsGenerateExternalLink(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__RefDetails_generate_external_link_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__refDetailsGenerateExternalLinkFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class UrlPreview {
  final Api _api;
  final _Box _box;

  UrlPreview._(this._api, this._box);

  /// the canonical url to use
  String? url() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._urlPreviewUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// preview title if any
  String? title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._urlPreviewTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// description text if any
  String? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._urlPreviewDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// whether this preview has an image
  bool hasImage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._urlPreviewHasImage(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// The media image source if any
  MediaSource? imageSource() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._urlPreviewImageSource(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MediaSource");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MediaSource._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A locally fetched Url Preview until
/// it is submitted
class LocalUrlPreview {
  final Api _api;
  final _Box _box;

  LocalUrlPreview._(this._api, this._box);

  /// the canonical url to use
  String url() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._localUrlPreviewUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// preview title if any
  String? title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._localUrlPreviewTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// description text if any
  String? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._localUrlPreviewDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// whether this preview has an image
  bool hasImage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._localUrlPreviewHasImage(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// The image url if any
  String? imageUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._localUrlPreviewImageUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// An acter internal link to a different object
class ObjRef {
  final Api _api;
  final _Box _box;

  ObjRef._(this._api, this._box);

  /// where to position the element (if given)
  String? positionStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objRefPositionStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// further details of the reference
  RefDetails refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objRefRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RefDetails");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RefDetails._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A builder for ObjRef
class ObjRefBuilder {
  final Api _api;
  final _Box _box;

  ObjRefBuilder._(this._api, this._box);

  /// set position of element
  /// position: top-left/top-middle/top-right/center-left/center-middle/center-right/bottom-left/bottom-middle/bottom-right
  void position(String position) {
    final tmp1 = position;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._objRefBuilderPosition(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// empty position of element
  void unsetPosition() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._objRefBuilderUnsetPosition(tmp0);
    return;
  }

  ObjRef build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objRefBuilderBuild(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_ObjRef");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = ObjRef._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A foreground and background color setting
class Colorize {
  final Api _api;
  final _Box _box;

  Colorize._(this._api, this._box);

  /// Foreground or text color
  int? color() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._colorizeColor(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Background color
  int? background() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._colorizeBackground(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Link color
  int? link() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._colorizeLink(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A builder for Colorize. Allowing you to set (foreground) color and background
class ColorizeBuilder {
  final Api _api;
  final _Box _box;

  ColorizeBuilder._(this._api, this._box);

  /// RGBA color representation as int for the foreground color
  void color(int color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._colorizeBuilderColor(tmp0, tmp2);
    return;
  }

  /// unset the color
  void unsetColor() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._colorizeBuilderUnsetColor(tmp0);
    return;
  }

  /// RGBA color representation as int for the background color
  void background(int color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._colorizeBuilderBackground(tmp0, tmp2);
    return;
  }

  /// unset the background color
  void unsetBackground() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._colorizeBuilderUnsetBackground(tmp0);
    return;
  }

  /// RGBA color representation as int for the link color
  void link(int color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._colorizeBuilderLink(tmp0, tmp2);
    return;
  }

  /// unset the link color
  void unsetLink() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._colorizeBuilderUnsetLink(tmp0);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class VecStringBuilder {
  final Api _api;
  final _Box _box;

  VecStringBuilder._(this._api, this._box);

  void add(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._vecStringBuilderAdd(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class OptionString {
  final Api _api;
  final _Box _box;

  OptionString._(this._api, this._box);

  /// get text
  String? text() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._optionStringText(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class OptionBuffer {
  final Api _api;
  final _Box _box;

  OptionBuffer._(this._api, this._box);

  /// get data
  FfiBufferUint8? data() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._optionBufferData(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiBuffer");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiBufferUint8._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class OptionRsvpStatus {
  final Api _api;
  final _Box _box;

  OptionRsvpStatus._(this._api, this._box);

  /// get status
  RsvpStatus? status() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._optionRsvpStatusStatus(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RsvpStatus");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RsvpStatus._(_api, tmp4_1);
    return tmp2;
  }

  /// get status in string
  String? statusStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._optionRsvpStatusStatusStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class OptionComposeDraft {
  final Api _api;
  final _Box _box;

  OptionComposeDraft._(this._api, this._box);

  /// get compose draft object
  ComposeDraft? draft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._optionComposeDraftDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ComposeDraft");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ComposeDraft._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class UserProfile {
  final Api _api;
  final _Box _box;

  UserProfile._(this._api, this._box);

  /// get user id
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userProfileUserId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// whether to have avatar
  bool hasAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userProfileHasAvatar(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the binary data of avatar
  /// if thumb size is given, avatar thumbnail is returned
  /// if thumb size is not given, avatar file is returned
  Future<OptionBuffer> getAvatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._userProfileGetAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__UserProfile_get_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__userProfileGetAvatarFuturePoll);
    return tmp6;
  }

  /// get the display name
  String? displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userProfileDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// which rooms you are sharing with that profile
  FfiListFfiString sharedRooms() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userProfileSharedRooms(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Deliver typing event from rust
class TypingEvent {
  final Api _api;
  final _Box _box;

  TypingEvent._(this._api, this._box);

  /// Get list of user id
  FfiListUserId userIds() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._typingEventUserIds(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListUserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListUserId._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TextMessageContent {
  final Api _api;
  final _Box _box;

  TextMessageContent._(this._api, this._box);

  String body() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._textMessageContentBody(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? formatted() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._textMessageContentFormatted(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class MediaSource {
  final Api _api;
  final _Box _box;

  MediaSource._(this._api, this._box);

  String url() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._mediaSourceUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ThumbnailInfo {
  final Api _api;
  final _Box _box;

  ThumbnailInfo._(this._api, this._box);

  /// thumbnail mimetype
  String? mimetype() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._thumbnailInfoMimetype(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// thumbnail size
  int? size() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._thumbnailInfoSize(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// thumbnail width
  int? width() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._thumbnailInfoWidth(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// thumbnail height
  int? height() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._thumbnailInfoHeight(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ThumbnailSize {
  final Api _api;
  final _Box _box;

  ThumbnailSize._(this._api, this._box);

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class DeviceId {
  final Api _api;
  final _Box _box;

  DeviceId._(this._api, this._box);

  String toString() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceIdToString(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class EventId {
  final Api _api;
  final _Box _box;

  EventId._(this._api, this._box);

  String toString() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventIdToString(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class MxcUri {
  final Api _api;
  final _Box _box;

  MxcUri._(this._api, this._box);

  String toString() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._mxcUriToString(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ComposeDraft {
  final Api _api;
  final _Box _box;

  ComposeDraft._(this._api, this._box);

  /// plain body text, always available
  String plainText() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._composeDraftPlainText(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// formatted text
  String? htmlText() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._composeDraftHtmlText(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// event id, only valid for edit and reply states
  String? eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._composeDraftEventId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// compose message state type.
  /// One of `new`, `edit`, `reply`.
  String draftType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._composeDraftDraftType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomId {
  final Api _api;
  final _Box _box;

  RoomId._(this._api, this._box);

  String toString() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomIdToString(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class UserId {
  final Api _api;
  final _Box _box;

  UserId._(this._api, this._box);

  String toString() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userIdToString(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RegistrationTokenViaEmailResponse {
  final Api _api;
  final _Box _box;

  RegistrationTokenViaEmailResponse._(this._api, this._box);

  String sid() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._registrationTokenViaEmailResponseSid(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? submitUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._registrationTokenViaEmailResponseSubmitUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PasswordChangeEmailTokenResponse {
  final Api _api;
  final _Box _box;

  PasswordChangeEmailTokenResponse._(this._api, this._box);

  String clientSecret() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._passwordChangeEmailTokenResponseClientSecret(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String sid() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._passwordChangeEmailTokenResponseSid(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? submitUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._passwordChangeEmailTokenResponseSubmitUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A single Slide of a NewsEntry
class NewsSlide {
  final Api _api;
  final _Box _box;

  NewsSlide._(this._api, this._box);

  /// the content of this slide
  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSlideTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the unique, predictable ID for this slide
  String uniqueId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSlideUniqueId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the references linked in this slide
  FfiListObjRef references() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSlideReferences(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListObjRef");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListObjRef._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// The color setting
  Colorize? colors() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSlideColors(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Colorize");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Colorize._(_api, tmp4_1);
    return tmp2;
  }

  /// if this is a media, hand over the description
  MsgContent msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSlideMsgContent(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_MsgContent");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = MsgContent._(_api, tmp3_1);
    return tmp2;
  }

  /// if this is a media, hand over the data
  /// if thumb size is given, media thumbnail is returned
  /// if thumb size is not given, media file is returned
  Future<FfiBufferUint8> sourceBinary(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._newsSlideSourceBinary(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__NewsSlide_source_binary_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__newsSlideSourceBinaryFuturePoll);
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NewsSlideDraft {
  final Api _api;
  final _Box _box;

  NewsSlideDraft._(this._api, this._box);

  /// add reference for this slide draft
  void addReference(ObjRefBuilder reference) {
    final tmp1 = reference;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._newsSlideDraftAddReference(tmp0, tmp2);
    return;
  }

  /// set the color according to the colorize builder
  void color(ColorizeBuilder color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._newsSlideDraftColor(tmp0, tmp2);
    return;
  }

  /// unset references for this slide draft
  void unsetReferences() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._newsSlideDraftUnsetReferences(tmp0);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A news entry
class NewsEntry {
  final Api _api;
  final _Box _box;

  NewsEntry._(this._api, this._box);

  /// the slides count in this news item
  int slidesCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntrySlidesCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// The slides belonging to this news item
  NewsSlide? getSlide(int pos) {
    final tmp1 = pos;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._newsEntryGetSlide(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    if (tmp5 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
    final tmp6_1 = _Box(_api, tmp6_0, "drop_box_NewsSlide");
    tmp6_1._finalizer = _api._registerFinalizer(tmp6_1);
    final tmp4 = NewsSlide._(_api, tmp6_1);
    return tmp4;
  }

  /// get all slides of this news item
  FfiListNewsSlide slides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntrySlides(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListNewsSlide");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListNewsSlide._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get room id
  RoomId roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryRoomId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RoomId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RoomId._(_api, tmp3_1);
    return tmp2;
  }

  /// get sender id
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntrySender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// get event id
  EventId eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryEventId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_EventId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = EventId._(_api, tmp3_1);
    return tmp2;
  }

  /// get timestamp of this event
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// make a builder for updating the news entry
  NewsEntryUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_NewsEntryUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = NewsEntryUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntry_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryCanRedactFuturePoll);
    return tmp2;
  }

  /// get the reaction manager
  Future<ReactionManager> reactions() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryReactions(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntry_reactions_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryReactionsFuturePoll);
    return tmp2;
  }

  /// get the read receipt manager
  Future<ReadReceiptsManager> readReceipts() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryReadReceipts(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntry_read_receipts_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryReadReceiptsFuturePoll);
    return tmp2;
  }

  /// get the comment manager
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntry_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryCommentsFuturePoll);
    return tmp2;
  }

  /// get the internal reference object
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntry_ref_details_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryRefDetailsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NewsEntryDraft {
  final Api _api;
  final _Box _box;

  NewsEntryDraft._(this._api, this._box);

  /// create news slide draft
  void addSlide(NewsSlideDraft baseDraft) {
    final tmp1 = baseDraft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._newsEntryDraftAddSlide(tmp0, tmp2);
    return;
  }

  /// change position of slides draft of this news entry
  void swapSlides(int from, int to) {
    final tmp1 = from;
    final tmp3 = to;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    final tmp5 = _api._newsEntryDraftSwapSlides(tmp0, tmp2, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// get a copy of the news slide set for this news entry draft
  FfiListNewsSlideDraft slides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryDraftSlides(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListNewsSlideDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListNewsSlideDraft._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// clear slides
  void unsetSlides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._newsEntryDraftUnsetSlides(tmp0);
    return;
  }

  /// create this news entry
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NewsEntryDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__newsEntryDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NewsEntryUpdateBuilder {
  final Api _api;
  final _Box _box;

  NewsEntryUpdateBuilder._(this._api, this._box);

  /// set the slides for this news entry
  void addSlide(NewsSlideDraft draft) {
    final tmp1 = draft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._newsEntryUpdateBuilderAddSlide(tmp0, tmp2);
    return;
  }

  /// reset slides for this news entry
  void unsetSlides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._newsEntryUpdateBuilderUnsetSlides(tmp0);
    return;
  }

  void unsetSlidesUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._newsEntryUpdateBuilderUnsetSlidesUpdate(tmp0);
    return;
  }

  /// set position of slides for this news entry
  void swapSlides(int from, int to) {
    final tmp1 = from;
    final tmp3 = to;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    final tmp5 = _api._newsEntryUpdateBuilderSwapSlides(tmp0, tmp2, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// update this news entry
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsEntryUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__NewsEntryUpdateBuilder_send_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__newsEntryUpdateBuilderSendFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A single Slide of a Story
class StorySlide {
  final Api _api;
  final _Box _box;

  StorySlide._(this._api, this._box);

  /// the content of this slide
  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlideTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the unique, predictable ID for this slide
  String uniqueId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlideUniqueId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the references linked in this slide
  FfiListObjRef references() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlideReferences(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListObjRef");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListObjRef._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// The color setting
  Colorize? colors() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlideColors(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Colorize");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Colorize._(_api, tmp4_1);
    return tmp2;
  }

  /// if this is a media, hand over the description
  MsgContent msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlideMsgContent(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_MsgContent");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = MsgContent._(_api, tmp3_1);
    return tmp2;
  }

  /// if this is a media, hand over the data
  /// if thumb size is given, media thumbnail is returned
  /// if thumb size is not given, media file is returned
  Future<FfiBufferUint8> sourceBinary(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._storySlideSourceBinary(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__StorySlide_source_binary_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__storySlideSourceBinaryFuturePoll);
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class StorySlideDraft {
  final Api _api;
  final _Box _box;

  StorySlideDraft._(this._api, this._box);

  /// add reference for this slide draft
  void addReference(ObjRefBuilder reference) {
    final tmp1 = reference;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._storySlideDraftAddReference(tmp0, tmp2);
    return;
  }

  /// set the color according to the colorize builder
  void color(ColorizeBuilder color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._storySlideDraftColor(tmp0, tmp2);
    return;
  }

  /// unset references for this slide draft
  void unsetReferences() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._storySlideDraftUnsetReferences(tmp0);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A news entry
class Story {
  final Api _api;
  final _Box _box;

  Story._(this._api, this._box);

  /// the slides count in this news item
  int slidesCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlidesCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// The slides belonging to this news item
  StorySlide? getSlide(int pos) {
    final tmp1 = pos;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._storyGetSlide(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    if (tmp5 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
    final tmp6_1 = _Box(_api, tmp6_0, "drop_box_StorySlide");
    tmp6_1._finalizer = _api._registerFinalizer(tmp6_1);
    final tmp4 = StorySlide._(_api, tmp6_1);
    return tmp4;
  }

  /// get all slides of this news item
  FfiListStorySlide slides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySlides(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListStorySlide");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListStorySlide._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get room id
  RoomId roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyRoomId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RoomId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RoomId._(_api, tmp3_1);
    return tmp2;
  }

  /// get sender id
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storySender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// get event id
  EventId eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyEventId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_EventId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = EventId._(_api, tmp3_1);
    return tmp2;
  }

  /// get timestamp of this event
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// make a builder for updating the story
  StoryUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_StoryUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = StoryUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Story_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyCanRedactFuturePoll);
    return tmp2;
  }

  /// get the reaction manager
  Future<ReactionManager> reactions() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyReactions(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Story_reactions_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyReactionsFuturePoll);
    return tmp2;
  }

  /// get the read receipt manager
  Future<ReadReceiptsManager> readReceipts() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyReadReceipts(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Story_read_receipts_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyReadReceiptsFuturePoll);
    return tmp2;
  }

  /// get the comment manager
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Story_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyCommentsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class StoryDraft {
  final Api _api;
  final _Box _box;

  StoryDraft._(this._api, this._box);

  /// create news slide draft
  void addSlide(StorySlideDraft baseDraft) {
    final tmp1 = baseDraft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._storyDraftAddSlide(tmp0, tmp2);
    return;
  }

  /// change position of slides draft of this news entry
  void swapSlides(int from, int to) {
    final tmp1 = from;
    final tmp3 = to;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    final tmp5 = _api._storyDraftSwapSlides(tmp0, tmp2, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// get a copy of the news slide set for this news entry draft
  FfiListStorySlideDraft slides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyDraftSlides(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListStorySlideDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListStorySlideDraft._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// clear slides
  void unsetSlides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._storyDraftUnsetSlides(tmp0);
    return;
  }

  /// create this news entry
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__StoryDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class StoryUpdateBuilder {
  final Api _api;
  final _Box _box;

  StoryUpdateBuilder._(this._api, this._box);

  /// set the slides for this news entry
  void addSlide(StorySlideDraft draft) {
    final tmp1 = draft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._storyUpdateBuilderAddSlide(tmp0, tmp2);
    return;
  }

  /// reset slides for this news entry
  void unsetSlides() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._storyUpdateBuilderUnsetSlides(tmp0);
    return;
  }

  void unsetSlidesUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._storyUpdateBuilderUnsetSlidesUpdate(tmp0);
    return;
  }

  /// set position of slides for this news entry
  void swapSlides(int from, int to) {
    final tmp1 = from;
    final tmp3 = to;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    final tmp5 = _api._storyUpdateBuilderSwapSlides(tmp0, tmp2, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// update this news entry
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storyUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__StoryUpdateBuilder_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__storyUpdateBuilderSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Draft a Pin
class PinDraft {
  final Api _api;
  final _Box _box;

  PinDraft._(this._api, this._box);

  /// set the title for this pin
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinDraftTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the content for this pin
  void contentText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinDraftContentText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the content of the pin through markdown
  void contentMarkdown(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinDraftContentMarkdown(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the content of the pin through html
  void contentHtml(String text, String html) {
    final tmp1 = text;
    final tmp5 = html;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._pinDraftContentHtml(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    return;
  }

  void unsetContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinDraftUnsetContent(tmp0);
    return;
  }

  /// set the url for this pin
  void url(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinDraftUrl(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void unsetUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinDraftUnsetUrl(tmp0);
    return;
  }

  /// set the display for this pin
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._pinDraftDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinDraftUnsetDisplay(tmp0);
    return;
  }

  /// fire this pin over - the event_id is the confirmation from the server.
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pinDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__PinDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__pinDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A pin object
class ActerPin {
  final Api _api;
  final _Box _box;

  ActerPin._(this._api, this._box);

  /// get the title of the pin
  String title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the content_text of the pin
  MsgContent? content() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// get the formatted content of the pin
  String? contentFormatted() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinContentFormatted(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Whether the inner text is coming as formatted
  bool hasFormattedText() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinHasFormattedText(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether this pin is a link
  bool isLink() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinIsLink(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the link content
  String? url() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// get the link color settings
  Display? display() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinDisplay(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Display");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Display._(_api, tmp4_1);
    return tmp2;
  }

  /// The room this Pin belongs to
  /// the unique event ID
  String eventIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinEventIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the room/space this item belongs to
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the internal reference object
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ActerPin_ref_details_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__acterPinRefDetailsFuturePoll);
    return tmp2;
  }

  /// sender id
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// make a builder for updating the pin
  PinUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_PinUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = PinUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// get informed about changes to this pin
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ActerPin_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__acterPinSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// replace the current pin with one with the latest state
  Future<ActerPin> refresh() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinRefresh(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ActerPin_refresh_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__acterPinRefreshFuturePoll);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ActerPin_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__acterPinCanRedactFuturePoll);
    return tmp2;
  }

  /// get the comments manager for this pin
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ActerPin_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__acterPinCommentsFuturePoll);
    return tmp2;
  }

  /// get the attachments manager for this pin
  Future<AttachmentsManager> attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterPinAttachments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ActerPin_attachments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__acterPinAttachmentsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PinUpdateBuilder {
  final Api _api;
  final _Box _box;

  PinUpdateBuilder._(this._api, this._box);

  /// set the title for this pin
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinUpdateBuilderTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void unsetTitleUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetTitleUpdate(tmp0);
    return;
  }

  /// set the content for this pin
  void contentText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinUpdateBuilderContentText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void contentMarkdown(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinUpdateBuilderContentMarkdown(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void contentHtml(String text, String html) {
    final tmp1 = text;
    final tmp5 = html;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._pinUpdateBuilderContentHtml(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    return;
  }

  void unsetContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetContent(tmp0);
    return;
  }

  void unsetContentUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetContentUpdate(tmp0);
    return;
  }

  /// set the url for this pin
  void url(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._pinUpdateBuilderUrl(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void unsetUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetUrl(tmp0);
    return;
  }

  void unsetUrlUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetUrlUpdate(tmp0);
    return;
  }

  /// set the display for this pin
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._pinUpdateBuilderDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetDisplay(tmp0);
    return;
  }

  void unsetDisplayUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._pinUpdateBuilderUnsetDisplayUpdate(tmp0);
    return;
  }

  /// fire this update over - the event_id is the confirmation from the server.
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pinUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__PinUpdateBuilder_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__pinUpdateBuilderSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CalendarEvent {
  final Api _api;
  final _Box _box;

  CalendarEvent._(this._api, this._box);

  /// the title of the event
  String title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// description text
  TextMessageContent? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TextMessageContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TextMessageContent._(_api, tmp4_1);
    return tmp2;
  }

  /// When the event starts
  UtcDateTime utcStart() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventUtcStart(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UtcDateTime");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UtcDateTime._(_api, tmp3_1);
    return tmp2;
  }

  /// When the event ends
  UtcDateTime utcEnd() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventUtcEnd(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UtcDateTime");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UtcDateTime._(_api, tmp3_1);
    return tmp2;
  }

  /// whether to show the time or just the dates
  bool showWithoutTime() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventShowWithoutTime(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// event id
  EventId eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventEventId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_EventId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = EventId._(_api, tmp3_1);
    return tmp2;
  }

  /// room id
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// sender id
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// update builder
  CalendarEventUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_CalendarEventUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = CalendarEventUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// get RSVP manager
  Future<RsvpManager> rsvps() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventRsvps(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CalendarEvent_rsvps_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__calendarEventRsvpsFuturePoll);
    return tmp2;
  }

  /// get the reaction manager
  Future<ReactionManager> reactions() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventReactions(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CalendarEvent_reactions_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__calendarEventReactionsFuturePoll);
    return tmp2;
  }

  /// get my RSVP status, one of Yes/Maybe/No or None
  Future<OptionRsvpStatus> respondedByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventRespondedByMe(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CalendarEvent_responded_by_me_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__calendarEventRespondedByMeFuturePoll,
    );
    return tmp2;
  }

  /// get the user id list who have responded with `Yes` on this event
  Future<FfiListFfiString> participants() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventParticipants(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CalendarEvent_participants_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__calendarEventParticipantsFuturePoll,
    );
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CalendarEvent_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__calendarEventCanRedactFuturePoll);
    return tmp2;
  }

  /// get the comments manager
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CalendarEvent_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__calendarEventCommentsFuturePoll);
    return tmp2;
  }

  /// get the attachments manager
  Future<AttachmentsManager> attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventAttachments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CalendarEvent_attachments_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__calendarEventAttachmentsFuturePoll,
    );
    return tmp2;
  }

  /// Generate a iCal as a String for sharing with others
  bool icalForSharing(String fileName) {
    final tmp1 = fileName;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventIcalForSharing(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final tmp6 = tmp11 > 0;
    return tmp6;
  }

  /// get the physical location(s) details
  FfiListEventLocationInfo physicalLocations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventPhysicalLocations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListEventLocationInfo");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListEventLocationInfo._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get the virtual location(s) details
  FfiListEventLocationInfo virtualLocations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventVirtualLocations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListEventLocationInfo");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListEventLocationInfo._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get all location details
  FfiListEventLocationInfo locations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventLocations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListEventLocationInfo");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListEventLocationInfo._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get the internal reference object
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CalendarEvent_ref_details_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__calendarEventRefDetailsFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CalendarEventUpdateBuilder {
  final Api _api;
  final _Box _box;

  CalendarEventUpdateBuilder._(this._api, this._box);

  /// set title of the event>
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._calendarEventUpdateBuilderTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description text
  void descriptionText(String body) {
    final tmp1 = body;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._calendarEventUpdateBuilderDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description html text
  void descriptionHtml(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._calendarEventUpdateBuilderDescriptionHtml(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  /// set utc start in rfc3339 string
  void utcStartFromRfc3339(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventUpdateBuilderUtcStartFromRfc3339(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set utc start in rfc2822 string
  void utcStartFromRfc2822(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventUpdateBuilderUtcStartFromRfc2822(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set utc start in custom format
  void utcStartFromFormat(String utcStart, String format) {
    final tmp1 = utcStart;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._calendarEventUpdateBuilderUtcStartFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  /// set utc end in rfc3339 string
  void utcEndFromRfc3339(String utcEnd) {
    final tmp1 = utcEnd;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventUpdateBuilderUtcEndFromRfc3339(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set utc end in rfc2822 string
  void utcEndFromRfc2822(String utcEnd) {
    final tmp1 = utcEnd;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventUpdateBuilderUtcEndFromRfc2822(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set utc end in custom format
  void utcEndFromFormat(String utcEnd, String format) {
    final tmp1 = utcEnd;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._calendarEventUpdateBuilderUtcEndFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  /// set the physical location details for this calendar event
  /// description_html means by markdown
  /// coordinates follows RFC 5870, for example `geo:51.5074,-0.1278`
  void addPhysicalLocation(
    String? name,
    String? description,
    String? descriptionHtml,
    String? coordinates,
    String? uri,
    String? address,
    String? notes,
  ) {
    final tmp1 = name;
    final tmp7 = description;
    final tmp13 = descriptionHtml;
    final tmp19 = coordinates;
    final tmp25 = uri;
    final tmp31 = address;
    final tmp37 = notes;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp20 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    var tmp24 = 0;
    var tmp26 = 0;
    var tmp28 = 0;
    var tmp29 = 0;
    var tmp30 = 0;
    var tmp32 = 0;
    var tmp34 = 0;
    var tmp35 = 0;
    var tmp36 = 0;
    var tmp38 = 0;
    var tmp40 = 0;
    var tmp41 = 0;
    var tmp42 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    if (tmp19 == null) {
      tmp20 = 0;
    } else {
      tmp20 = 1;
      final tmp21 = tmp19;
      final tmp21_0 = utf8.encode(tmp21);
      tmp23 = tmp21_0.length;

      final ffi.Pointer<ffi.Uint8> tmp22_0 = _api.__allocate(tmp23 * 1, 1);
      final Uint8List tmp22_1 = tmp22_0.asTypedList(tmp23);
      tmp22_1.setAll(0, tmp21_0);
      tmp22 = tmp22_0.address;
      tmp24 = tmp23;
    }
    if (tmp25 == null) {
      tmp26 = 0;
    } else {
      tmp26 = 1;
      final tmp27 = tmp25;
      final tmp27_0 = utf8.encode(tmp27);
      tmp29 = tmp27_0.length;

      final ffi.Pointer<ffi.Uint8> tmp28_0 = _api.__allocate(tmp29 * 1, 1);
      final Uint8List tmp28_1 = tmp28_0.asTypedList(tmp29);
      tmp28_1.setAll(0, tmp27_0);
      tmp28 = tmp28_0.address;
      tmp30 = tmp29;
    }
    if (tmp31 == null) {
      tmp32 = 0;
    } else {
      tmp32 = 1;
      final tmp33 = tmp31;
      final tmp33_0 = utf8.encode(tmp33);
      tmp35 = tmp33_0.length;

      final ffi.Pointer<ffi.Uint8> tmp34_0 = _api.__allocate(tmp35 * 1, 1);
      final Uint8List tmp34_1 = tmp34_0.asTypedList(tmp35);
      tmp34_1.setAll(0, tmp33_0);
      tmp34 = tmp34_0.address;
      tmp36 = tmp35;
    }
    if (tmp37 == null) {
      tmp38 = 0;
    } else {
      tmp38 = 1;
      final tmp39 = tmp37;
      final tmp39_0 = utf8.encode(tmp39);
      tmp41 = tmp39_0.length;

      final ffi.Pointer<ffi.Uint8> tmp40_0 = _api.__allocate(tmp41 * 1, 1);
      final Uint8List tmp40_1 = tmp40_0.asTypedList(tmp41);
      tmp40_1.setAll(0, tmp39_0);
      tmp40 = tmp40_0.address;
      tmp42 = tmp41;
    }
    _api._calendarEventUpdateBuilderAddPhysicalLocation(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
      tmp20,
      tmp22,
      tmp23,
      tmp24,
      tmp26,
      tmp28,
      tmp29,
      tmp30,
      tmp32,
      tmp34,
      tmp35,
      tmp36,
      tmp38,
      tmp40,
      tmp41,
      tmp42,
    );
    return;
  }

  /// set the virtual location details for this calendar event
  /// description_html means by markdown
  void addVirtualLocation(
    String? name,
    String? description,
    String? descriptionHtml,
    String uri,
    String? notes,
  ) {
    final tmp1 = name;
    final tmp7 = description;
    final tmp13 = descriptionHtml;
    final tmp19 = uri;
    final tmp23 = notes;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp20 = 0;
    var tmp21 = 0;
    var tmp22 = 0;
    var tmp24 = 0;
    var tmp26 = 0;
    var tmp27 = 0;
    var tmp28 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    final tmp19_0 = utf8.encode(tmp19);
    tmp21 = tmp19_0.length;

    final ffi.Pointer<ffi.Uint8> tmp20_0 = _api.__allocate(tmp21 * 1, 1);
    final Uint8List tmp20_1 = tmp20_0.asTypedList(tmp21);
    tmp20_1.setAll(0, tmp19_0);
    tmp20 = tmp20_0.address;
    tmp22 = tmp21;
    if (tmp23 == null) {
      tmp24 = 0;
    } else {
      tmp24 = 1;
      final tmp25 = tmp23;
      final tmp25_0 = utf8.encode(tmp25);
      tmp27 = tmp25_0.length;

      final ffi.Pointer<ffi.Uint8> tmp26_0 = _api.__allocate(tmp27 * 1, 1);
      final Uint8List tmp26_1 = tmp26_0.asTypedList(tmp27);
      tmp26_1.setAll(0, tmp25_0);
      tmp26 = tmp26_0.address;
      tmp28 = tmp27;
    }
    _api._calendarEventUpdateBuilderAddVirtualLocation(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
      tmp20,
      tmp21,
      tmp22,
      tmp24,
      tmp26,
      tmp27,
      tmp28,
    );
    return;
  }

  /// clear all locations of this cal event
  void unsetLocations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._calendarEventUpdateBuilderUnsetLocations(tmp0);
    return;
  }

  /// send builder update
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CalendarEventUpdateBuilder_send_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__calendarEventUpdateBuilderSendFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CalendarEventDraft {
  final Api _api;
  final _Box _box;

  CalendarEventDraft._(this._api, this._box);

  /// set the title for this calendar event
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._calendarEventDraftTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the description for this calendar event
  void descriptionText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._calendarEventDraftDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the description html for this calendar event
  void descriptionHtml(String text, String html) {
    final tmp1 = text;
    final tmp5 = html;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._calendarEventDraftDescriptionHtml(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  void unsetDescription() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._calendarEventDraftUnsetDescription(tmp0);
    return;
  }

  /// set the utc_start for this calendar event in rfc3339 format
  void utcStartFromRfc3339(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventDraftUtcStartFromRfc3339(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this calendar event in rfc2822 format
  void utcStartFromRfc2822(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventDraftUtcStartFromRfc2822(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this calendar event in custom format
  void utcStartFromFormat(String utcStart, String format) {
    final tmp1 = utcStart;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._calendarEventDraftUtcStartFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  /// set the utc_end for this calendar event in rfc3339 format
  void utcEndFromRfc3339(String utcEnd) {
    final tmp1 = utcEnd;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventDraftUtcEndFromRfc3339(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_end for this calendar event in rfc2822 format
  void utcEndFromRfc2822(String utcEnd) {
    final tmp1 = utcEnd;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._calendarEventDraftUtcEndFromRfc2822(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_end for this calendar event in custom format
  void utcEndFromFormat(String utcEnd, String format) {
    final tmp1 = utcEnd;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._calendarEventDraftUtcEndFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  /// set the physical location details for this calendar event
  /// description_html means by markdown
  /// coordinates follows RFC 5870, for example `geo:51.5074,-0.1278`
  void addPhysicalLocation(
    String? name,
    String? description,
    String? descriptionHtml,
    String? coordinates,
    String? uri,
    String? address,
    String? notes,
  ) {
    final tmp1 = name;
    final tmp7 = description;
    final tmp13 = descriptionHtml;
    final tmp19 = coordinates;
    final tmp25 = uri;
    final tmp31 = address;
    final tmp37 = notes;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp20 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    var tmp24 = 0;
    var tmp26 = 0;
    var tmp28 = 0;
    var tmp29 = 0;
    var tmp30 = 0;
    var tmp32 = 0;
    var tmp34 = 0;
    var tmp35 = 0;
    var tmp36 = 0;
    var tmp38 = 0;
    var tmp40 = 0;
    var tmp41 = 0;
    var tmp42 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    if (tmp19 == null) {
      tmp20 = 0;
    } else {
      tmp20 = 1;
      final tmp21 = tmp19;
      final tmp21_0 = utf8.encode(tmp21);
      tmp23 = tmp21_0.length;

      final ffi.Pointer<ffi.Uint8> tmp22_0 = _api.__allocate(tmp23 * 1, 1);
      final Uint8List tmp22_1 = tmp22_0.asTypedList(tmp23);
      tmp22_1.setAll(0, tmp21_0);
      tmp22 = tmp22_0.address;
      tmp24 = tmp23;
    }
    if (tmp25 == null) {
      tmp26 = 0;
    } else {
      tmp26 = 1;
      final tmp27 = tmp25;
      final tmp27_0 = utf8.encode(tmp27);
      tmp29 = tmp27_0.length;

      final ffi.Pointer<ffi.Uint8> tmp28_0 = _api.__allocate(tmp29 * 1, 1);
      final Uint8List tmp28_1 = tmp28_0.asTypedList(tmp29);
      tmp28_1.setAll(0, tmp27_0);
      tmp28 = tmp28_0.address;
      tmp30 = tmp29;
    }
    if (tmp31 == null) {
      tmp32 = 0;
    } else {
      tmp32 = 1;
      final tmp33 = tmp31;
      final tmp33_0 = utf8.encode(tmp33);
      tmp35 = tmp33_0.length;

      final ffi.Pointer<ffi.Uint8> tmp34_0 = _api.__allocate(tmp35 * 1, 1);
      final Uint8List tmp34_1 = tmp34_0.asTypedList(tmp35);
      tmp34_1.setAll(0, tmp33_0);
      tmp34 = tmp34_0.address;
      tmp36 = tmp35;
    }
    if (tmp37 == null) {
      tmp38 = 0;
    } else {
      tmp38 = 1;
      final tmp39 = tmp37;
      final tmp39_0 = utf8.encode(tmp39);
      tmp41 = tmp39_0.length;

      final ffi.Pointer<ffi.Uint8> tmp40_0 = _api.__allocate(tmp41 * 1, 1);
      final Uint8List tmp40_1 = tmp40_0.asTypedList(tmp41);
      tmp40_1.setAll(0, tmp39_0);
      tmp40 = tmp40_0.address;
      tmp42 = tmp41;
    }
    _api._calendarEventDraftAddPhysicalLocation(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
      tmp20,
      tmp22,
      tmp23,
      tmp24,
      tmp26,
      tmp28,
      tmp29,
      tmp30,
      tmp32,
      tmp34,
      tmp35,
      tmp36,
      tmp38,
      tmp40,
      tmp41,
      tmp42,
    );
    return;
  }

  /// set the virtual location details for this calendar event
  /// description_html means by markdown
  void addVirtualLocation(
    String? name,
    String? description,
    String? descriptionHtml,
    String uri,
    String? notes,
  ) {
    final tmp1 = name;
    final tmp7 = description;
    final tmp13 = descriptionHtml;
    final tmp19 = uri;
    final tmp23 = notes;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp20 = 0;
    var tmp21 = 0;
    var tmp22 = 0;
    var tmp24 = 0;
    var tmp26 = 0;
    var tmp27 = 0;
    var tmp28 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    final tmp19_0 = utf8.encode(tmp19);
    tmp21 = tmp19_0.length;

    final ffi.Pointer<ffi.Uint8> tmp20_0 = _api.__allocate(tmp21 * 1, 1);
    final Uint8List tmp20_1 = tmp20_0.asTypedList(tmp21);
    tmp20_1.setAll(0, tmp19_0);
    tmp20 = tmp20_0.address;
    tmp22 = tmp21;
    if (tmp23 == null) {
      tmp24 = 0;
    } else {
      tmp24 = 1;
      final tmp25 = tmp23;
      final tmp25_0 = utf8.encode(tmp25);
      tmp27 = tmp25_0.length;

      final ffi.Pointer<ffi.Uint8> tmp26_0 = _api.__allocate(tmp27 * 1, 1);
      final Uint8List tmp26_1 = tmp26_0.asTypedList(tmp27);
      tmp26_1.setAll(0, tmp25_0);
      tmp26 = tmp26_0.address;
      tmp28 = tmp27;
    }
    _api._calendarEventDraftAddVirtualLocation(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
      tmp20,
      tmp21,
      tmp22,
      tmp24,
      tmp26,
      tmp27,
      tmp28,
    );
    return;
  }

  /// create this calendar event
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._calendarEventDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CalendarEventDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__calendarEventDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class EventLocationInfo {
  final Api _api;
  final _Box _box;

  EventLocationInfo._(this._api, this._box);

  /// either of `Physical` or `Virtual`
  String locationType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoLocationType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the name of location
  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// get the location description
  TextMessageContent? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TextMessageContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TextMessageContent._(_api, tmp4_1);
    return tmp2;
  }

  /// geo uri for the location
  String? coordinates() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoCoordinates(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// an online link for the location
  String? uri() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoUri(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for physical event only
  String? address() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoAddress(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for both physical and virtual
  String? notes() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventLocationInfoNotes(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RsvpManager {
  final Api _api;
  final _Box _box;

  RsvpManager._(this._api, this._box);

  /// whether manager has rsvp entries
  bool hasRsvpEntries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerHasRsvpEntries(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get total rsvp count
  int totalRsvpCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerTotalRsvpCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// get rsvp entries
  Future<FfiListRsvp> rsvpEntries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerRsvpEntries(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__RsvpManager_rsvp_entries_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__rsvpManagerRsvpEntriesFuturePoll);
    return tmp2;
  }

  /// get Yes/Maybe/No or None for the user’s own status
  Future<OptionRsvpStatus> respondedByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerRespondedByMe(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__RsvpManager_responded_by_me_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__rsvpManagerRespondedByMeFuturePoll,
    );
    return tmp2;
  }

  /// get the count of Yes/Maybe/No
  Future<int> countAtStatus(String status) {
    final tmp1 = status;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._rsvpManagerCountAtStatus(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__RsvpManager_count_at_status_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__rsvpManagerCountAtStatusFuturePoll,
    );
    return tmp6;
  }

  /// get the user-ids that have responded for Yes/Maybe/No
  Future<FfiListUserId> usersAtStatus(String status) {
    final tmp1 = status;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._rsvpManagerUsersAtStatus(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__RsvpManager_users_at_status_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__rsvpManagerUsersAtStatusFuturePoll,
    );
    return tmp6;
  }

  /// create rsvp draft
  RsvpDraft rsvpDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerRsvpDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_RsvpDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = RsvpDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// get informed about changes to this manager
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__RsvpManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__rsvpManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RsvpDraft {
  final Api _api;
  final _Box _box;

  RsvpDraft._(this._api, this._box);

  /// set status of this RSVP
  void status(String status) {
    final tmp1 = status;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._rsvpDraftStatus(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// create this RSVP
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__RsvpDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__rsvpDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Rsvp {
  final Api _api;
  final _Box _box;

  Rsvp._(this._api, this._box);

  /// get sender of this rsvp
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// get timestamp of this rsvp
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// get status of this rsvp
  String status() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._rsvpStatus(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ReactionManager {
  final Api _api;
  final _Box _box;

  ReactionManager._(this._api, this._box);

  /// get count sent like by me and other people
  int likesCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerLikesCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// whether I sent like
  bool likedByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerLikedByMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether I reacted using symbol key
  bool reactedByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerReactedByMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether manager has reaction entries
  bool hasReactionEntries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerHasReactionEntries(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get total count of reactions
  int totalReactionCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerTotalReactionCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// get reaction entries
  Future<FfiListReaction> reactionEntries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerReactionEntries(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReactionManager_reaction_entries_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__reactionManagerReactionEntriesFuturePoll,
    );
    return tmp2;
  }

  /// send a like
  Future<EventId> sendLike() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerSendLike(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReactionManager_send_like_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__reactionManagerSendLikeFuturePoll,
    );
    return tmp2;
  }

  /// send the reaction using symbol key
  Future<EventId> sendReaction(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._reactionManagerSendReaction(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__ReactionManager_send_reaction_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__reactionManagerSendReactionFuturePoll,
    );
    return tmp6;
  }

  /// remove the like
  Future<EventId> redactLike(String? reason, String? txnId) {
    final tmp1 = reason;
    final tmp7 = txnId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    final tmp13 = _api._reactionManagerRedactLike(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
    );
    final tmp15 = tmp13;
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__ReactionManager_redact_like_future_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp14 = _nativeFuture(
      tmp15_1,
      _api.__reactionManagerRedactLikeFuturePoll,
    );
    return tmp14;
  }

  /// remove the reaction using symbol key
  Future<EventId> redactReaction(
    String senderId,
    String key,
    String? reason,
    String? txnId,
  ) {
    final tmp1 = senderId;
    final tmp5 = key;
    final tmp9 = reason;
    final tmp15 = txnId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp20 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    if (tmp9 == null) {
      tmp10 = 0;
    } else {
      tmp10 = 1;
      final tmp11 = tmp9;
      final tmp11_0 = utf8.encode(tmp11);
      tmp13 = tmp11_0.length;

      final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
      final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
      tmp12_1.setAll(0, tmp11_0);
      tmp12 = tmp12_0.address;
      tmp14 = tmp13;
    }
    if (tmp15 == null) {
      tmp16 = 0;
    } else {
      tmp16 = 1;
      final tmp17 = tmp15;
      final tmp17_0 = utf8.encode(tmp17);
      tmp19 = tmp17_0.length;

      final ffi.Pointer<ffi.Uint8> tmp18_0 = _api.__allocate(tmp19 * 1, 1);
      final Uint8List tmp18_1 = tmp18_0.asTypedList(tmp19);
      tmp18_1.setAll(0, tmp17_0);
      tmp18 = tmp18_0.address;
      tmp20 = tmp19;
    }
    final tmp21 = _api._reactionManagerRedactReaction(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp12,
      tmp13,
      tmp14,
      tmp16,
      tmp18,
      tmp19,
      tmp20,
    );
    final tmp23 = tmp21;
    final ffi.Pointer<ffi.Void> tmp23_0 = ffi.Pointer.fromAddress(tmp23);
    final tmp23_1 = _Box(
      _api,
      tmp23_0,
      "__ReactionManager_redact_reaction_future_drop",
    );
    tmp23_1._finalizer = _api._registerFinalizer(tmp23_1);
    final tmp22 = _nativeFuture(
      tmp23_1,
      _api.__reactionManagerRedactReactionFuturePoll,
    );
    return tmp22;
  }

  /// get informed about changes to this manager
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReactionManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__reactionManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// get informed about changes to this manager
  Future<ReactionManager> reload() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionManagerReload(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__ReactionManager_reload_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__reactionManagerReloadFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Reaction {
  final Api _api;
  final _Box _box;

  Reaction._(this._api, this._box);

  /// event id of reaction event
  String eventIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionEventIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get sender of this reaction
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// get timestamp of this reaction
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// the event id to which it is reacted
  String relatesTo() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionRelatesTo(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ReadReceiptsManager {
  final Api _api;
  final _Box _box;

  ReadReceiptsManager._(this._api, this._box);

  /// mark this as read for the others in the room to know
  Future<bool> announceRead() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._readReceiptsManagerAnnounceRead(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReadReceiptsManager_announce_read_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__readReceiptsManagerAnnounceReadFuturePoll,
    );
    return tmp2;
  }

  /// total of users that announced they had seen this
  int readCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._readReceiptsManagerReadCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// whether I have already marked this as read, publicly or privately
  bool readByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._readReceiptsManagerReadByMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get informed about changes to this manager
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._readReceiptsManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReadReceiptsManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__readReceiptsManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// reload this manager
  Future<ReadReceiptsManager> reload() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._readReceiptsManagerReload(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ReadReceiptsManager_reload_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__readReceiptsManagerReloadFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Sending state of outgoing message.
class EventSendState {
  final Api _api;
  final _Box _box;

  EventSendState._(this._api, this._box);

  /// one of NotSentYet/SendingFailed/Cancelled/Sent
  String state() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventSendStateState(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// gives error value for SendingFailed only
  String? error() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventSendStateError(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// gives event id for Sent only
  EventId? eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventSendStateEventId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_EventId");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = EventId._(_api, tmp4_1);
    return tmp2;
  }

  Future<bool> abort() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventSendStateAbort(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__EventSendState_abort_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__eventSendStateAbortFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A room Message metadata and content
class TimelineEventItem {
  final Api _api;
  final _Box _box;

  TimelineEventItem._(this._api, this._box);

  /// The User, who sent that event
  String sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemSender(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Send state of the message to server
  /// valid only when initialized from timeline event item
  EventSendState? sendState() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemSendState(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_EventSendState");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = EventSendState._(_api, tmp4_1);
    return tmp2;
  }

  /// the server receiving timestamp in milliseconds
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// one of Message/Redaction/UnableToDecrypt/FailedToParseMessageLike/FailedToParseState
  String eventType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemEventType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// ID of this event
  String? eventId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemEventId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the type of massage, like text, image, audio, video, file etc
  String? msgType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemMsgType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// covers text/image/audio/video/file/location/emote
  MsgContent? msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemMsgContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers some of m.room.member
  MembershipContent? membershipContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemMembershipContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MembershipContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MembershipContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers some of m.room.member
  ProfileContent? profileContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemProfileContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ProfileContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ProfileContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.room
  PolicyRuleRoomContent? policyRuleRoomContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemPolicyRuleRoomContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleRoomContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleRoomContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.server
  PolicyRuleServerContent? policyRuleServerContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemPolicyRuleServerContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleServerContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleServerContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.user
  PolicyRuleUserContent? policyRuleUserContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemPolicyRuleUserContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleUserContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleUserContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.avatar
  RoomAvatarContent? roomAvatarContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomAvatarContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomAvatarContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomAvatarContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.create
  RoomCreateContent? roomCreateContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomCreateContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomCreateContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomCreateContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.encryption
  RoomEncryptionContent? roomEncryptionContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomEncryptionContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomEncryptionContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomEncryptionContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.guest_access
  RoomGuestAccessContent? roomGuestAccessContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomGuestAccessContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomGuestAccessContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomGuestAccessContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.history_visibility
  RoomHistoryVisibilityContent? roomHistoryVisibilityContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomHistoryVisibilityContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomHistoryVisibilityContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomHistoryVisibilityContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.join_rules
  RoomJoinRulesContent? roomJoinRulesContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomJoinRulesContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomJoinRulesContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomJoinRulesContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.name
  RoomNameContent? roomNameContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomNameContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomNameContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomNameContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.pinned_events
  RoomPinnedEventsContent? roomPinnedEventsContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomPinnedEventsContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomPinnedEventsContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomPinnedEventsContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.power_levels
  RoomPowerLevelsContent? roomPowerLevelsContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomPowerLevelsContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomPowerLevelsContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomPowerLevelsContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.server_acl
  RoomServerAclContent? roomServerAclContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomServerAclContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomServerAclContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomServerAclContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.tombstone
  RoomTombstoneContent? roomTombstoneContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomTombstoneContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomTombstoneContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomTombstoneContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.topic
  RoomTopicContent? roomTopicContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomTopicContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomTopicContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomTopicContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.space.child
  SpaceChildContent? spaceChildContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemSpaceChildContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_SpaceChildContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = SpaceChildContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.space.parent
  SpaceParentContent? spaceParentContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemSpaceParentContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_SpaceParentContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = SpaceParentContent._(_api, tmp4_1);
    return tmp2;
  }

  /// Whether the whole room is mentioned.
  bool roomMentioned() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemRoomMentioned(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// The list of mentioned users.
  /// Available only when sender didn’t mention the whole room
  FfiListFfiString mentionedUsers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemMentionedUsers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// original event id, if this msg is reply to another msg
  String? inReplyToId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemInReplyToId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// original event, if this msg is reply to another msg and the event was loaded
  TimelineEventItem? inReplyToEvent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemInReplyToEvent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TimelineEventItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TimelineEventItem._(_api, tmp4_1);
    return tmp2;
  }

  /// the list of users that read this message
  FfiListFfiString readUsers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemReadUsers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// the details that users read this message
  int? receiptTs(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._timelineEventItemReceiptTs(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    if (tmp7 == 0) {
      return null;
    }
    final tmp6 = tmp8;
    return tmp6;
  }

  /// the emote key list that users reacted about this message
  FfiListFfiString reactionKeys() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemReactionKeys(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// the details that users reacted using this emote key in this message
  FfiListReactionRecord? reactionRecords(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._timelineEventItemReactionRecords(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    if (tmp7 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
    final tmp8_1 = _Box(_api, tmp8_0, "drop_box_FfiListReactionRecord");
    tmp8_1._finalizer = _api._registerFinalizer(tmp8_1);
    final tmp9 = FfiListReactionRecord._(_api, tmp8_1);
    final tmp6 = tmp9;
    return tmp6;
  }

  /// Whether current user wrote this message and can modify it
  bool isEditable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemIsEditable(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Whether this message was modified by author
  bool wasEdited() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineEventItemWasEdited(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TimelineVirtualItem {
  final Api _api;
  final _Box _box;

  TimelineVirtualItem._(this._api, this._box);

  /// DayDivider or ReadMarker
  String eventType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineVirtualItemEventType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// contains description text
  String? desc() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineVirtualItemDesc(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// A room Message metadata and content
class TimelineItem {
  final Api _api;
  final _Box _box;

  TimelineItem._(this._api, this._box);

  /// true if virtual, false if event
  bool isVirtual() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemIsVirtual(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Unique ID of this event
  String uniqueId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemUniqueId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// valid only if is_virtual = false
  TimelineEventItem? eventItem() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemEventItem(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TimelineEventItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TimelineEventItem._(_api, tmp4_1);
    return tmp2;
  }

  /// valid only if is_virtual = true
  TimelineVirtualItem? virtualItem() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemVirtualItem(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TimelineVirtualItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TimelineVirtualItem._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class MsgContent {
  final Api _api;
  final _Box _box;

  MsgContent._(this._api, this._box);

  /// available always
  String body() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentBody(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// available for text msg
  String? formattedBody() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentFormattedBody(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for image/audio/video/file msg
  MediaSource? source() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentSource(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MediaSource");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MediaSource._(_api, tmp4_1);
    return tmp2;
  }

  /// available for image/audio/video/file msg
  String? mimetype() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentMimetype(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for image/audio/video/file msg
  int? size() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentSize(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// available for image/video msg
  int? width() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentWidth(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// available for image/video msg
  int? height() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentHeight(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// available for image/video/file/location msg
  MediaSource? thumbnailSource() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentThumbnailSource(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MediaSource");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MediaSource._(_api, tmp4_1);
    return tmp2;
  }

  /// available for image/video/file/location msg
  ThumbnailInfo? thumbnailInfo() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentThumbnailInfo(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ThumbnailInfo");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ThumbnailInfo._(_api, tmp4_1);
    return tmp2;
  }

  /// available for audio/video msg
  int? duration() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentDuration(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// available for image/video msg
  String? blurhash() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentBlurhash(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for file msg
  String? filename() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentFilename(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// available for location msg
  /// geo_uri follows RFC 5870, for example `geo:51.5074,-0.1278`
  String? geoUri() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentGeoUri(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// whether or not this has url previews attached
  bool hasUrlPreviews() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentHasUrlPreviews(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// the list of url previews
  FfiListUrlPreview urlPreviews() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgContentUrlPreviews(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListUrlPreview");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListUrlPreview._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class MembershipContent {
  final Api _api;
  final _Box _box;

  MembershipContent._(this._api, this._box);

  /// The ID of the user whose profile changed.
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._membershipContentUserId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// The membership change induced by this event.
  String change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._membershipContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ProfileContent {
  final Api _api;
  final _Box _box;

  ProfileContent._(this._api, this._box);

  /// The ID of the user whose profile changed
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentUserId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// The display name change induced by this event
  String? displayNameChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentDisplayNameChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// The old value of display name change
  String? displayNameOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentDisplayNameOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// The new value of display name change
  String? displayNameNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentDisplayNameNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// The avatar url change induced by this event
  String? avatarUrlChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentAvatarUrlChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// The old value of avatar url change
  MxcUri? avatarUrlOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentAvatarUrlOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MxcUri");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MxcUri._(_api, tmp4_1);
    return tmp2;
  }

  /// The new value of avatar url change
  MxcUri? avatarUrlNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._profileContentAvatarUrlNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MxcUri");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MxcUri._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ReactionRecord {
  final Api _api;
  final _Box _box;

  ReactionRecord._(this._api, this._box);

  /// who sent reaction
  UserId senderId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionRecordSenderId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// when reaction was sent
  int timestamp() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionRecordTimestamp(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// whether I am the sender of this reaction
  bool sentByMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._reactionRecordSentByMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TimelineItemDiff {
  final Api _api;
  final _Box _box;

  TimelineItemDiff._(this._api, this._box);

  /// Append/Insert/Set/Remove/PushBack/PushFront/PopBack/PopFront/Clear/Reset
  String action() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemDiffAction(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// for Append/Reset
  FfiListTimelineItem? values() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemDiffValues(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListTimelineItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListTimelineItem._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// for Insert/Set/Remove
  int? index() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemDiffIndex(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// for Insert/Set/PushBack/PushFront
  TimelineItem? value() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineItemDiffValue(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TimelineItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TimelineItem._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class JoinRuleBuilder {
  final Api _api;
  final _Box _box;

  JoinRuleBuilder._(this._api, this._box);

  void joinRule(String input) {
    final tmp1 = input;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._joinRuleBuilderJoinRule(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void addRoom(String room) {
    final tmp1 = room;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._joinRuleBuilderAddRoom(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PolicyRuleRoomContent {
  final Api _api;
  final _Box _box;

  PolicyRuleRoomContent._(this._api, this._box);

  String? entityChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentEntityChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String entityNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentEntityNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? entityOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentEntityOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? reasonChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentReasonChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String reasonNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentReasonNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? reasonOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentReasonOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentRecommendationChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String recommendationNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentRecommendationNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleRoomContentRecommendationOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PolicyRuleServerContent {
  final Api _api;
  final _Box _box;

  PolicyRuleServerContent._(this._api, this._box);

  String? entityChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentEntityChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String entityNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentEntityNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? entityOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentEntityOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? reasonChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentReasonChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String reasonNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentReasonNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? reasonOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentReasonOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentRecommendationChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String recommendationNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentRecommendationNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleServerContentRecommendationOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PolicyRuleUserContent {
  final Api _api;
  final _Box _box;

  PolicyRuleUserContent._(this._api, this._box);

  String? entityChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentEntityChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String entityNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentEntityNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? entityOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentEntityOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? reasonChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentReasonChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String reasonNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentReasonNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? reasonOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentReasonOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentRecommendationChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String recommendationNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentRecommendationNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? recommendationOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._policyRuleUserContentRecommendationOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomAvatarContent {
  final Api _api;
  final _Box _box;

  RoomAvatarContent._(this._api, this._box);

  String? urlChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomAvatarContentUrlChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? urlNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomAvatarContentUrlNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? urlOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomAvatarContentUrlOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomCreateContent {
  final Api _api;
  final _Box _box;

  RoomCreateContent._(this._api, this._box);

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomEncryptionContent {
  final Api _api;
  final _Box _box;

  RoomEncryptionContent._(this._api, this._box);

  String? algorithmChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomEncryptionContentAlgorithmChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String algorithmNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomEncryptionContentAlgorithmNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? algorithmOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomEncryptionContentAlgorithmOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomGuestAccessContent {
  final Api _api;
  final _Box _box;

  RoomGuestAccessContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomGuestAccessContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomGuestAccessContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomGuestAccessContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomHistoryVisibilityContent {
  final Api _api;
  final _Box _box;

  RoomHistoryVisibilityContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomHistoryVisibilityContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomHistoryVisibilityContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomHistoryVisibilityContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomJoinRulesContent {
  final Api _api;
  final _Box _box;

  RoomJoinRulesContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomJoinRulesContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomJoinRulesContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomJoinRulesContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomNameContent {
  final Api _api;
  final _Box _box;

  RoomNameContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomNameContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomNameContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomNameContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomPinnedEventsContent {
  final Api _api;
  final _Box _box;

  RoomPinnedEventsContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPinnedEventsContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPinnedEventsContentNewVal(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  FfiListFfiString? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPinnedEventsContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListFfiString");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListFfiString._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomPowerLevelsContent {
  final Api _api;
  final _Box _box;

  RoomPowerLevelsContent._(this._api, this._box);

  String? banChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentBanChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int banNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentBanNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? banOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentBanOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? eventsChange(String eventType) {
    final tmp1 = eventType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomPowerLevelsContentEventsChange(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp8_ptr = ffi.Pointer.fromAddress(tmp8);
    List<int> tmp8_buf = [];
    final tmp8_precast = tmp8_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp9; i++) {
      int char = tmp8_precast.elementAt(i).value;
      tmp8_buf.add(char);
    }
    final tmp6 = utf8.decode(tmp8_buf, allowMalformed: true);
    if (tmp10 > 0) {
      final ffi.Pointer<ffi.Void> tmp8_0;
      tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      _api.__deallocate(tmp8_0, tmp10 * 1, 1);
    }
    return tmp6;
  }

  int? eventsNewVal(String eventType) {
    final tmp1 = eventType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomPowerLevelsContentEventsNewVal(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    if (tmp7 == 0) {
      return null;
    }
    final tmp6 = tmp8;
    return tmp6;
  }

  int? eventsOldVal(String eventType) {
    final tmp1 = eventType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomPowerLevelsContentEventsOldVal(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    if (tmp7 == 0) {
      return null;
    }
    final tmp6 = tmp8;
    return tmp6;
  }

  String? eventsDefaultChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentEventsDefaultChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int eventsDefaultNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentEventsDefaultNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? eventsDefaultOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentEventsDefaultOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? inviteChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentInviteChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int inviteNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentInviteNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? inviteOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentInviteOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? kickChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentKickChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int kickNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentKickNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? kickOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentKickOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? notificationsChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentNotificationsChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int notificationsNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentNotificationsNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? notificationsOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentNotificationsOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? redactChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentRedactChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int redactNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentRedactNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? redactOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentRedactOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? stateDefaultChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentStateDefaultChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int stateDefaultNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentStateDefaultNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? stateDefaultOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentStateDefaultOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String? usersChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentUsersChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? usersDefaultChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentUsersDefaultChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int usersDefaultNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentUsersDefaultNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int? usersDefaultOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsContentUsersDefaultOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomServerAclContent {
  final Api _api;
  final _Box _box;

  RoomServerAclContent._(this._api, this._box);

  String? allowIpLiteralsChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowIpLiteralsChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool allowIpLiteralsNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowIpLiteralsNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool? allowIpLiteralsOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowIpLiteralsOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  String? allowChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString allowNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowNewVal(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  FfiListFfiString? allowOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentAllowOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListFfiString");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListFfiString._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  String? denyChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentDenyChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString denyNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentDenyNewVal(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  FfiListFfiString? denyOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomServerAclContentDenyOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListFfiString");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListFfiString._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomTombstoneContent {
  final Api _api;
  final _Box _box;

  RoomTombstoneContent._(this._api, this._box);

  String? bodyChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentBodyChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String bodyNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentBodyNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? bodyOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentBodyOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? replacementRoomChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentReplacementRoomChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String replacementRoomNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentReplacementRoomNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? replacementRoomOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTombstoneContentReplacementRoomOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomTopicContent {
  final Api _api;
  final _Box _box;

  RoomTopicContent._(this._api, this._box);

  String? change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTopicContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTopicContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? oldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTopicContentOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SpaceChildContent {
  final Api _api;
  final _Box _box;

  SpaceChildContent._(this._api, this._box);

  RoomId roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentRoomId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_RoomId");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = RoomId._(_api, tmp7_1);
    return tmp2;
  }

  String? viaChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentViaChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString viaNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentViaNewVal(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  FfiListFfiString? viaOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentViaOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListFfiString");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListFfiString._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  String? orderChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentOrderChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? orderNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentOrderNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? orderOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentOrderOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? suggestedChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentSuggestedChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool suggestedNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentSuggestedNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool? suggestedOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceChildContentSuggestedOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SpaceParentContent {
  final Api _api;
  final _Box _box;

  SpaceParentContent._(this._api, this._box);

  RoomId roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentRoomId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_RoomId");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = RoomId._(_api, tmp7_1);
    return tmp2;
  }

  String? viaChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentViaChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString viaNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentViaNewVal(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  FfiListFfiString? viaOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentViaOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListFfiString");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListFfiString._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  String? canonicalChange() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentCanonicalChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool canonicalNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentCanonicalNewVal(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool? canonicalOldVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceParentContentCanonicalOldVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Generic Room Properties
class Room {
  final Api _api;
  final _Box _box;

  Room._(this._api, this._box);

  /// the RoomId as a String
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// whether to have avatar
  bool hasAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomHasAvatar(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the binary data of avatar
  /// if thumb size is given, avatar thumbnail is returned
  /// if thumb size is not given, avatar file is returned
  Future<OptionBuffer> avatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._roomAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomAvatarFuturePoll);
    return tmp6;
  }

  /// get the display name
  Future<OptionString> displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomDisplayName(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_display_name_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomDisplayNameFuturePoll);
    return tmp2;
  }

  /// Whether new updates have been received for this room
  Stream<bool> subscribeToUpdates() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomSubscribeToUpdates(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Room_subscribe_to_updates_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__roomSubscribeToUpdatesStreamPoll);
    return tmp2;
  }

  /// whether this is a Space
  bool isSpace() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomIsSpace(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// the JoinRule as a String
  String joinRuleStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomJoinRuleStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// if set to restricted or restricted_knock the rooms this is restricted to
  FfiListFfiString restrictedRoomIdsStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomRestrictedRoomIdsStr(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// set the join rule.
  Future<bool> setJoinRule(JoinRuleBuilder joinRuleBuilder) {
    final tmp1 = joinRuleBuilder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._roomSetJoinRule(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Room_set_join_rule_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__roomSetJoinRuleFuturePoll);
    return tmp4;
  }

  /// whether we are part of this room
  bool isJoined() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomIsJoined(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the room profile that contains avatar and display name
  Future<SpaceRelations> spaceRelations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomSpaceRelations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_space_relations_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomSpaceRelationsFuturePoll);
    return tmp2;
  }

  /// Whether this is a direct message (in chat)
  Future<bool> isDirect() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomIsDirect(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_is_direct_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomIsDirectFuturePoll);
    return tmp2;
  }

  /// add the following as a parent room and return event id of that event
  /// room can have multiple parents
  Future<String> addParentRoom(String roomId, bool canonical) {
    final tmp1 = roomId;
    final tmp5 = canonical;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5 ? 1 : 0;
    final tmp7 = _api._roomAddParentRoom(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Room_add_parent_room_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__roomAddParentRoomFuturePoll);
    return tmp8;
  }

  /// remove a parent room
  Future<bool> removeParentRoom(String roomId, String? reason) {
    final tmp1 = roomId;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._roomRemoveParentRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__Room_remove_parent_room_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__roomRemoveParentRoomFuturePoll);
    return tmp12;
  }

  /// add the child room and return event id of that event
  /// order: Must consist of ASCII characters within the range \x20 (space) and \x7E (~), inclusive.
  Future<String> addChildRoom(String roomId, String? order, bool suggested) {
    final tmp1 = roomId;
    final tmp5 = order;
    final tmp11 = suggested;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    tmp12 = tmp11 ? 1 : 0;
    final tmp13 = _api._roomAddChildRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
      tmp12,
    );
    final tmp15 = tmp13;
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(_api, tmp15_0, "__Room_add_child_room_future_drop");
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp14 = _nativeFuture(tmp15_1, _api.__roomAddChildRoomFuturePoll);
    return tmp14;
  }

  /// remove the child room
  Future<bool> removeChildRoom(String roomId, String? reason) {
    final tmp1 = roomId;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._roomRemoveChildRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(_api, tmp13_0, "__Room_remove_child_room_future_drop");
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__roomRemoveChildRoomFuturePoll);
    return tmp12;
  }

  /// the Membership of myself
  Future<Member> getMyMembership() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomGetMyMembership(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_get_my_membership_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomGetMyMembershipFuturePoll);
    return tmp2;
  }

  /// the members currently in the room
  Future<FfiListFfiString> activeMembersIds() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomActiveMembersIds(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_active_members_ids_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomActiveMembersIdsFuturePoll);
    return tmp2;
  }

  /// the members currently in the room
  Future<FfiListMember> activeMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomActiveMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_active_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomActiveMembersFuturePoll);
    return tmp2;
  }

  /// the members invited to this room
  Future<FfiListMember> invitedMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitedMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_invited_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomInvitedMembersFuturePoll);
    return tmp2;
  }

  /// get the room member by user id
  Future<Member> getMember(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomGetMember(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_get_member_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomGetMemberFuturePoll);
    return tmp6;
  }

  /// invite the new user to this room
  Future<bool> inviteUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomInviteUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_invite_user_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomInviteUserFuturePoll);
    return tmp6;
  }

  /// RoomNotificationMode for this room
  Future<String> notificationMode() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomNotificationMode(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_notification_mode_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomNotificationModeFuturePoll);
    return tmp2;
  }

  /// default RoomNotificationMode for this type of room
  Future<String> defaultNotificationMode() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomDefaultNotificationMode(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Room_default_notification_mode_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__roomDefaultNotificationModeFuturePoll,
    );
    return tmp2;
  }

  /// Unset the `mute` for this room.
  Future<bool> unmute() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomUnmute(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_unmute_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomUnmuteFuturePoll);
    return tmp2;
  }

  /// set the RoomNotificationMode
  Future<bool> setNotificationMode(String? newMode) {
    final tmp1 = newMode;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    final tmp7 = _api._roomSetNotificationMode(tmp0, tmp2, tmp4, tmp5, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__Room_set_notification_mode_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__roomSetNotificationModeFuturePoll,
    );
    return tmp8;
  }

  /// update the power levels of specified member
  Future<EventId> updatePowerLevel(String userId, int level) {
    final tmp1 = userId;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._roomUpdatePowerLevel(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Room_update_power_level_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__roomUpdatePowerLevelFuturePoll);
    return tmp8;
  }

  /// Change the avatar of the room
  Future<MxcUri> uploadAvatar(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomUploadAvatar(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_upload_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomUploadAvatarFuturePoll);
    return tmp6;
  }

  /// Remove the avatar of the room
  Future<EventId> removeAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomRemoveAvatar(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_remove_avatar_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomRemoveAvatarFuturePoll);
    return tmp2;
  }

  /// what is the description / topic
  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// set description / topic of the room
  Future<EventId> setTopic(String topic) {
    final tmp1 = topic;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomSetTopic(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_set_topic_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomSetTopicFuturePoll);
    return tmp6;
  }

  /// set name of the room
  Future<EventId> setName(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._roomSetName(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Room_set_name_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomSetNameFuturePoll);
    return tmp6;
  }

  /// leave this room
  Future<bool> leave() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomLeave(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_leave_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomLeaveFuturePoll);
    return tmp2;
  }

  /// user settings for this room
  Future<UserRoomSettings> userSettings() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomUserSettings(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Room_user_settings_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomUserSettingsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class UserRoomSettings {
  final Api _api;
  final _Box _box;

  UserRoomSettings._(this._api, this._box);

  /// whether or not the user has already seen the suggested
  /// children
  bool hasSeenSuggested() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userRoomSettingsHasSeenSuggested(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Set the value of `has_seen_suggested` for this room
  Future<bool> setHasSeenSuggested(bool newValue) {
    final tmp1 = newValue;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._userRoomSettingsSetHasSeenSuggested(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__UserRoomSettings_set_has_seen_suggested_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__userRoomSettingsSetHasSeenSuggestedFuturePoll,
    );
    return tmp4;
  }

  /// whether or not the user wants to include this in the
  /// calendar sync
  bool includeCalSync() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userRoomSettingsIncludeCalSync(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Set the value of `include_cal_sync` for this room
  Future<bool> setIncludeCalSync(bool newValue) {
    final tmp1 = newValue;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._userRoomSettingsSetIncludeCalSync(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__UserRoomSettings_set_include_cal_sync_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__userRoomSettingsSetIncludeCalSyncFuturePoll,
    );
    return tmp4;
  }

  /// Trigger when this object needs to be refreshed
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._userRoomSettingsSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__UserRoomSettings_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__userRoomSettingsSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ConvoDiff {
  final Api _api;
  final _Box _box;

  ConvoDiff._(this._api, this._box);

  /// Append/Insert/Set/Remove/PushBack/PushFront/PopBack/PopFront/Clear/Reset
  String action() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoDiffAction(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// for Append/Reset
  FfiListConvo? values() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoDiffValues(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListConvo");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListConvo._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// for Insert/Set/Remove
  int? index() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoDiffIndex(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// for Insert/Set/PushBack/PushFront
  Convo? value() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoDiffValue(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Convo");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Convo._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SpaceDiff {
  final Api _api;
  final _Box _box;

  SpaceDiff._(this._api, this._box);

  /// Append/Insert/Set/Remove/PushBack/PushFront/PopBack/PopFront/Clear/Reset
  String action() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceDiffAction(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// for Append/Reset
  FfiListSpace? values() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceDiffValues(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_FfiListSpace");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp5 = FfiListSpace._(_api, tmp4_1);
    final tmp2 = tmp5;
    return tmp2;
  }

  /// for Insert/Set/Remove
  int? index() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceDiffIndex(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// for Insert/Set/PushBack/PushFront
  Space? value() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceDiffValue(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Space");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Space._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class MsgDraft {
  final Api _api;
  final _Box _box;

  MsgDraft._(this._api, this._box);

  /// add a user mention
  void addMention(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._msgDraftAddMention(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// add a ref details
  void addRefDetails(RefDetails details) {
    final tmp1 = details;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._msgDraftAddRefDetails(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    final tmp7 = tmp3.arg2;
    final tmp8 = tmp3.arg3;
    if (tmp5 == 0) {
      debugAllocation("handle error", tmp6, tmp7);
      final ffi.Pointer<ffi.Uint8> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
      final tmp5_0 = utf8.decode(
        tmp6_0.asTypedList(tmp7),
        allowMalformed: true,
      );
      if (tmp7 > 0) {
        final ffi.Pointer<ffi.Void> tmp6_0;
        tmp6_0 = ffi.Pointer.fromAddress(tmp6);
        _api.__deallocate(tmp6_0, tmp8, 1);
      }
      throw tmp5_0;
    }
    return;
  }

  /// add a url preview
  void addUrlPreview(LocalUrlPreview details) {
    final tmp1 = details;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._msgDraftAddUrlPreview(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    final tmp7 = tmp3.arg2;
    final tmp8 = tmp3.arg3;
    if (tmp5 == 0) {
      debugAllocation("handle error", tmp6, tmp7);
      final ffi.Pointer<ffi.Uint8> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
      final tmp5_0 = utf8.decode(
        tmp6_0.asTypedList(tmp7),
        allowMalformed: true,
      );
      if (tmp7 > 0) {
        final ffi.Pointer<ffi.Void> tmp6_0;
        tmp6_0 = ffi.Pointer.fromAddress(tmp6);
        _api.__deallocate(tmp6_0, tmp8, 1);
      }
      throw tmp5_0;
    }
    return;
  }

  /// whether to mention the entire room
  void addRoomMention(bool mention) {
    final tmp1 = mention;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._msgDraftAddRoomMention(tmp0, tmp2);
    final tmp5 = tmp3.arg0;
    final tmp6 = tmp3.arg1;
    final tmp7 = tmp3.arg2;
    final tmp8 = tmp3.arg3;
    if (tmp5 == 0) {
      debugAllocation("handle error", tmp6, tmp7);
      final ffi.Pointer<ffi.Uint8> tmp6_0 = ffi.Pointer.fromAddress(tmp6);
      final tmp5_0 = utf8.decode(
        tmp6_0.asTypedList(tmp7),
        allowMalformed: true,
      );
      if (tmp7 > 0) {
        final ffi.Pointer<ffi.Void> tmp6_0;
        tmp6_0 = ffi.Pointer.fromAddress(tmp6);
        _api.__deallocate(tmp6_0, tmp8, 1);
      }
      throw tmp5_0;
    }
    return;
  }

  /// available for only image/audio/video/file
  void size(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._msgDraftSize(tmp0, tmp2);
    return;
  }

  /// available for only image/video
  void width(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._msgDraftWidth(tmp0, tmp2);
    return;
  }

  /// available for only image/video
  void height(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._msgDraftHeight(tmp0, tmp2);
    return;
  }

  /// available for only audio/video
  void duration(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._msgDraftDuration(tmp0, tmp2);
    return;
  }

  /// available for only image/video
  void blurhash(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._msgDraftBlurhash(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// Provide the file system path to a static thumbnail
  /// for this media to be read and shared upon sending
  ///
  /// available for only image/video/file/location
  void thumbnailImage(String source, String mimetype) {
    final tmp1 = source;
    final tmp5 = mimetype;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._msgDraftThumbnailImage(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    return;
  }

  /// available for only image/video/file/location
  void thumbnailInfo(int? width, int? height, int? size) {
    final tmp1 = width;
    final tmp5 = height;
    final tmp9 = size;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3;
    }
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    if (tmp9 == null) {
      tmp10 = 0;
    } else {
      tmp10 = 1;
      final tmp11 = tmp9;
      tmp12 = tmp11;
    }
    _api._msgDraftThumbnailInfo(tmp0, tmp2, tmp4, tmp6, tmp8, tmp10, tmp12);
    return;
  }

  /// available for only file
  void filename(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._msgDraftFilename(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// convert this into a NewsSlideDraft;
  NewsSlideDraft intoNewsSlideDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgDraftIntoNewsSlideDraft(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_NewsSlideDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = NewsSlideDraft._(_api, tmp3_1);
    return tmp2;
  }

  /// convert this into a StorySlideDraft;
  StorySlideDraft intoStorySlideDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._msgDraftIntoStorySlideDraft(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_StorySlideDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = StorySlideDraft._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Timeline with Room Events
class TimelineStream {
  final Api _api;
  final _Box _box;

  TimelineStream._(this._api, this._box);

  /// Fires whenever new diff found
  Stream<TimelineItemDiff> messagesStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._timelineStreamMessagesStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__TimelineStream_messages_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__timelineStreamMessagesStreamStreamPoll,
    );
    return tmp2;
  }

  /// get the specific message identified by the event_id
  Future<TimelineItem> getMessage(String eventId) {
    final tmp1 = eventId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._timelineStreamGetMessage(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__TimelineStream_get_message_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__timelineStreamGetMessageFuturePoll,
    );
    return tmp6;
  }

  /// given a message, load its reply details if any
  Future<bool> fetchDetailsForEvent(String eventId) {
    final tmp1 = eventId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._timelineStreamFetchDetailsForEvent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__TimelineStream_fetch_details_for_event_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__timelineStreamFetchDetailsForEventFuturePoll,
    );
    return tmp6;
  }

  /// Get the next count messages backwards, and return whether it reached the end
  Future<bool> paginateBackwards(int count) {
    final tmp1 = count;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._timelineStreamPaginateBackwards(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__TimelineStream_paginate_backwards_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__timelineStreamPaginateBackwardsFuturePoll,
    );
    return tmp4;
  }

  /// send message using draft
  Future<bool> sendMessage(MsgDraft draft) {
    final tmp1 = draft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._timelineStreamSendMessage(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__TimelineStream_send_message_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__timelineStreamSendMessageFuturePoll,
    );
    return tmp4;
  }

  /// modify message using draft
  Future<bool> editMessage(String eventId, MsgDraft draft) {
    final tmp1 = eventId;
    final tmp5 = draft;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5._box.move();
    final tmp7 = _api._timelineStreamEditMessage(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__TimelineStream_edit_message_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__timelineStreamEditMessageFuturePoll,
    );
    return tmp8;
  }

  /// send reply to event
  Future<bool> replyMessage(String eventId, MsgDraft draft) {
    final tmp1 = eventId;
    final tmp5 = draft;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5._box.move();
    final tmp7 = _api._timelineStreamReplyMessage(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__TimelineStream_reply_message_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__timelineStreamReplyMessageFuturePoll,
    );
    return tmp8;
  }

  /// Mark this room as read.
  /// public indicate whether the marking should be shared with other users.
  Future<bool> markAsRead(bool public) {
    final tmp1 = public;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._timelineStreamMarkAsRead(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__TimelineStream_mark_as_read_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__timelineStreamMarkAsReadFuturePoll,
    );
    return tmp4;
  }

  /// send reaction to event
  /// if sent twice, reaction is redacted
  Future<bool> toggleReaction(String eventId, String key) {
    final tmp1 = eventId;
    final tmp5 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._timelineStreamToggleReaction(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__TimelineStream_toggle_reaction_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__timelineStreamToggleReactionFuturePoll,
    );
    return tmp10;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Convo {
  final Api _api;
  final _Box _box;

  Convo._(this._api, this._box);

  /// get the room profile that contains avatar and display name
  Future<SpaceRelations> spaceRelations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoSpaceRelations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_space_relations_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoSpaceRelationsFuturePoll);
    return tmp2;
  }

  /// Change the avatar of the room
  Future<MxcUri> uploadAvatar(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoUploadAvatar(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_upload_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoUploadAvatarFuturePoll);
    return tmp6;
  }

  /// Remove the avatar of the room
  Future<EventId> removeAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoRemoveAvatar(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_remove_avatar_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoRemoveAvatarFuturePoll);
    return tmp2;
  }

  /// what is the description / topic
  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// set the name of the chat
  Future<EventId> setName(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetName(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_name_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetNameFuturePoll);
    return tmp6;
  }

  /// set description / topic of the room
  Future<EventId> setTopic(String topic) {
    final tmp1 = topic;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetTopic(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_topic_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetTopicFuturePoll);
    return tmp6;
  }

  /// the members currently in the convo
  Future<FfiListFfiString> activeMembersIds() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoActiveMembersIds(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_active_members_ids_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoActiveMembersIdsFuturePoll);
    return tmp2;
  }

  /// the members currently in the room
  Future<FfiListMember> activeMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoActiveMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_active_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoActiveMembersFuturePoll);
    return tmp2;
  }

  /// the members invited to this room
  Future<FfiListMember> invitedMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoInvitedMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_invited_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoInvitedMembersFuturePoll);
    return tmp2;
  }

  /// get the room member by user id
  Future<Member> getMember(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoGetMember(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_get_member_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoGetMemberFuturePoll);
    return tmp6;
  }

  /// Get the timeline for the room
  TimelineStream timelineStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoTimelineStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_TimelineStream");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = TimelineStream._(_api, tmp3_1);
    return tmp2;
  }

  /// how many unread notifications for this chat
  int numUnreadNotificationCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoNumUnreadNotificationCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// how many unread messages for this chat
  int numUnreadMessages() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoNumUnreadMessages(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// how many unread mentions for this chat
  int numUnreadMentions() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoNumUnreadMentions(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// The last message sent to the room
  TimelineItem? latestMessage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoLatestMessage(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TimelineItem");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TimelineItem._(_api, tmp4_1);
    return tmp2;
  }

  /// Latest message timestamp or 0
  int latestMessageTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoLatestMessageTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// the Membership of myself
  Future<Member> getMyMembership() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoGetMyMembership(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_get_my_membership_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoGetMyMembershipFuturePoll);
    return tmp2;
  }

  /// the room id
  RoomId getRoomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoGetRoomId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RoomId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RoomId._(_api, tmp3_1);
    return tmp2;
  }

  /// the room id as str
  String getRoomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoGetRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Activate typing notice for this room
  /// The typing notice remains active for 4s. It can be deactivate at any
  /// point by setting typing to false. If this method is called while the
  /// typing notice is active nothing will happen. This method can be called
  /// on every key stroke, since it will do nothing while typing is active.
  Future<bool> typingNotice(bool typing) {
    final tmp1 = typing;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._convoTypingNotice(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Convo_typing_notice_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__convoTypingNoticeFuturePoll);
    return tmp4;
  }

  /// decrypted media file data
  /// if thumb size is given, media thumbnail is returned
  /// if thumb size is not given, media file is returned
  /// The reason that this function belongs to room object is because ChatScreen keeps it as member variable
  /// If this function belongs to message object, we may have to load too many message objects in ChatScreen
  Future<FfiBufferUint8> mediaBinary(String eventId, ThumbnailSize? thumbSize) {
    final tmp1 = eventId;
    final tmp5 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7._box.move();
    }
    final tmp9 = _api._convoMediaBinary(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Convo_media_binary_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__convoMediaBinaryFuturePoll);
    return tmp10;
  }

  /// is this a direct message
  bool isDm() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoIsDm(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// is this a bookmarked chat
  bool isBookmarked() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoIsBookmarked(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// set this a bookmarked chat
  Future<bool> setBookmarked(bool isBookmarked) {
    final tmp1 = isBookmarked;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._convoSetBookmarked(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Convo_set_bookmarked_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__convoSetBookmarkedFuturePoll);
    return tmp4;
  }

  /// is this a low priority chat
  bool isLowPriority() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoIsLowPriority(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// the list of users ids if this is a direct message
  FfiListFfiString dmUsers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoDmUsers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// invite the new user to this room
  Future<bool> inviteUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoInviteUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_invite_user_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoInviteUserFuturePoll);
    return tmp6;
  }

  /// generate the room permalink
  Future<String> permalink() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoPermalink(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_permalink_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoPermalinkFuturePoll);
    return tmp2;
  }

  /// join this room
  Future<bool> join() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoJoin(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_join_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoJoinFuturePoll);
    return tmp2;
  }

  /// leave this room
  Future<bool> leave() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoLeave(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_leave_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoLeaveFuturePoll);
    return tmp2;
  }

  /// get the users that were invited to this room
  Future<FfiListMember> getInvitees() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoGetInvitees(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_get_invitees_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoGetInviteesFuturePoll);
    return tmp2;
  }

  /// download media (image/audio/video/file/location) to specified path
  /// if thumb size is given, media thumbnail is returned
  /// if thumb size is not given, media file is returned
  Future<OptionString> downloadMedia(
    String eventId,
    ThumbnailSize? thumbSize,
    String dirPath,
  ) {
    final tmp1 = eventId;
    final tmp5 = thumbSize;
    final tmp9 = dirPath;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7._box.move();
    }
    final tmp9_0 = utf8.encode(tmp9);
    tmp11 = tmp9_0.length;

    final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
    final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
    tmp10_1.setAll(0, tmp9_0);
    tmp10 = tmp10_0.address;
    tmp12 = tmp11;
    final tmp13 = _api._convoDownloadMedia(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
    );
    final tmp15 = tmp13;
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(_api, tmp15_0, "__Convo_download_media_future_drop");
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp14 = _nativeFuture(tmp15_1, _api.__convoDownloadMediaFuturePoll);
    return tmp14;
  }

  /// get the path that media (image/audio/video/file) was saved
  /// return None when never downloaded
  Future<OptionString> mediaPath(String eventId, bool isThumb) {
    final tmp1 = eventId;
    final tmp5 = isThumb;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5 ? 1 : 0;
    final tmp7 = _api._convoMediaPath(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Convo_media_path_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__convoMediaPathFuturePoll);
    return tmp8;
  }

  /// whether this room is encrypted one
  Future<bool> isEncrypted() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoIsEncrypted(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_is_encrypted_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoIsEncryptedFuturePoll);
    return tmp2;
  }

  /// redact any message (including text/image/file and reaction)
  /// sender_id refers to the user that sent original msg
  Future<EventId> redactMessage(
    String eventId,
    String senderId,
    String? reason,
    String? txnId,
  ) {
    final tmp1 = eventId;
    final tmp5 = senderId;
    final tmp9 = reason;
    final tmp15 = txnId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp20 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    if (tmp9 == null) {
      tmp10 = 0;
    } else {
      tmp10 = 1;
      final tmp11 = tmp9;
      final tmp11_0 = utf8.encode(tmp11);
      tmp13 = tmp11_0.length;

      final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
      final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
      tmp12_1.setAll(0, tmp11_0);
      tmp12 = tmp12_0.address;
      tmp14 = tmp13;
    }
    if (tmp15 == null) {
      tmp16 = 0;
    } else {
      tmp16 = 1;
      final tmp17 = tmp15;
      final tmp17_0 = utf8.encode(tmp17);
      tmp19 = tmp17_0.length;

      final ffi.Pointer<ffi.Uint8> tmp18_0 = _api.__allocate(tmp19 * 1, 1);
      final Uint8List tmp18_1 = tmp18_0.asTypedList(tmp19);
      tmp18_1.setAll(0, tmp17_0);
      tmp18 = tmp18_0.address;
      tmp20 = tmp19;
    }
    final tmp21 = _api._convoRedactMessage(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp12,
      tmp13,
      tmp14,
      tmp16,
      tmp18,
      tmp19,
      tmp20,
    );
    final tmp23 = tmp21;
    final ffi.Pointer<ffi.Void> tmp23_0 = ffi.Pointer.fromAddress(tmp23);
    final tmp23_1 = _Box(_api, tmp23_0, "__Convo_redact_message_future_drop");
    tmp23_1._finalizer = _api._registerFinalizer(tmp23_1);
    final tmp22 = _nativeFuture(tmp23_1, _api.__convoRedactMessageFuturePoll);
    return tmp22;
  }

  /// update the power levels of specified member
  Future<EventId> updatePowerLevel(String userId, int level) {
    final tmp1 = userId;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._convoUpdatePowerLevel(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Convo_update_power_level_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__convoUpdatePowerLevelFuturePoll);
    return tmp8;
  }

  /// report an event from this room
  /// score - The score to rate this content as where -100 is most offensive and 0 is inoffensive (optional).
  /// reason - The reason for the event being reported (optional).
  Future<bool> reportContent(String eventId, int? score, String? reason) {
    final tmp1 = eventId;
    final tmp5 = score;
    final tmp9 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    if (tmp9 == null) {
      tmp10 = 0;
    } else {
      tmp10 = 1;
      final tmp11 = tmp9;
      final tmp11_0 = utf8.encode(tmp11);
      tmp13 = tmp11_0.length;

      final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
      final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
      tmp12_1.setAll(0, tmp11_0);
      tmp12 = tmp12_0.address;
      tmp14 = tmp13;
    }
    final tmp15 = _api._convoReportContent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp10,
      tmp12,
      tmp13,
      tmp14,
    );
    final tmp17 = tmp15;
    final ffi.Pointer<ffi.Void> tmp17_0 = ffi.Pointer.fromAddress(tmp17);
    final tmp17_1 = _Box(_api, tmp17_0, "__Convo_report_content_future_drop");
    tmp17_1._finalizer = _api._registerFinalizer(tmp17_1);
    final tmp16 = _nativeFuture(tmp17_1, _api.__convoReportContentFuturePoll);
    return tmp16;
  }

  /// redact an event from this room
  /// reason - The reason for the event being reported (optional).
  /// it’s the callers job to ensure the person has the privileges to
  /// redact that content.
  Future<EventId> redactContent(String eventId, String? reason) {
    final tmp1 = eventId;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._convoRedactContent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(_api, tmp13_0, "__Convo_redact_content_future_drop");
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__convoRedactContentFuturePoll);
    return tmp12;
  }

  bool isJoined() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoIsJoined(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// compose message state of the room
  Future<OptionComposeDraft> msgDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoMsgDraft(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_msg_draft_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoMsgDraftFuturePoll);
    return tmp2;
  }

  /// save composed message state of the room
  Future<bool> saveMsgDraft(
    String text,
    String? html,
    String draftType,
    String? eventId,
  ) {
    final tmp1 = text;
    final tmp5 = html;
    final tmp11 = draftType;
    final tmp15 = eventId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp20 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11_0 = utf8.encode(tmp11);
    tmp13 = tmp11_0.length;

    final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
    final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
    tmp12_1.setAll(0, tmp11_0);
    tmp12 = tmp12_0.address;
    tmp14 = tmp13;
    if (tmp15 == null) {
      tmp16 = 0;
    } else {
      tmp16 = 1;
      final tmp17 = tmp15;
      final tmp17_0 = utf8.encode(tmp17);
      tmp19 = tmp17_0.length;

      final ffi.Pointer<ffi.Uint8> tmp18_0 = _api.__allocate(tmp19 * 1, 1);
      final Uint8List tmp18_1 = tmp18_0.asTypedList(tmp19);
      tmp18_1.setAll(0, tmp17_0);
      tmp18 = tmp18_0.address;
      tmp20 = tmp19;
    }
    final tmp21 = _api._convoSaveMsgDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
      tmp12,
      tmp13,
      tmp14,
      tmp16,
      tmp18,
      tmp19,
      tmp20,
    );
    final tmp23 = tmp21;
    final ffi.Pointer<ffi.Void> tmp23_0 = ffi.Pointer.fromAddress(tmp23);
    final tmp23_1 = _Box(_api, tmp23_0, "__Convo_save_msg_draft_future_drop");
    tmp23_1._finalizer = _api._registerFinalizer(tmp23_1);
    final tmp22 = _nativeFuture(tmp23_1, _api.__convoSaveMsgDraftFuturePoll);
    return tmp22;
  }

  /// clear composed message state of the room
  Future<bool> clearMsgDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoClearMsgDraft(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_clear_msg_draft_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoClearMsgDraftFuturePoll);
    return tmp2;
  }

  /// get the internal reference object, defined in Room
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._convoRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Convo_ref_details_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__convoRefDetailsFuturePoll);
    return tmp2;
  }

  /// set a moderation policy rule which affects room IDs and room aliases.
  /// entity: #*:example.org
  /// reason: undesirable content
  Future<EventId> setPolicyRuleRoom(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._convoSetPolicyRuleRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Convo_set_policy_rule_room_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__convoSetPolicyRuleRoomFuturePoll,
    );
    return tmp10;
  }

  /// set a moderation policy rule which affects servers.
  /// entity: *.example.org
  /// reason: undesirable engagement
  Future<EventId> setPolicyRuleServer(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._convoSetPolicyRuleServer(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Convo_set_policy_rule_server_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__convoSetPolicyRuleServerFuturePoll,
    );
    return tmp10;
  }

  /// set a moderation policy rule which affects users.
  /// entity: @alice*:example.org
  /// reason: undesirable behaviour
  Future<EventId> setPolicyRuleUser(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._convoSetPolicyRuleUser(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Convo_set_policy_rule_user_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__convoSetPolicyRuleUserFuturePoll,
    );
    return tmp10;
  }

  /// set room encryption
  /// m.olm.v1.curve25519-aes-sha2 or m.megolm.v1.aes-sha2
  Future<EventId> setEncryption(String algorithm) {
    final tmp1 = algorithm;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetEncryption(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_encryption_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetEncryptionFuturePoll);
    return tmp6;
  }

  /// set room guest access
  /// can_join or forbidden
  Future<EventId> setGuestAccess(String guestAccess) {
    final tmp1 = guestAccess;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetGuestAccess(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_guest_access_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetGuestAccessFuturePoll);
    return tmp6;
  }

  /// set room history visibility
  /// invited, joined, shared, or world_readable
  Future<EventId> setHistoryVisibility(String historyVisibility) {
    final tmp1 = historyVisibility;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetHistoryVisibility(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Convo_set_history_visibility_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__convoSetHistoryVisibilityFuturePoll,
    );
    return tmp6;
  }

  /// set room join rules
  /// invite, knock, private, or public
  Future<EventId> setJoinRules(String joinRule) {
    final tmp1 = joinRule;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetJoinRules(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_join_rules_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetJoinRulesFuturePoll);
    return tmp6;
  }

  /// set room pinned events
  /// event id array
  Future<EventId> setPinnedEvents(String eventIds) {
    final tmp1 = eventIds;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._convoSetPinnedEvents(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Convo_set_pinned_events_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__convoSetPinnedEventsFuturePoll);
    return tmp6;
  }

  /// set ban of power levels
  Future<EventId> setPowerLevelsBan(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsBan(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_ban_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__convoSetPowerLevelsBanFuturePoll);
    return tmp4;
  }

  /// set events of power levels
  /// event type is one of "m.room.avatar", "m.room.canonical_alias", "m.room.encryption", "m.room.history_visibility", "m.room.name", "m.room.power_levels", "m.room.server_acl", "m.room.tombstone"
  Future<EventId> setPowerLevelsEvents(String eventType, int level) {
    final tmp1 = eventType;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._convoSetPowerLevelsEvents(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__Convo_set_power_levels_events_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__convoSetPowerLevelsEventsFuturePoll,
    );
    return tmp8;
  }

  /// set events_default of power levels
  Future<EventId> setPowerLevelsEventsDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsEventsDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_events_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsEventsDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set invite of power levels
  Future<EventId> setPowerLevelsInvite(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsInvite(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_invite_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsInviteFuturePoll,
    );
    return tmp4;
  }

  /// set kick of power levels
  Future<EventId> setPowerLevelsKick(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsKick(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_kick_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsKickFuturePoll,
    );
    return tmp4;
  }

  /// set redact of power levels
  Future<EventId> setPowerLevelsRedact(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsRedact(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_redact_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsRedactFuturePoll,
    );
    return tmp4;
  }

  /// set state_default of power levels
  Future<EventId> setPowerLevelsStateDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsStateDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_state_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsStateDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set users_default of power levels
  Future<EventId> setPowerLevelsUsersDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsUsersDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_users_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsUsersDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set notifications of power levels
  Future<EventId> setPowerLevelsNotifications(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._convoSetPowerLevelsNotifications(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Convo_set_power_levels_notifications_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__convoSetPowerLevelsNotificationsFuturePoll,
    );
    return tmp4;
  }

  /// set room server acl
  /// allow_ip_literals: true
  /// allow: ["*"]
  /// deny: ["1.1.1.1"]
  Future<EventId> setServerAcl(
    bool allowIpLiterals,
    String allow,
    String deny,
  ) {
    final tmp1 = allowIpLiterals;
    final tmp3 = allow;
    final tmp7 = deny;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3_0 = utf8.encode(tmp3);
    tmp5 = tmp3_0.length;

    final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
    final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
    tmp4_1.setAll(0, tmp3_0);
    tmp4 = tmp4_0.address;
    tmp6 = tmp5;
    final tmp7_0 = utf8.encode(tmp7);
    tmp9 = tmp7_0.length;

    final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
    final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
    tmp8_1.setAll(0, tmp7_0);
    tmp8 = tmp8_0.address;
    tmp10 = tmp9;
    final tmp11 = _api._convoSetServerAcl(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(_api, tmp13_0, "__Convo_set_server_acl_future_drop");
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__convoSetServerAclFuturePoll);
    return tmp12;
  }

  /// set room tombstone
  Future<EventId> setTombstone(String body, String replacementRoomId) {
    final tmp1 = body;
    final tmp5 = replacementRoomId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._convoSetTombstone(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Convo_set_tombstone_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__convoSetTombstoneFuturePoll);
    return tmp10;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CommentDraft {
  final Api _api;
  final _Box _box;

  CommentDraft._(this._api, this._box);

  /// set the content of the draft to body
  void contentText(String body) {
    final tmp1 = body;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._commentDraftContentText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the content to a formatted body of html_body, where body is the tag-stripped version
  void contentFormatted(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._commentDraftContentFormatted(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  /// fire this comment over - the event_id is the confirmation from the server.
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CommentDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__commentDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Comment {
  final Api _api;
  final _Box _box;

  Comment._(this._api, this._box);

  /// Who send this comment
  UserId sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// When was this comment acknowledged by the server
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// what is the comment’s content
  MsgContent msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentMsgContent(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_MsgContent");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = MsgContent._(_api, tmp3_1);
    return tmp2;
  }

  /// create a draft builder to reply to this comment
  CommentDraft replyBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentReplyBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_CommentDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = CommentDraft._(_api, tmp3_1);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Comment_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__commentCanRedactFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Reference to the comments section of a particular item
class CommentsManager {
  final Api _api;
  final _Box _box;

  CommentsManager._(this._api, this._box);

  /// Get the list of comments (in arrival order)
  Future<FfiListComment> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CommentsManager_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__commentsManagerCommentsFuturePoll,
    );
    return tmp2;
  }

  /// String representation of the room id this comments manager is in
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// String of the id of the object the comments are managed for
  String objectIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerObjectIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Does this item have any comments?
  bool hasComments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerHasComments(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// How many comments does this item have
  int commentsCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerCommentsCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// draft a new comment for this item
  CommentDraft commentDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerCommentDraft(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_CommentDraft");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = CommentDraft._(_api, tmp3_1);
    return tmp2;
  }

  /// subscribe to the changes this manager
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__CommentsManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__commentsManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// reload the data from the database
  Future<CommentsManager> reload() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._commentsManagerReload(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__CommentsManager_reload_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__commentsManagerReloadFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Reference of explicit invitations to a particular item
class ObjectInvitationsManager {
  final Api _api;
  final _Box _box;

  ObjectInvitationsManager._(this._api, this._box);

  /// Get the list of users that were invited
  FfiListFfiString invited() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objectInvitationsManagerInvited(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Whether or not any invitations exist
  bool hasInvitations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objectInvitationsManagerHasInvitations(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Whether or not this user has been invited
  bool isInvited() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objectInvitationsManagerIsInvited(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// invite a specific user to this object, returns the event_id
  Future<String> invite(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._objectInvitationsManagerInvite(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__ObjectInvitationsManager_invite_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__objectInvitationsManagerInviteFuturePoll,
    );
    return tmp6;
  }

  /// subscribe to the changes this manager
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objectInvitationsManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ObjectInvitationsManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__objectInvitationsManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// reload the data from the database
  Future<ObjectInvitationsManager> reload() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._objectInvitationsManagerReload(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ObjectInvitationsManager_reload_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__objectInvitationsManagerReloadFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class AttachmentDraft {
  final Api _api;
  final _Box _box;

  AttachmentDraft._(this._api, this._box);

  /// fire this attachment over - the event_id is the confirmation from the server.
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__AttachmentDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__attachmentDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Attachment {
  final Api _api;
  final _Box _box;

  Attachment._(this._api, this._box);

  /// display name, either filename or given by the user, if found
  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Who send this attachment
  String sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentSender(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// When was this attachment acknowledged by the server
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// unique event id associated with this attachment
  String attachmentIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentAttachmentIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the room this attachment lives in
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the type of attachment
  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// if this is a media, hand over its details
  MsgContent? msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentMsgContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// if this is a reference, here are the details
  RefDetails? refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentRefDetails(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RefDetails");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RefDetails._(_api, tmp4_1);
    return tmp2;
  }

  /// if this is a link, this contains the URI/Link/URL
  String? link() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentLink(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// if this is a media, hand over the data
  /// if thumb size is given, media thumbnail is returned
  /// download media (image/audio/video/file/location) to specified path
  /// if thumb size is given, media thumbnail is returned
  /// if thumb size is not given, media file is returned
  Future<OptionString> downloadMedia(ThumbnailSize? thumbSize, String dirPath) {
    final tmp1 = thumbSize;
    final tmp5 = dirPath;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._attachmentDownloadMedia(
      tmp0,
      tmp2,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Attachment_download_media_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__attachmentDownloadMediaFuturePoll,
    );
    return tmp10;
  }

  /// get the path that media (image/audio/video/file) was saved
  /// return None when never downloaded
  Future<OptionString> mediaPath(bool isThumb) {
    final tmp1 = isThumb;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._attachmentMediaPath(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Attachment_media_path_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__attachmentMediaPathFuturePoll);
    return tmp4;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Attachment_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__attachmentCanRedactFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Reference to the attachments section of a particular item
class AttachmentsManager {
  final Api _api;
  final _Box _box;

  AttachmentsManager._(this._api, this._box);

  /// the room this attachments manager lives in
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the id of the object whose attachments are managed
  String objectIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerObjectIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Whether or not the current user can post, edit and delete
  /// attachments in this manager
  bool canEditAttachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerCanEditAttachments(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Get the list of attachments (in arrival order)
  Future<FfiListAttachment> attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerAttachments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__AttachmentsManager_attachments_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__attachmentsManagerAttachmentsFuturePoll,
    );
    return tmp2;
  }

  /// Does this item have any attachments?
  bool hasAttachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerHasAttachments(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// How many attachments does this item have
  int attachmentsCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerAttachmentsCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// create attachment for given msg draft
  Future<AttachmentDraft> contentDraft(MsgDraft baseDraft) {
    final tmp1 = baseDraft;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._attachmentsManagerContentDraft(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__AttachmentsManager_content_draft_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__attachmentsManagerContentDraftFuturePoll,
    );
    return tmp4;
  }

  /// create attachment for given link draft
  Future<AttachmentDraft> linkDraft(String url, String? name) {
    final tmp1 = url;
    final tmp5 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._attachmentsManagerLinkDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__AttachmentsManager_link_draft_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(
      tmp13_1,
      _api.__attachmentsManagerLinkDraftFuturePoll,
    );
    return tmp12;
  }

  /// create attachment for given ref_details
  Future<AttachmentDraft> referenceDraft(RefDetails details) {
    final tmp1 = details;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._attachmentsManagerReferenceDraft(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__AttachmentsManager_reference_draft_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__attachmentsManagerReferenceDraftFuturePoll,
    );
    return tmp4;
  }

  /// inform about the changes to this manager
  Future<AttachmentsManager> reload() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerReload(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__AttachmentsManager_reload_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__attachmentsManagerReloadFuturePoll,
    );
    return tmp2;
  }

  /// redact attachment
  Future<EventId> redact(String attachmentId, String? reason, String? txnId) {
    final tmp1 = attachmentId;
    final tmp5 = reason;
    final tmp11 = txnId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp16 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    if (tmp11 == null) {
      tmp12 = 0;
    } else {
      tmp12 = 1;
      final tmp13 = tmp11;
      final tmp13_0 = utf8.encode(tmp13);
      tmp15 = tmp13_0.length;

      final ffi.Pointer<ffi.Uint8> tmp14_0 = _api.__allocate(tmp15 * 1, 1);
      final Uint8List tmp14_1 = tmp14_0.asTypedList(tmp15);
      tmp14_1.setAll(0, tmp13_0);
      tmp14 = tmp14_0.address;
      tmp16 = tmp15;
    }
    final tmp17 = _api._attachmentsManagerRedact(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
      tmp12,
      tmp14,
      tmp15,
      tmp16,
    );
    final tmp19 = tmp17;
    final ffi.Pointer<ffi.Void> tmp19_0 = ffi.Pointer.fromAddress(tmp19);
    final tmp19_1 = _Box(
      _api,
      tmp19_0,
      "__AttachmentsManager_redact_future_drop",
    );
    tmp19_1._finalizer = _api._registerFinalizer(tmp19_1);
    final tmp18 = _nativeFuture(
      tmp19_1,
      _api.__attachmentsManagerRedactFuturePoll,
    );
    return tmp18;
  }

  /// subscribe to the changes of this model key
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._attachmentsManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__AttachmentsManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__attachmentsManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Task {
  final Api _api;
  final _Box _box;

  Task._(this._api, this._box);

  /// the name of this task
  String title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// unique event id associated with this task
  String eventIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskEventIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the room this task lives in
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// unique task list id associated with this task
  String taskListIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskTaskListIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the description of this task
  MsgContent? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// initial author
  String authorStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskAuthorStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the users assigned
  FfiListFfiString assigneesStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskAssigneesStr(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// order in the list
  int sortOrder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskSortOrder(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// does this list have a special role?
  /// Highest = 1,
  /// SecondHighest = 2,
  /// Three = 3,
  /// Four = 4,
  /// Five = 5,
  /// Six = 6,
  /// Seven = 7,
  /// --- No value
  /// SecondLowest = 8,
  /// Lowest = 9,
  int? priority() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskPriority(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Day When this is due
  String? dueDate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskDueDate(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Time of day when this is due compared to UTC00:00
  int? utcDueTimeOfDay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskUtcDueTimeOfDay(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// When this was started
  String? utcStartRfc3339() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskUtcStartRfc3339(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// What display options are given?
  Display? display() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskDisplay(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Display");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Display._(_api, tmp4_1);
    return tmp2;
  }

  /// is this task already done?
  bool isDone() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskIsDone(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// if it has been started, haw far is it in percent 0->100
  /// None if not yet started
  int? progressPercent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskProgressPercent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// tags on this task
  FfiListFfiString keywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskKeywords(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// categories this task is in
  FfiListFfiString categories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskCategories(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// make a builder for updating the task
  TaskUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_TaskUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = TaskUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// Is this assigned to the current user?
  bool isAssignedToMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskIsAssignedToMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Assign this task to myself
  Future<EventId> assignSelf() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskAssignSelf(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_assign_self_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskAssignSelfFuturePoll);
    return tmp2;
  }

  /// UnAssign this task to myself
  Future<EventId> unassignSelf() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskUnassignSelf(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_unassign_self_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskUnassignSelfFuturePoll);
    return tmp2;
  }

  /// get informed about changes to this task
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_subscribe_stream_stream_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__taskSubscribeStreamStreamPoll);
    return tmp2;
  }

  /// replace the current task with one with the latest state
  Future<Task> refresh() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskRefresh(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_refresh_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskRefreshFuturePoll);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskCanRedactFuturePoll);
    return tmp2;
  }

  /// get the comments manager for this task
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskCommentsFuturePoll);
    return tmp2;
  }

  /// get the attachments manager
  Future<AttachmentsManager> attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskAttachments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_attachments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskAttachmentsFuturePoll);
    return tmp2;
  }

  /// get the invitations manager for this task
  Future<ObjectInvitationsManager> invitations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskInvitations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Task_invitations_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskInvitationsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TaskUpdateBuilder {
  final Api _api;
  final _Box _box;

  TaskUpdateBuilder._(this._api, this._box);

  /// set the title for this task
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskUpdateBuilderTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void unsetTitleUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetTitleUpdate(tmp0);
    return;
  }

  /// set the description for this task list
  void descriptionText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskUpdateBuilderDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description html text
  void descriptionHtml(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._taskUpdateBuilderDescriptionHtml(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  void unsetDescription() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDescription(tmp0);
    return;
  }

  void unsetDescriptionUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDescriptionUpdate(tmp0);
    return;
  }

  /// set the sort order for this task list
  void sortOrder(int sortOrder) {
    final tmp1 = sortOrder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskUpdateBuilderSortOrder(tmp0, tmp2);
    return;
  }

  void unsetSortOrderUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetSortOrderUpdate(tmp0);
    return;
  }

  /// set the display of the update
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskUpdateBuilderDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDisplay(tmp0);
    return;
  }

  void unsetDisplayUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDisplayUpdate(tmp0);
    return;
  }

  /// set the due day for this task
  void dueDate(int year, int month, int day) {
    final tmp1 = year;
    final tmp3 = month;
    final tmp5 = day;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    tmp6 = tmp5;
    _api._taskUpdateBuilderDueDate(tmp0, tmp2, tmp4, tmp6);
    return;
  }

  void unsetDueDate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDueDate(tmp0);
    return;
  }

  void unsetDueDateUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetDueDateUpdate(tmp0);
    return;
  }

  /// set the due time of day in seconds since midnight UTC
  void utcDueTimeOfDay(int seconds) {
    final tmp1 = seconds;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskUpdateBuilderUtcDueTimeOfDay(tmp0, tmp2);
    return;
  }

  void unsetUtcDueTimeOfDay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetUtcDueTimeOfDay(tmp0);
    return;
  }

  void unsetUtcDueTimeOfDayUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetUtcDueTimeOfDayUpdate(tmp0);
    return;
  }

  /// set the utc_start for this task list in rfc3339 format
  void utcStartFromRfc3339(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._taskUpdateBuilderUtcStartFromRfc3339(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this task list in rfc2822 format
  void utcStartFromRfc2822(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._taskUpdateBuilderUtcStartFromRfc2822(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this task list in custom format
  void utcStartFromFormat(String utcStart, String format) {
    final tmp1 = utcStart;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._taskUpdateBuilderUtcStartFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  void unsetUtcStart() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetUtcStart(tmp0);
    return;
  }

  void unsetUtcStartUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetUtcStartUpdate(tmp0);
    return;
  }

  /// set the sort order for this task list
  void progressPercent(int progressPercent) {
    final tmp1 = progressPercent;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskUpdateBuilderProgressPercent(tmp0, tmp2);
    return;
  }

  void unsetProgressPercent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetProgressPercent(tmp0);
    return;
  }

  void unsetProgressPercentUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetProgressPercentUpdate(tmp0);
    return;
  }

  /// set the keywords for this task list
  void keywords(FfiListFfiString keywords) {
    final tmp1 = keywords;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskUpdateBuilderKeywords(tmp0, tmp2);
    return;
  }

  void unsetKeywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetKeywords(tmp0);
    return;
  }

  void unsetKeywordsUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetKeywordsUpdate(tmp0);
    return;
  }

  /// set the categories for this task list
  void categories(FfiListFfiString categories) {
    final tmp1 = categories;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskUpdateBuilderCategories(tmp0, tmp2);
    return;
  }

  void unsetCategories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetCategories(tmp0);
    return;
  }

  void unsetCategoriesUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderUnsetCategoriesUpdate(tmp0);
    return;
  }

  /// send this task list draft
  /// mark it done
  void markDone() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderMarkDone(tmp0);
    return;
  }

  /// mark as not done
  void markUndone() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskUpdateBuilderMarkUndone(tmp0);
    return;
  }

  /// update this task
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskUpdateBuilder_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskUpdateBuilderSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TaskDraft {
  final Api _api;
  final _Box _box;

  TaskDraft._(this._api, this._box);

  /// set the title for this task
  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskDraftTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the description for this task
  void descriptionText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskDraftDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description html text
  void descriptionHtml(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._taskDraftDescriptionHtml(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    return;
  }

  void unsetDescription() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetDescription(tmp0);
    return;
  }

  /// set the sort order for this task
  void sortOrder(int sortOrder) {
    final tmp1 = sortOrder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskDraftSortOrder(tmp0, tmp2);
    return;
  }

  /// set the disply options for this task
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskDraftDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetDisplay(tmp0);
    return;
  }

  /// set the due day for this task
  void dueDate(int year, int month, int day) {
    final tmp1 = year;
    final tmp3 = month;
    final tmp5 = day;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    tmp6 = tmp5;
    _api._taskDraftDueDate(tmp0, tmp2, tmp4, tmp6);
    return;
  }

  void unsetDueDate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetDueDate(tmp0);
    return;
  }

  /// set the due time of day in seconds since midnight UTC
  void utcDueTimeOfDay(int seconds) {
    final tmp1 = seconds;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskDraftUtcDueTimeOfDay(tmp0, tmp2);
    return;
  }

  void unsetUtcDueTimeOfDay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetUtcDueTimeOfDay(tmp0);
    return;
  }

  /// set the utc_start for this task in rfc3339 format
  void utcStartFromRfc3339(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._taskDraftUtcStartFromRfc3339(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this task in rfc2822 format
  void utcStartFromRfc2822(String utcStart) {
    final tmp1 = utcStart;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._taskDraftUtcStartFromRfc2822(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the utc_start for this task in custom format
  void utcStartFromFormat(String utcStart, String format) {
    final tmp1 = utcStart;
    final tmp5 = format;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._taskDraftUtcStartFromFormat(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    return;
  }

  void unsetUtcStart() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetUtcStart(tmp0);
    return;
  }

  /// set the sort order for this task
  void progressPercent(int progressPercent) {
    final tmp1 = progressPercent;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskDraftProgressPercent(tmp0, tmp2);
    return;
  }

  void unsetProgressPercent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetProgressPercent(tmp0);
    return;
  }

  /// set the keywords for this task
  void keywords(FfiListFfiString keywords) {
    final tmp1 = keywords;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskDraftKeywords(tmp0, tmp2);
    return;
  }

  void unsetKeywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetKeywords(tmp0);
    return;
  }

  /// set the categories for this task
  void categories(FfiListFfiString categories) {
    final tmp1 = categories;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskDraftCategories(tmp0, tmp2);
    return;
  }

  void unsetCategories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskDraftUnsetCategories(tmp0);
    return;
  }

  /// create this task
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TaskList {
  final Api _api;
  final _Box _box;

  TaskList._(this._api, this._box);

  /// the name of this task list
  String name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the event_id of this task list
  String eventIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListEventIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the description of this task list
  MsgContent? description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// does this list have a special role?
  String? role() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListRole(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// order in the list
  int sortOrder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListSortOrder(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// What display options are given?
  Display? display() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListDisplay(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Display");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Display._(_api, tmp4_1);
    return tmp2;
  }

  /// Does this have any special time zone
  String? timeZone() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListTimeZone(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// tags on this task
  FfiListFfiString keywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListKeywords(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// categories this task is in
  FfiListFfiString categories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListCategories(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// The tasks belonging to this tasklist
  Future<FfiListTask> tasks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListTasks(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_tasks_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListTasksFuturePoll);
    return tmp2;
  }

  /// The specific task belonging to this task list
  Future<Task> task(String taskId) {
    final tmp1 = taskId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._taskListTask(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__TaskList_task_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__taskListTaskFuturePoll);
    return tmp6;
  }

  /// make a builder for creating the task draft
  TaskDraft taskBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListTaskBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_TaskDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = TaskDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// make a builder for updating the task list
  TaskListUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListUpdateBuilder(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_TaskListUpdateBuilder");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = TaskListUpdateBuilder._(_api, tmp7_1);
    return tmp2;
  }

  /// get informed about changes to this task
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__TaskList_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__taskListSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// replace the current task with one with the latest state
  Future<TaskList> refresh() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListRefresh(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_refresh_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListRefreshFuturePoll);
    return tmp2;
  }

  /// whether or not this user can redact this item
  Future<bool> canRedact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListCanRedact(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_can_redact_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListCanRedactFuturePoll);
    return tmp2;
  }

  /// the space this TaskList belongs to
  Space space() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListSpace(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_Space");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = Space._(_api, tmp3_1);
    return tmp2;
  }

  /// the id of the space this TaskList belongs to
  String spaceIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListSpaceIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the internal reference object
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_ref_details_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListRefDetailsFuturePoll);
    return tmp2;
  }

  /// get the comments manager
  Future<CommentsManager> comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListComments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_comments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListCommentsFuturePoll);
    return tmp2;
  }

  /// get the attachments manager
  Future<AttachmentsManager> attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListAttachments(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskList_attachments_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListAttachmentsFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TaskListDraft {
  final Api _api;
  final _Box _box;

  TaskListDraft._(this._api, this._box);

  /// set the name for this task list
  void name(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskListDraftName(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the description for this task list
  void descriptionText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskListDraftDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void descriptionMarkdown(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskListDraftDescriptionMarkdown(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description html text
  void descriptionHtml(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._taskListDraftDescriptionHtml(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  void unsetDescription() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListDraftUnsetDescription(tmp0);
    return;
  }

  /// set the sort order for this task list
  void sortOrder(int sortOrder) {
    final tmp1 = sortOrder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskListDraftSortOrder(tmp0, tmp2);
    return;
  }

  /// set the display for this task list
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListDraftDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListDraftUnsetDisplay(tmp0);
    return;
  }

  /// set the keywords for this task list
  void keywords(FfiListFfiString keywords) {
    final tmp1 = keywords;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListDraftKeywords(tmp0, tmp2);
    return;
  }

  void unsetKeywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListDraftUnsetKeywords(tmp0);
    return;
  }

  /// set the categories for this task list
  void categories(FfiListFfiString categories) {
    final tmp1 = categories;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListDraftCategories(tmp0, tmp2);
    return;
  }

  void unsetCategories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListDraftUnsetCategories(tmp0);
    return;
  }

  /// create this task list
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListDraftSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__TaskListDraft_send_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__taskListDraftSendFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TaskListUpdateBuilder {
  final Api _api;
  final _Box _box;

  TaskListUpdateBuilder._(this._api, this._box);

  /// set the name for this task list
  void name(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskListUpdateBuilderName(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the description for this task list
  void descriptionText(String text) {
    final tmp1 = text;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._taskListUpdateBuilderDescriptionText(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set description html text
  void descriptionHtml(String body, String htmlBody) {
    final tmp1 = body;
    final tmp5 = htmlBody;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._taskListUpdateBuilderDescriptionHtml(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    return;
  }

  void unsetDescription() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetDescription(tmp0);
    return;
  }

  void unsetDescriptionUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetDescriptionUpdate(tmp0);
    return;
  }

  /// set the sort order for this task list
  void sortOrder(int sortOrder) {
    final tmp1 = sortOrder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._taskListUpdateBuilderSortOrder(tmp0, tmp2);
    return;
  }

  /// set the display for this task list
  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListUpdateBuilderDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetDisplay(tmp0);
    return;
  }

  void unsetDisplayUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetDisplayUpdate(tmp0);
    return;
  }

  /// set the keywords for this task list
  void keywords(FfiListFfiString keywords) {
    final tmp1 = keywords;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListUpdateBuilderKeywords(tmp0, tmp2);
    return;
  }

  void unsetKeywords() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetKeywords(tmp0);
    return;
  }

  void unsetKeywordsUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetKeywordsUpdate(tmp0);
    return;
  }

  /// set the categories for this task list
  void categories(FfiListFfiString categories) {
    final tmp1 = categories;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._taskListUpdateBuilderCategories(tmp0, tmp2);
    return;
  }

  void unsetCategories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetCategories(tmp0);
    return;
  }

  void unsetCategoriesUpdate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._taskListUpdateBuilderUnsetCategoriesUpdate(tmp0);
    return;
  }

  /// update this task
  Future<EventId> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._taskListUpdateBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__TaskListUpdateBuilder_send_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__taskListUpdateBuilderSendFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// remote info
class SpaceHierarchyRoomInfo {
  final Api _api;
  final _Box _box;

  SpaceHierarchyRoomInfo._(this._api, this._box);

  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int numJoinedMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoNumJoinedMembers(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  bool worldReadable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoWorldReadable(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool guestCanJoin() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoGuestCanJoin(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool isSpace() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoIsSpace(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  String? avatarUrlStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoAvatarUrlStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String joinRuleStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoJoinRuleStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// whether to have avatar
  bool hasAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoHasAvatar(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// is this a suggested room?
  bool suggested() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoSuggested(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the binary data of avatar
  /// if thumb size is given, avatar thumbnail is returned
  /// if thumb size is not given, avatar file is returned
  Future<OptionBuffer> getAvatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._spaceHierarchyRoomInfoGetAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__SpaceHierarchyRoomInfo_get_avatar_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__spaceHierarchyRoomInfoGetAvatarFuturePoll,
    );
    return tmp6;
  }

  /// recommended server to try to join via
  FfiListFfiString viaServerNames() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceHierarchyRoomInfoViaServerNames(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SpaceRelation {
  final Api _api;
  final _Box _box;

  SpaceRelation._(this._api, this._box);

  /// the room ID this Relation links to
  RoomId roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationRoomId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RoomId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RoomId._(_api, tmp3_1);
    return tmp2;
  }

  /// is this a suggested room?
  bool suggested() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationSuggested(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// how to find this room
  FfiListFfiString via() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationVia(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// of what type is the targeted room?
  String targetType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationTargetType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SpaceRelations {
  final Api _api;
  final _Box _box;

  SpaceRelations._(this._api, this._box);

  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationsRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// do we have a canonical parent?!?
  SpaceRelation? mainParent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationsMainParent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_SpaceRelation");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = SpaceRelation._(_api, tmp4_1);
    return tmp2;
  }

  /// other parents we belong to
  FfiListSpaceRelation otherParents() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationsOtherParents(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListSpaceRelation");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListSpaceRelation._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// children
  FfiListSpaceRelation children() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationsChildren(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListSpaceRelation");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListSpaceRelation._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// query for children from the server
  Future<FfiListSpaceHierarchyRoomInfo> queryHierarchy() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRelationsQueryHierarchy(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__SpaceRelations_query_hierarchy_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__spaceRelationsQueryHierarchyFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomPowerLevels {
  final Api _api;
  final _Box _box;

  RoomPowerLevels._(this._api, this._box);

  int? news() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsNews(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String newsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsNewsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? stories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsStories(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String storiesKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsStoriesKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? events() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsEvents(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String eventsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsEventsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? pins() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsPins(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String pinsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsPinsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? tasks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsTasks(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String tasksKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsTasksKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? taskLists() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsTaskLists(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String taskListsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsTaskListsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? rsvp() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsRsvp(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String rsvpKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsRsvpKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? comments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsComments(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String commentsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsCommentsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int? attachments() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsAttachments(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  String attachmentsKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsAttachmentsKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  int eventsDefault() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsEventsDefault(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int usersDefault() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsUsersDefault(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int maxPowerLevel() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsMaxPowerLevel(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int kick() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsKick(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int ban() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsBan(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int redact() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsRedact(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  int invite() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPowerLevelsInvite(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SimpleOnOffSetting {
  final Api _api;
  final _Box _box;

  SimpleOnOffSetting._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._simpleOnOffSettingActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SimpleOnOffSettingBuilder {
  final Api _api;
  final _Box _box;

  SimpleOnOffSettingBuilder._(this._api, this._box);

  void active(bool active) {
    final tmp1 = active;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._simpleOnOffSettingBuilderActive(tmp0, tmp2);
    return;
  }

  SimpleOnOffSetting build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._simpleOnOffSettingBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_SimpleOnOffSetting");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = SimpleOnOffSetting._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SimpleSettingWithTurnOff {
  final Api _api;
  final _Box _box;

  SimpleSettingWithTurnOff._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._simpleSettingWithTurnOffActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SimpleSettingWithTurnOffBuilder {
  final Api _api;
  final _Box _box;

  SimpleSettingWithTurnOffBuilder._(this._api, this._box);

  void active(bool active) {
    final tmp1 = active;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._simpleSettingWithTurnOffBuilderActive(tmp0, tmp2);
    return;
  }

  SimpleSettingWithTurnOff build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._simpleSettingWithTurnOffBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_SimpleSettingWithTurnOff");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = SimpleSettingWithTurnOff._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NewsSettings {
  final Api _api;
  final _Box _box;

  NewsSettings._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSettingsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  SimpleSettingWithTurnOffBuilder updater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._newsSettingsUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "drop_box_SimpleSettingWithTurnOffBuilder",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SimpleSettingWithTurnOffBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class StoriesSettings {
  final Api _api;
  final _Box _box;

  StoriesSettings._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storiesSettingsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  SimpleOnOffSettingBuilder updater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._storiesSettingsUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_SimpleOnOffSettingBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SimpleOnOffSettingBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TasksSettings {
  final Api _api;
  final _Box _box;

  TasksSettings._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._tasksSettingsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  SimpleOnOffSettingBuilder updater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._tasksSettingsUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_SimpleOnOffSettingBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SimpleOnOffSettingBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class EventsSettings {
  final Api _api;
  final _Box _box;

  EventsSettings._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventsSettingsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  SimpleSettingWithTurnOffBuilder updater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._eventsSettingsUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "drop_box_SimpleSettingWithTurnOffBuilder",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SimpleSettingWithTurnOffBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PinsSettings {
  final Api _api;
  final _Box _box;

  PinsSettings._(this._api, this._box);

  bool active() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pinsSettingsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  SimpleSettingWithTurnOffBuilder updater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pinsSettingsUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "drop_box_SimpleSettingWithTurnOffBuilder",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SimpleSettingWithTurnOffBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ActerAppSettings {
  final Api _api;
  final _Box _box;

  ActerAppSettings._(this._api, this._box);

  NewsSettings news() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsNews(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_NewsSettings");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = NewsSettings._(_api, tmp3_1);
    return tmp2;
  }

  StoriesSettings stories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsStories(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_StoriesSettings");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = StoriesSettings._(_api, tmp3_1);
    return tmp2;
  }

  PinsSettings pins() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsPins(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_PinsSettings");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = PinsSettings._(_api, tmp3_1);
    return tmp2;
  }

  EventsSettings events() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsEvents(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_EventsSettings");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = EventsSettings._(_api, tmp3_1);
    return tmp2;
  }

  TasksSettings tasks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsTasks(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_TasksSettings");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = TasksSettings._(_api, tmp3_1);
    return tmp2;
  }

  ActerAppSettingsBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterAppSettingsUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_ActerAppSettingsBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = ActerAppSettingsBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ActerAppSettingsBuilder {
  final Api _api;
  final _Box _box;

  ActerAppSettingsBuilder._(this._api, this._box);

  void news(SimpleSettingWithTurnOff? news) {
    final tmp1 = news;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    _api._acterAppSettingsBuilderNews(tmp0, tmp2, tmp4);
    return;
  }

  void stories(SimpleOnOffSetting? tasks) {
    final tmp1 = tasks;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    _api._acterAppSettingsBuilderStories(tmp0, tmp2, tmp4);
    return;
  }

  void pins(SimpleSettingWithTurnOff? pins) {
    final tmp1 = pins;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    _api._acterAppSettingsBuilderPins(tmp0, tmp2, tmp4);
    return;
  }

  void events(SimpleSettingWithTurnOff? events) {
    final tmp1 = events;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    _api._acterAppSettingsBuilderEvents(tmp0, tmp2, tmp4);
    return;
  }

  void tasks(SimpleOnOffSetting? tasks) {
    final tmp1 = tasks;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    _api._acterAppSettingsBuilderTasks(tmp0, tmp2, tmp4);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ActivityObject {
  final Api _api;
  final _Box _box;

  ActivityObject._(this._api, this._box);

  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObjectTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String objectIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObjectObjectIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObjectTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String emoji() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObjectEmoji(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// if this is a `task` type, what `task-list-id` does it belong to
  String? taskListIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObjectTaskListIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Activity {
  final Api _api;
  final _Box _box;

  Activity._(this._api, this._box);

  /// the event_id as a string
  String eventIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityEventIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the sender of this event as a string
  String senderIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activitySenderIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the server receiving timestamp in milliseconds
  int originServerTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityOriginServerTs(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// the room_id of this event
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the type of this activity as a string
  /// e.g. invited, invitationAccepted
  String typeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the sub type of this activity as a string, in particular for attachments
  /// e.g. image, video, audio, file, link, location, etc.
  String? subTypeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activitySubTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// if the added information is a reference
  RefDetails? refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRefDetails(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RefDetails");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RefDetails._(_api, tmp4_1);
    return tmp2;
  }

  /// where to route to for the details of this activity
  String targetUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityTargetUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// where to route to for the details of this activity
  String? taskListIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityTaskListIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the object this activity happened on, if any
  ActivityObject? object() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityObject(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ActivityObject");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ActivityObject._(_api, tmp4_1);
    return tmp2;
  }

  /// get avatar uri when space avatar changed
  String? roomAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomAvatar(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// get name when space name changed
  String? roomName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// get topic when space topic changed
  String? roomTopic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// see title
  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// The title of the activity (e.g. Attachment filename or Task on TaskAdd) if given
  String? title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// content of this activity (e.g. comment), if any
  MsgContent? msgContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityMsgContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  /// the details of this membership change activity
  MembershipContent? membershipContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityMembershipContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MembershipContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MembershipContent._(_api, tmp4_1);
    return tmp2;
  }

  /// the details of this profile change activity
  ProfileContent? profileContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityProfileContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ProfileContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ProfileContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.room
  PolicyRuleRoomContent? policyRuleRoomContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityPolicyRuleRoomContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleRoomContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleRoomContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.server
  PolicyRuleServerContent? policyRuleServerContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityPolicyRuleServerContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleServerContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleServerContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.policy.rule.user
  PolicyRuleUserContent? policyRuleUserContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityPolicyRuleUserContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_PolicyRuleUserContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = PolicyRuleUserContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.avatar
  RoomAvatarContent? roomAvatarContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomAvatarContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomAvatarContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomAvatarContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.create
  RoomCreateContent? roomCreateContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomCreateContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomCreateContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomCreateContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.encryption
  RoomEncryptionContent? roomEncryptionContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomEncryptionContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomEncryptionContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomEncryptionContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.guest_access
  RoomGuestAccessContent? roomGuestAccessContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomGuestAccessContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomGuestAccessContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomGuestAccessContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.history_visibility
  RoomHistoryVisibilityContent? roomHistoryVisibilityContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomHistoryVisibilityContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomHistoryVisibilityContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomHistoryVisibilityContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.join_rules
  RoomJoinRulesContent? roomJoinRulesContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomJoinRulesContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomJoinRulesContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomJoinRulesContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.name
  RoomNameContent? roomNameContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomNameContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomNameContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomNameContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.pinned_events
  RoomPinnedEventsContent? roomPinnedEventsContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomPinnedEventsContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomPinnedEventsContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomPinnedEventsContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.power_levels
  RoomPowerLevelsContent? roomPowerLevelsContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomPowerLevelsContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomPowerLevelsContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomPowerLevelsContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.server_acl
  RoomServerAclContent? roomServerAclContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomServerAclContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomServerAclContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomServerAclContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.tombstone
  RoomTombstoneContent? roomTombstoneContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomTombstoneContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomTombstoneContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomTombstoneContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.room.topic
  RoomTopicContent? roomTopicContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityRoomTopicContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_RoomTopicContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = RoomTopicContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.space.child
  SpaceChildContent? spaceChildContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activitySpaceChildContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_SpaceChildContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = SpaceChildContent._(_api, tmp4_1);
    return tmp2;
  }

  /// covers m.space.parent
  SpaceParentContent? spaceParentContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activitySpaceParentContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_SpaceParentContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = SpaceParentContent._(_api, tmp4_1);
    return tmp2;
  }

  /// reaction specific: the reaction key used
  String? reactionKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityReactionKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// titleChange
  TitleContent? titleContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityTitleContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_TitleContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = TitleContent._(_api, tmp4_1);
    return tmp2;
  }

  /// descriptionChange
  DescriptionContent? descriptionContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityDescriptionContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_DescriptionContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = DescriptionContent._(_api, tmp4_1);
    return tmp2;
  }

  /// taskDueDateChange
  DateContent? dateContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityDateContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_DateContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = DateContent._(_api, tmp4_1);
    return tmp2;
  }

  /// eventDateChangethe
  DateTimeRangeContent? dateTimeRangeContent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityDateTimeRangeContent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_DateTimeRangeContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = DateTimeRangeContent._(_api, tmp4_1);
    return tmp2;
  }

  /// whom, if this involved additional users, e.g. when someone is invited
  /// to an object
  FfiListFfiString whom() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityWhom(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// does this mention the user
  bool mentionsYou() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activityMentionsYou(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Activities {
  final Api _api;
  final _Box _box;

  Activities._(this._api, this._box);

  /// get the activity ids from offset to limit for this activities listing
  Future<FfiListFfiString> getIds(int offset, int limit) {
    final tmp1 = offset;
    final tmp3 = limit;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    tmp4 = tmp3;
    final tmp5 = _api._activitiesGetIds(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Activities_get_ids_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__activitiesGetIdsFuturePoll);
    return tmp6;
  }

  /// Receive an update when a the activities stream has changed
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._activitiesSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Activities_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__activitiesSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class TitleContent {
  final Api _api;
  final _Box _box;

  TitleContent._(this._api, this._box);

  String change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._titleContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._titleContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class DescriptionContent {
  final Api _api;
  final _Box _box;

  DescriptionContent._(this._api, this._box);

  String change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._descriptionContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._descriptionContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class DateContent {
  final Api _api;
  final _Box _box;

  DateContent._(this._api, this._box);

  String change() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._dateContentChange(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? newVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._dateContentNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class DateTimeRangeContent {
  final Api _api;
  final _Box _box;

  DateTimeRangeContent._(this._api, this._box);

  UtcDateTime? startNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._dateTimeRangeContentStartNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UtcDateTime");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UtcDateTime._(_api, tmp4_1);
    return tmp2;
  }

  UtcDateTime? endNewVal() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._dateTimeRangeContentEndNewVal(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UtcDateTime");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UtcDateTime._(_api, tmp4_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomPreview {
  final Api _api;
  final _Box _box;

  RoomPreview._(this._api, this._box);

  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? avatarUrlStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewAvatarUrlStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? canonicalAliasStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewCanonicalAliasStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String roomTypeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewRoomTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String joinRuleStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewJoinRuleStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String stateStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewStateStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  bool? isDirect() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewIsDirect(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  bool? isWorldReadable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewIsWorldReadable(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  bool hasAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomPreviewHasAvatar(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  Future<OptionBuffer> avatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._roomPreviewAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__RoomPreview_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__roomPreviewAvatarFuturePoll);
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Category {
  final Api _api;
  final _Box _box;

  Category._(this._api, this._box);

  String title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoryTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  FfiListFfiString entries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoryEntries(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  Display? display() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoryDisplay(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_Display");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = Display._(_api, tmp4_1);
    return tmp2;
  }

  CategoryBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoryUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_CategoryBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = CategoryBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CategoryBuilder {
  final Api _api;
  final _Box _box;

  CategoryBuilder._(this._api, this._box);

  void title(String title) {
    final tmp1 = title;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._categoryBuilderTitle(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void clearEntries() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._categoryBuilderClearEntries(tmp0);
    return;
  }

  void addEntry(String entry) {
    final tmp1 = entry;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._categoryBuilderAddEntry(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  void display(Display display) {
    final tmp1 = display;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._categoryBuilderDisplay(tmp0, tmp2);
    return;
  }

  void unsetDisplay() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._categoryBuilderUnsetDisplay(tmp0);
    return;
  }

  Category build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoryBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_Category");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = Category._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Categories {
  final Api _api;
  final _Box _box;

  Categories._(this._api, this._box);

  FfiListCategory categories() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoriesCategories(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListCategory");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListCategory._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  CategoryBuilder newCategoryBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoriesNewCategoryBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_CategoryBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = CategoryBuilder._(_api, tmp3_1);
    return tmp2;
  }

  CategoriesBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._categoriesUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_CategoriesBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = CategoriesBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CategoriesBuilder {
  final Api _api;
  final _Box _box;

  CategoriesBuilder._(this._api, this._box);

  void add(Category cat) {
    final tmp1 = cat;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._categoriesBuilderAdd(tmp0, tmp2);
    return;
  }

  void clear() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._categoriesBuilderClear(tmp0);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Display {
  final Api _api;
  final _Box _box;

  Display._(this._api, this._box);

  String? iconTypeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._displayIconTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? iconStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._displayIconStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int? color() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._displayColor(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  DisplayBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._displayUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_DisplayBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = DisplayBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class DisplayBuilder {
  final Api _api;
  final _Box _box;

  DisplayBuilder._(this._api, this._box);

  void icon(String type, String value) {
    final tmp1 = type;
    final tmp5 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    _api._displayBuilderIcon(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    return;
  }

  void unsetIcon() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._displayBuilderUnsetIcon(tmp0);
    return;
  }

  void color(int color) {
    final tmp1 = color;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._displayBuilderColor(tmp0, tmp2);
    return;
  }

  void unsetColor() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._displayBuilderUnsetColor(tmp0);
    return;
  }

  Display build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._displayBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_Display");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = Display._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Space {
  final Api _api;
  final _Box _box;

  Space._(this._api, this._box);

  Future<bool> createOnboardingData() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceCreateOnboardingData(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Space_create_onboarding_data_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__spaceCreateOnboardingDataFuturePoll,
    );
    return tmp2;
  }

  /// get the room profile that contains avatar and display name
  Future<SpaceRelations> spaceRelations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceSpaceRelations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_space_relations_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceSpaceRelationsFuturePoll);
    return tmp2;
  }

  /// Whether this space is a child of the given space
  Future<bool> isChildSpaceOf(String roomId) {
    final tmp1 = roomId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceIsChildSpaceOf(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_is_child_space_of_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceIsChildSpaceOfFuturePoll);
    return tmp6;
  }

  /// add the following as a child space and return event id of that event
  /// flag as suggested or not
  Future<String> addChildRoom(String roomId, bool suggested) {
    final tmp1 = roomId;
    final tmp5 = suggested;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5 ? 1 : 0;
    final tmp7 = _api._spaceAddChildRoom(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Space_add_child_room_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__spaceAddChildRoomFuturePoll);
    return tmp8;
  }

  /// remove a child space
  Future<bool> removeChildRoom(String roomId, String? reason) {
    final tmp1 = roomId;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._spaceRemoveChildRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__Space_remove_child_room_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__spaceRemoveChildRoomFuturePoll);
    return tmp12;
  }

  /// Change the avatar of the room
  Future<MxcUri> uploadAvatar(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceUploadAvatar(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_upload_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceUploadAvatarFuturePoll);
    return tmp6;
  }

  Future<bool> setActerSpaceStates() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceSetActerSpaceStates(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Space_set_acter_space_states_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__spaceSetActerSpaceStatesFuturePoll,
    );
    return tmp2;
  }

  /// Remove the avatar of the room
  Future<EventId> removeAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRemoveAvatar(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_remove_avatar_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceRemoveAvatarFuturePoll);
    return tmp2;
  }

  /// what is the description / topic
  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool isJoined() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceIsJoined(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// set description / topic of the room
  Future<EventId> setTopic(String topic) {
    final tmp1 = topic;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetTopic(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_topic_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetTopicFuturePoll);
    return tmp6;
  }

  /// set name of the room
  Future<EventId> setName(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetName(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_name_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetNameFuturePoll);
    return tmp6;
  }

  /// is this a bookmarked space
  bool isBookmarked() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceIsBookmarked(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// set this a bookmarked space
  Future<bool> setBookmarked(bool isBookmarked) {
    final tmp1 = isBookmarked;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._spaceSetBookmarked(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Space_set_bookmarked_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__spaceSetBookmarkedFuturePoll);
    return tmp4;
  }

  /// the members currently in the space
  Future<FfiListFfiString> activeMembersIds() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceActiveMembersIds(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_active_members_ids_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceActiveMembersIdsFuturePoll);
    return tmp2;
  }

  /// the members currently in the space
  Future<FfiListMember> activeMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceActiveMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_active_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceActiveMembersFuturePoll);
    return tmp2;
  }

  /// the members invited to this room
  Future<FfiListMember> invitedMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceInvitedMembers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_invited_members_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceInvitedMembersFuturePoll);
    return tmp2;
  }

  /// the room id
  RoomId getRoomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceGetRoomId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RoomId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RoomId._(_api, tmp3_1);
    return tmp2;
  }

  /// invite the new user to this space
  Future<bool> inviteUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceInviteUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_invite_user_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceInviteUserFuturePoll);
    return tmp6;
  }

  /// the room id as str
  String getRoomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceGetRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the members currently in the room
  Future<Member> getMember(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceGetMember(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_get_member_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceGetMemberFuturePoll);
    return tmp6;
  }

  /// the Membership of myself
  Future<Member> getMyMembership() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceGetMyMembership(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_get_my_membership_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceGetMyMembershipFuturePoll);
    return tmp2;
  }

  /// whether this room is encrypted one
  Future<bool> isEncrypted() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceIsEncrypted(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_is_encrypted_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceIsEncryptedFuturePoll);
    return tmp2;
  }

  /// whether or not this space is public
  bool isPublic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceIsPublic(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// join rules for this space.
  String joinRuleStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceJoinRuleStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the ids of the rooms the restriction applies to
  FfiListFfiString restrictedRoomIdsStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRestrictedRoomIdsStr(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// whether or not this space has been marked as an 'acter' one
  Future<bool> isActerSpace() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceIsActerSpace(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_is_acter_space_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceIsActerSpaceFuturePoll);
    return tmp2;
  }

  /// the Tasks lists of this Space
  Future<FfiListTaskList> taskLists() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceTaskLists(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_task_lists_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceTaskListsFuturePoll);
    return tmp2;
  }

  /// task list draft builder
  TaskListDraft taskListDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceTaskListDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_TaskListDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = TaskListDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// get latest news
  Future<FfiListNewsEntry> latestNewsEntries(int count) {
    final tmp1 = count;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceLatestNewsEntries(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_latest_news_entries_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__spaceLatestNewsEntriesFuturePoll);
    return tmp4;
  }

  /// get latest stories
  Future<FfiListStory> latestStories(int count) {
    final tmp1 = count;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceLatestStories(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Space_latest_stories_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__spaceLatestStoriesFuturePoll);
    return tmp4;
  }

  /// get all calendar events
  Future<FfiListCalendarEvent> calendarEvents() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceCalendarEvents(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_calendar_events_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceCalendarEventsFuturePoll);
    return tmp2;
  }

  /// create calendar event draft
  CalendarEventDraft calendarEventDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceCalendarEventDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_CalendarEventDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = CalendarEventDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// create news draft
  NewsEntryDraft newsDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceNewsDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_NewsEntryDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = NewsEntryDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// create story draft
  StoryDraft storyDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceStoryDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_StoryDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = StoryDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// the pins of this Space
  Future<FfiListActerPin> pins() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spacePins(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_pins_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spacePinsFuturePoll);
    return tmp2;
  }

  /// pin draft builder
  PinDraft pinDraft() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spacePinDraft(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_PinDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = PinDraft._(_api, tmp7_1);
    return tmp2;
  }

  /// join this room
  Future<bool> join() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceJoin(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_join_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceJoinFuturePoll);
    return tmp2;
  }

  /// leave this room
  Future<bool> leave() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceLeave(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_leave_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceLeaveFuturePoll);
    return tmp2;
  }

  /// the power levels currently set up
  Future<RoomPowerLevels> powerLevels() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spacePowerLevels(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_power_levels_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spacePowerLevelsFuturePoll);
    return tmp2;
  }

  /// current App Settings
  Future<ActerAppSettings> appSettings() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceAppSettings(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_app_settings_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceAppSettingsFuturePoll);
    return tmp2;
  }

  /// Whenever this is submitted;
  Future<String> updateAppSettings(ActerAppSettingsBuilder newSettings) {
    final tmp1 = newSettings;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._spaceUpdateAppSettings(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_update_app_settings_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__spaceUpdateAppSettingsFuturePoll);
    return tmp4;
  }

  /// update the power level for a feature
  Future<bool> updateFeaturePowerLevels(String feature, int? level) {
    final tmp1 = feature;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._spaceUpdateFeaturePowerLevels(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Space_update_feature_power_levels_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__spaceUpdateFeaturePowerLevelsFuturePoll,
    );
    return tmp10;
  }

  /// update the power level for a regular room feature
  Future<bool> updateRegularPowerLevels(String feature, int level) {
    final tmp1 = feature;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._spaceUpdateRegularPowerLevels(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
    );
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__Space_update_regular_power_levels_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__spaceUpdateRegularPowerLevelsFuturePoll,
    );
    return tmp8;
  }

  /// report an event from this room
  /// score - The score to rate this content as where -100 is most offensive and 0 is inoffensive (optional).
  /// reason - The reason for the event being reported (optional).
  Future<bool> reportContent(String eventId, int? score, String? reason) {
    final tmp1 = eventId;
    final tmp5 = score;
    final tmp9 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp12 = 0;
    var tmp13 = 0;
    var tmp14 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    if (tmp9 == null) {
      tmp10 = 0;
    } else {
      tmp10 = 1;
      final tmp11 = tmp9;
      final tmp11_0 = utf8.encode(tmp11);
      tmp13 = tmp11_0.length;

      final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
      final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
      tmp12_1.setAll(0, tmp11_0);
      tmp12 = tmp12_0.address;
      tmp14 = tmp13;
    }
    final tmp15 = _api._spaceReportContent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp10,
      tmp12,
      tmp13,
      tmp14,
    );
    final tmp17 = tmp15;
    final ffi.Pointer<ffi.Void> tmp17_0 = ffi.Pointer.fromAddress(tmp17);
    final tmp17_1 = _Box(_api, tmp17_0, "__Space_report_content_future_drop");
    tmp17_1._finalizer = _api._registerFinalizer(tmp17_1);
    final tmp16 = _nativeFuture(tmp17_1, _api.__spaceReportContentFuturePoll);
    return tmp16;
  }

  /// redact an event from this room
  /// reason - The reason for the event being reported (optional).
  /// it’s the callers job to ensure the person has the privileges to
  /// redact that content.
  Future<EventId> redactContent(String eventId, String? reason) {
    final tmp1 = eventId;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._spaceRedactContent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(_api, tmp13_0, "__Space_redact_content_future_drop");
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__spaceRedactContentFuturePoll);
    return tmp12;
  }

  /// Get the categories for a specific key.
  /// currently supported: spaces, chats
  Future<Categories> categories(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceCategories(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_categories_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceCategoriesFuturePoll);
    return tmp6;
  }

  /// Set the categories for a specific key
  Future<bool> setCategories(String key, CategoriesBuilder categories) {
    final tmp1 = key;
    final tmp5 = categories;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5._box.move();
    final tmp7 = _api._spaceSetCategories(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Space_set_categories_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__spaceSetCategoriesFuturePoll);
    return tmp8;
  }

  /// get the internal reference object, defined in Room
  Future<RefDetails> refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._spaceRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Space_ref_details_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__spaceRefDetailsFuturePoll);
    return tmp2;
  }

  /// set a moderation policy rule which affects room IDs and room aliases.
  /// entity: #*:example.org
  /// reason: undesirable content
  Future<EventId> setPolicyRuleRoom(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._spaceSetPolicyRuleRoom(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Space_set_policy_rule_room_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__spaceSetPolicyRuleRoomFuturePoll,
    );
    return tmp10;
  }

  /// set a moderation policy rule which affects servers.
  /// entity: *.example.org
  /// reason: undesirable engagement
  Future<EventId> setPolicyRuleServer(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._spaceSetPolicyRuleServer(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Space_set_policy_rule_server_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__spaceSetPolicyRuleServerFuturePoll,
    );
    return tmp10;
  }

  /// set a moderation policy rule which affects users.
  /// entity: @alice*:example.org
  /// reason: undesirable behaviour
  Future<EventId> setPolicyRuleUser(String entity, String reason) {
    final tmp1 = entity;
    final tmp5 = reason;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._spaceSetPolicyRuleUser(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Space_set_policy_rule_user_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__spaceSetPolicyRuleUserFuturePoll,
    );
    return tmp10;
  }

  /// set room encryption
  /// m.olm.v1.curve25519-aes-sha2 or m.megolm.v1.aes-sha2
  Future<EventId> setEncryption(String algorithm) {
    final tmp1 = algorithm;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetEncryption(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_encryption_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetEncryptionFuturePoll);
    return tmp6;
  }

  /// set room guest access
  /// can_join or forbidden
  Future<EventId> setGuestAccess(String guestAccess) {
    final tmp1 = guestAccess;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetGuestAccess(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_guest_access_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetGuestAccessFuturePoll);
    return tmp6;
  }

  /// set room history visibility
  /// invited, joined, shared, or world_readable
  Future<EventId> setHistoryVisibility(String historyVisibility) {
    final tmp1 = historyVisibility;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetHistoryVisibility(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Space_set_history_visibility_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__spaceSetHistoryVisibilityFuturePoll,
    );
    return tmp6;
  }

  /// set room join rules
  /// invite, knock, private, or public
  Future<EventId> setJoinRules(String joinRule) {
    final tmp1 = joinRule;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetJoinRules(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_join_rules_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetJoinRulesFuturePoll);
    return tmp6;
  }

  /// set room pinned events
  /// event id array
  Future<EventId> setPinnedEvents(String eventIds) {
    final tmp1 = eventIds;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._spaceSetPinnedEvents(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Space_set_pinned_events_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__spaceSetPinnedEventsFuturePoll);
    return tmp6;
  }

  /// set ban of power levels
  Future<EventId> setPowerLevelsBan(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsBan(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_ban_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__spaceSetPowerLevelsBanFuturePoll);
    return tmp4;
  }

  /// set events of power levels
  /// event type is one of "m.room.avatar", "m.room.canonical_alias", "m.room.encryption", "m.room.history_visibility", "m.room.name", "m.room.power_levels", "m.room.server_acl", "m.room.tombstone"
  Future<EventId> setPowerLevelsEvents(String eventType, int level) {
    final tmp1 = eventType;
    final tmp5 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._spaceSetPowerLevelsEvents(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__Space_set_power_levels_events_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__spaceSetPowerLevelsEventsFuturePoll,
    );
    return tmp8;
  }

  /// set events_default of power levels
  Future<EventId> setPowerLevelsEventsDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsEventsDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_events_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsEventsDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set invite of power levels
  Future<EventId> setPowerLevelsInvite(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsInvite(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_invite_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsInviteFuturePoll,
    );
    return tmp4;
  }

  /// set kick of power levels
  Future<EventId> setPowerLevelsKick(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsKick(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_kick_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsKickFuturePoll,
    );
    return tmp4;
  }

  /// set redact of power levels
  Future<EventId> setPowerLevelsRedact(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsRedact(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_redact_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsRedactFuturePoll,
    );
    return tmp4;
  }

  /// set state_default of power levels
  Future<EventId> setPowerLevelsStateDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsStateDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_state_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsStateDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set users_default of power levels
  Future<EventId> setPowerLevelsUsersDefault(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsUsersDefault(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_users_default_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsUsersDefaultFuturePoll,
    );
    return tmp4;
  }

  /// set notifications of power levels
  Future<EventId> setPowerLevelsNotifications(int level) {
    final tmp1 = level;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._spaceSetPowerLevelsNotifications(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Space_set_power_levels_notifications_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__spaceSetPowerLevelsNotificationsFuturePoll,
    );
    return tmp4;
  }

  /// set room server acl
  /// allow_ip_literals: true
  /// allow: ["*"]
  /// deny: ["1.1.1.1"]
  Future<EventId> setServerAcl(
    bool allowIpLiterals,
    String allow,
    String deny,
  ) {
    final tmp1 = allowIpLiterals;
    final tmp3 = allow;
    final tmp7 = deny;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3_0 = utf8.encode(tmp3);
    tmp5 = tmp3_0.length;

    final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
    final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
    tmp4_1.setAll(0, tmp3_0);
    tmp4 = tmp4_0.address;
    tmp6 = tmp5;
    final tmp7_0 = utf8.encode(tmp7);
    tmp9 = tmp7_0.length;

    final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
    final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
    tmp8_1.setAll(0, tmp7_0);
    tmp8 = tmp8_0.address;
    tmp10 = tmp9;
    final tmp11 = _api._spaceSetServerAcl(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(_api, tmp13_0, "__Space_set_server_acl_future_drop");
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(tmp13_1, _api.__spaceSetServerAclFuturePoll);
    return tmp12;
  }

  /// set room tombstone
  Future<EventId> setTombstone(String body, String replacementRoomId) {
    final tmp1 = body;
    final tmp5 = replacementRoomId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._spaceSetTombstone(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Space_set_tombstone_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__spaceSetTombstoneFuturePoll);
    return tmp10;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Member {
  final Api _api;
  final _Box _box;

  Member._(this._api, this._box);

  /// get the user profile that contains avatar and display name
  UserProfile getProfile() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberGetProfile(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserProfile");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserProfile._(_api, tmp3_1);
    return tmp2;
  }

  /// Full user_id
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberUserId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// RoomId this member is attachd to
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// The status of this member.
  String membershipStatusStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberMembershipStatusStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the power level this user has
  int powerLevel() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberPowerLevel(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// Whether this user is allowed to perform the given action
  bool canString(String permission) {
    final tmp1 = permission;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._memberCanString(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final tmp6 = tmp7 > 0;
    return tmp6;
  }

  /// whether the user is being ignored
  bool isIgnored() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberIsIgnored(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// add this member to ignore list
  Future<bool> ignore() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberIgnore(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Member_ignore_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__memberIgnoreFuturePoll);
    return tmp2;
  }

  /// remove this member from ignore list
  Future<bool> unignore() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._memberUnignore(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Member_unignore_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__memberUnignoreFuturePoll);
    return tmp2;
  }

  /// kick this member from this room
  Future<bool> kick(String? msg) {
    final tmp1 = msg;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    final tmp7 = _api._memberKick(tmp0, tmp2, tmp4, tmp5, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Member_kick_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__memberKickFuturePoll);
    return tmp8;
  }

  /// ban this member from this room
  Future<bool> ban(String? msg) {
    final tmp1 = msg;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    final tmp7 = _api._memberBan(tmp0, tmp2, tmp4, tmp5, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Member_ban_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__memberBanFuturePoll);
    return tmp8;
  }

  /// remove the member ban from this room
  Future<bool> unban(String? msg) {
    final tmp1 = msg;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    final tmp7 = _api._memberUnban(tmp0, tmp2, tmp4, tmp5, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Member_unban_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__memberUnbanFuturePoll);
    return tmp8;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ActerUserAppSettings {
  final Api _api;
  final _Box _box;

  ActerUserAppSettings._(this._api, this._box);

  /// either of 'always', 'never' or 'wifiOnly'
  String? autoDownloadChat() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterUserAppSettingsAutoDownloadChat(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// whether to allow sending typing notice of users
  bool? typingNotice() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterUserAppSettingsTypingNotice(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4 > 0;
    return tmp2;
  }

  /// whether to automatically subscribe to push notifications
  /// once interacted
  bool autoSubscribeOnActivity() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterUserAppSettingsAutoSubscribeOnActivity(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// update the builder with the current settings
  /// if you intend to change anything
  ActerUserAppSettingsBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterUserAppSettingsUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_ActerUserAppSettingsBuilder");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = ActerUserAppSettingsBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ActerUserAppSettingsBuilder {
  final Api _api;
  final _Box _box;

  ActerUserAppSettingsBuilder._(this._api, this._box);

  /// either of 'always', 'never' or 'wifiOnly'
  void autoDownloadChat(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._acterUserAppSettingsBuilderAutoDownloadChat(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// whether to allow sending typing notice of users
  void typingNotice(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._acterUserAppSettingsBuilderTypingNotice(tmp0, tmp2);
    return;
  }

  /// set whether to automatically subscribe to push notifications
  /// once interacted
  void autoSubscribeOnActivity(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._acterUserAppSettingsBuilderAutoSubscribeOnActivity(tmp0, tmp2);
    return;
  }

  /// submit this updated version
  Future<bool> send() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._acterUserAppSettingsBuilderSend(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__ActerUserAppSettingsBuilder_send_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__acterUserAppSettingsBuilderSendFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class AppPermissionsBuilder {
  final Api _api;
  final _Box _box;

  AppPermissionsBuilder._(this._api, this._box);

  void news(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._appPermissionsBuilderNews(tmp0, tmp2);
    return;
  }

  void pins(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._appPermissionsBuilderPins(tmp0, tmp2);
    return;
  }

  void stories(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._appPermissionsBuilderStories(tmp0, tmp2);
    return;
  }

  void calendarEvents(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._appPermissionsBuilderCalendarEvents(tmp0, tmp2);
    return;
  }

  void tasks(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._appPermissionsBuilderTasks(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed to post boosts
  void newsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderNewsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed to post stories
  void storiesPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderStoriesPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed to post calender events
  void calendarEventsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderCalendarEventsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed for task lists
  void taskListsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderTaskListsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed for tasks
  void tasksPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderTasksPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed for pins
  void pinsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderPinsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed for comments
  void commentsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderCommentsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed for attachments
  void attachmentsPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderAttachmentsPermissions(tmp0, tmp2);
    return;
  }

  /// specific permissions levels needed to rsvp
  void rsvpPermissions(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderRsvpPermissions(tmp0, tmp2);
    return;
  }

  /// set level to kick a user
  void kick(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderKick(tmp0, tmp2);
    return;
  }

  /// set level to ban a user
  void ban(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderBan(tmp0, tmp2);
    return;
  }

  /// set level to ban a user
  void invite(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderInvite(tmp0, tmp2);
    return;
  }

  /// set level to redact user content
  void redact(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderRedact(tmp0, tmp2);
    return;
  }

  /// set default sending level if not specified
  void eventsDefault(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderEventsDefault(tmp0, tmp2);
    return;
  }

  /// set the detault level users have when entering
  void usersDefault(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderUsersDefault(tmp0, tmp2);
    return;
  }

  /// set the default state level needed if not specified
  void stateDefault(int value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    _api._appPermissionsBuilderStateDefault(tmp0, tmp2);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Account {
  final Api _api;
  final _Box _box;

  Account._(this._api, this._box);

  /// get user id of this account
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountUserId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_UserId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = UserId._(_api, tmp3_1);
    return tmp2;
  }

  /// The display_name of the account
  Future<OptionString> displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountDisplayName(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Account_display_name_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__accountDisplayNameFuturePoll);
    return tmp2;
  }

  /// Change the display name of the account
  Future<bool> setDisplayName(String name) {
    final tmp1 = name;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountSetDisplayName(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_set_display_name_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountSetDisplayNameFuturePoll);
    return tmp6;
  }

  /// The avatar of the client
  /// if thumb size is given, avatar thumbnail is returned
  /// if thumb size is not given, avatar file is returned
  Future<OptionBuffer> avatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._accountAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountAvatarFuturePoll);
    return tmp6;
  }

  /// Change the avatar of the account with the provided
  /// local file path
  Future<MxcUri> uploadAvatar(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountUploadAvatar(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_upload_avatar_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountUploadAvatarFuturePoll);
    return tmp6;
  }

  /// list of users by blocked by this user
  Future<FfiListUserId> ignoredUsers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountIgnoredUsers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Account_ignored_users_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__accountIgnoredUsersFuturePoll);
    return tmp2;
  }

  /// add user_id to ignore list
  Future<bool> ignoreUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountIgnoreUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_ignore_user_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountIgnoreUserFuturePoll);
    return tmp6;
  }

  /// remove user_id from ignore list
  Future<bool> unignoreUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountUnignoreUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_unignore_user_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountUnignoreUserFuturePoll);
    return tmp6;
  }

  /// the current app settings
  Future<ActerUserAppSettings> acterAppSettings() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountActerAppSettings(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Account_acter_app_settings_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__accountActerAppSettingsFuturePoll,
    );
    return tmp2;
  }

  /// listen to updates to the app settings
  Stream<bool> subscribeAppSettingsStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountSubscribeAppSettingsStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Account_subscribe_app_settings_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__accountSubscribeAppSettingsStreamStreamPoll,
    );
    return tmp2;
  }

  /// deactivate the account. This can not be reversed. The username will
  /// be blocked from any future usage, all personal data will be removed.
  Future<bool> deactivate(String password) {
    final tmp1 = password;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountDeactivate(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Account_deactivate_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__accountDeactivateFuturePoll);
    return tmp6;
  }

  /// change password
  Future<bool> changePassword(String oldVal, String newVal) {
    final tmp1 = oldVal;
    final tmp5 = newVal;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._accountChangePassword(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Account_change_password_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__accountChangePasswordFuturePoll,
    );
    return tmp10;
  }

  /// get email addresses from third party identifier
  Future<FfiListFfiString> confirmedEmailAddresses() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountConfirmedEmailAddresses(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Account_confirmed_email_addresses_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__accountConfirmedEmailAddressesFuturePoll,
    );
    return tmp2;
  }

  /// get email addresses that were registered
  Future<FfiListFfiString> requestedEmailAddresses() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountRequestedEmailAddresses(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Account_requested_email_addresses_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__accountRequestedEmailAddressesFuturePoll,
    );
    return tmp2;
  }

  /// Requests token via email and add email address to third party identifier.
  /// If password is not enough complex, homeserver may reject this request.
  Future<ThreePidEmailTokenResponse> request3pidManagementTokenViaEmail(
    String emailAddress,
  ) {
    final tmp1 = emailAddress;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountRequest3pidManagementTokenViaEmail(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Account_request_3pid_management_token_via_email_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__accountRequest3pidManagementTokenViaEmailFuturePoll,
    );
    return tmp6;
  }

  /// get the array of registered 3pid on the homeserver for this account
  Future<FfiListExternalId> externalIds() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountExternalIds(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Account_external_ids_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__accountExternalIdsFuturePoll);
    return tmp2;
  }

  /// find out session id that is related with email address and add email address to account using session id & password
  Future<bool> tryConfirmEmailStatus(String emailAddress, String password) {
    final tmp1 = emailAddress;
    final tmp5 = password;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._accountTryConfirmEmailStatus(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Account_try_confirm_email_status_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__accountTryConfirmEmailStatusFuturePoll,
    );
    return tmp10;
  }

  /// Submit token to finish email register
  Future<bool> submitTokenFromEmail(
    String emailAddress,
    String token,
    String password,
  ) {
    final tmp1 = emailAddress;
    final tmp5 = token;
    final tmp9 = password;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9_0 = utf8.encode(tmp9);
    tmp11 = tmp9_0.length;

    final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
    final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
    tmp10_1.setAll(0, tmp9_0);
    tmp10 = tmp10_0.address;
    tmp12 = tmp11;
    final tmp13 = _api._accountSubmitTokenFromEmail(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
    );
    final tmp15 = tmp13;
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Account_submit_token_from_email_future_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp14 = _nativeFuture(
      tmp15_1,
      _api.__accountSubmitTokenFromEmailFuturePoll,
    );
    return tmp14;
  }

  /// Remove email address from confirmed list or unconfirmed list
  Future<bool> removeEmailAddress(String emailAddress) {
    final tmp1 = emailAddress;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._accountRemoveEmailAddress(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Account_remove_email_address_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__accountRemoveEmailAddressFuturePoll,
    );
    return tmp6;
  }

  /// Get the Bookmarks manager
  Future<Bookmarks> bookmarks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._accountBookmarks(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Account_bookmarks_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__accountBookmarksFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ExternalId {
  final Api _api;
  final _Box _box;

  ExternalId._(this._api, this._box);

  /// get address of 3pid
  String address() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._externalIdAddress(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get medium of 3pid
  /// one of [email, msisdn]
  String medium() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._externalIdMedium(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get time when the homeserver associated the third party identifier with the user
  int addedAt() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._externalIdAddedAt(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// get time when the identifier was validated by the identity server
  int validatedAt() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._externalIdValidatedAt(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class ThreePidEmailTokenResponse {
  final Api _api;
  final _Box _box;

  ThreePidEmailTokenResponse._(this._api, this._box);

  /// get session id
  String sid() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._threePidEmailTokenResponseSid(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get submit url
  String? submitUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._threePidEmailTokenResponseSubmitUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// get client secret
  String clientSecret() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._threePidEmailTokenResponseClientSecret(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class Bookmarks {
  final Api _api;
  final _Box _box;

  Bookmarks._(this._api, this._box);

  /// get the list of bookmarks for a specific key
  FfiListFfiString entries(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._bookmarksEntries(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_FfiListFfiString");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp8 = FfiListFfiString._(_api, tmp7_1);
    final tmp6 = tmp8;
    return tmp6;
  }

  /// add the following entry to the bookmarks of key
  Future<bool> add(String key, String entry) {
    final tmp1 = key;
    final tmp5 = entry;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._bookmarksAdd(tmp0, tmp2, tmp3, tmp4, tmp6, tmp7, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Bookmarks_add_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__bookmarksAddFuturePoll);
    return tmp10;
  }

  /// remove the following entry from the bookmarks of key
  Future<bool> remove(String key, String entry) {
    final tmp1 = key;
    final tmp5 = entry;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._bookmarksRemove(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Bookmarks_remove_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__bookmarksRemoveFuturePoll);
    return tmp10;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SyncState {
  final Api _api;
  final _Box _box;

  SyncState._(this._api, this._box);

  /// Get event handler of first synchronization on every launch
  Stream<bool> firstSyncedRx() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._syncStateFirstSyncedRx(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__SyncState_first_synced_rx_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__syncStateFirstSyncedRxStreamPoll);
    return tmp2;
  }

  /// When the sync stopped with an error, this will trigger
  Stream<String> syncErrorRx() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._syncStateSyncErrorRx(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__SyncState_sync_error_rx_stream_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__syncStateSyncErrorRxStreamPoll);
    return tmp2;
  }

  /// stop the sync loop
  void cancel() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    _api._syncStateCancel(tmp0);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PublicSearchResultItem {
  final Api _api;
  final _Box _box;

  PublicSearchResultItem._(this._api, this._box);

  String? name() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? topic() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemTopic(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool worldReadable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemWorldReadable(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool guestCanJoin() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemGuestCanJoin(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  String? canonicalAliasStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemCanonicalAliasStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  int numJoinedMembers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemNumJoinedMembers(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? avatarUrlStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemAvatarUrlStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String joinRuleStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemJoinRuleStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String roomTypeStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemRoomTypeStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// whether to have avatar
  bool hasAvatar() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultItemHasAvatar(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// get the binary data of avatar
  /// if thumb size is given, avatar thumbnail is returned
  /// if thumb size is not given, avatar file is returned
  Future<OptionBuffer> getAvatar(ThumbnailSize? thumbSize) {
    final tmp1 = thumbSize;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3._box.move();
    }
    final tmp5 = _api._publicSearchResultItemGetAvatar(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__PublicSearchResultItem_get_avatar_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__publicSearchResultItemGetAvatarFuturePoll,
    );
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class PublicSearchResult {
  final Api _api;
  final _Box _box;

  PublicSearchResult._(this._api, this._box);

  /// to be used for the next `since`
  String? nextBatch() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultNextBatch(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// to get the previous page
  String? prevBatch() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultPrevBatch(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// an estimated total of matches
  int? totalRoomCountEstimate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultTotalRoomCountEstimate(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get the chunk of items in this response
  FfiListPublicSearchResultItem chunks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._publicSearchResultChunks(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListPublicSearchResultItem");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListPublicSearchResultItem._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NotificationSender {
  final Api _api;
  final _Box _box;

  NotificationSender._(this._api, this._box);

  String userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationSenderUserId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationSenderDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool hasImage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationSenderHasImage(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  Future<FfiBufferUint8> image() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationSenderImage(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NotificationSender_image_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__notificationSenderImageFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NotificationRoom {
  final Api _api;
  final _Box _box;

  NotificationRoom._(this._api, this._box);

  String roomId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationRoomRoomId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationRoomDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  bool hasImage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationRoomHasImage(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  Future<FfiBufferUint8> image() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationRoomImage(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NotificationRoom_image_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__notificationRoomImageFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NotificationItem {
  final Api _api;
  final _Box _box;

  NotificationItem._(this._api, this._box);

  String pushStyle() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemPushStyle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String title() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemTitle(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  NotificationSender sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemSender(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_NotificationSender");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = NotificationSender._(_api, tmp3_1);
    return tmp2;
  }

  ActivityObject? parent() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemParent(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_ActivityObject");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = ActivityObject._(_api, tmp4_1);
    return tmp2;
  }

  String? parentIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemParentIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  NotificationRoom room() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemRoom(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_NotificationRoom");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = NotificationRoom._(_api, tmp3_1);
    return tmp2;
  }

  String targetUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemTargetUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  MsgContent? body() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemBody(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_MsgContent");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = MsgContent._(_api, tmp4_1);
    return tmp2;
  }

  String? iconUrl() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemIconUrl(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  String? threadId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemThreadId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  bool noisy() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemNoisy(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  bool hasImage() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemHasImage(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  Future<FfiBufferUint8> image() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemImage(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__NotificationItem_image_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__notificationItemImageFuturePoll);
    return tmp2;
  }

  Future<String> imagePath(String tmpDir) {
    final tmp1 = tmpDir;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._notificationItemImagePath(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__NotificationItem_image_path_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__notificationItemImagePathFuturePoll,
    );
    return tmp6;
  }

  /// if this is an invite, this the room it invites to
  String? roomInviteStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemRoomInviteStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// reaction specific: the reaction key used
  String? reactionKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemReactionKey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the start datetime on eventDateChange
  UtcDateTime? utcStart() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemUtcStart(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UtcDateTime");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UtcDateTime._(_api, tmp4_1);
    return tmp2;
  }

  /// the end datetime on eventDateChange
  UtcDateTime? utcEnd() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemUtcEnd(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UtcDateTime");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UtcDateTime._(_api, tmp4_1);
    return tmp2;
  }

  /// the date on taskDueDateChange
  String? dueDate() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemDueDate(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// does this mention the user
  bool mentionsYou() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemMentionsYou(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// does this involve other users than the sender?
  FfiListFfiString whom() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationItemWhom(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// The pusher we sent notifications via to the user
class Pusher {
  final Api _api;
  final _Box _box;

  Pusher._(this._api, this._box);

  bool isEmailPusher() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherIsEmailPusher(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  String pushkey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherPushkey(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String appId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherAppId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String appDisplayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherAppDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String deviceDisplayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherDeviceDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String lang() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherLang(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  String? profileTag() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherProfileTag(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  Future<bool> delete() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._pusherDelete(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Pusher_delete_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__pusherDeleteFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CreateConvoSettingsBuilder {
  final Api _api;
  final _Box _box;

  CreateConvoSettingsBuilder._(this._api, this._box);

  /// set the name of convo
  void setName(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createConvoSettingsBuilderSetName(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the alias of convo
  void setAlias(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createConvoSettingsBuilderSetAlias(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// append user id that will be invited to this space
  void addInvitee(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._createConvoSettingsBuilderAddInvitee(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the topic of convo
  void setTopic(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createConvoSettingsBuilderSetTopic(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the avatar uri of convo
  /// both remote and local are allowed
  void setAvatarUri(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createConvoSettingsBuilderSetAvatarUri(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the parent of convo
  void setParent(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._createConvoSettingsBuilderSetParent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  CreateConvoSettings build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._createConvoSettingsBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_CreateConvoSettings");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = CreateConvoSettings._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CreateConvoSettings {
  final Api _api;
  final _Box _box;

  CreateConvoSettings._(this._api, this._box);

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CreateSpaceSettingsBuilder {
  final Api _api;
  final _Box _box;

  CreateSpaceSettingsBuilder._(this._api, this._box);

  /// set the name of convo
  void setName(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderSetName(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the space’s visibility to either Public or Private
  void setVisibility(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderSetVisibility(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set who can join the space. either public, private, knock, knockrestricted, restricted
  void joinRule(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderJoinRule(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// append user id that will be invited to this space
  void addInvitee(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._createSpaceSettingsBuilderAddInvitee(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the alias of space
  void setAlias(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderSetAlias(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the topic of space
  void setTopic(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderSetTopic(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the avatar uri of space
  /// both remote and local are allowed
  void setAvatarUri(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._createSpaceSettingsBuilderSetAvatarUri(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the parent of space
  /// if the join rule is restricted or knockrestricted AND a parent is set
  /// the space will be a subspace of the parent space
  void setParent(String value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._createSpaceSettingsBuilderSetParent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    return;
  }

  /// set the permissions for apps and events for the space creation
  void setPermissions(AppPermissionsBuilder value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    _api._createSpaceSettingsBuilderSetPermissions(tmp0, tmp2);
    return;
  }

  CreateSpaceSettings build() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._createSpaceSettingsBuilderBuild(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_CreateSpaceSettings");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = CreateSpaceSettings._(_api, tmp7_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class CreateSpaceSettings {
  final Api _api;
  final _Box _box;

  CreateSpaceSettings._(this._api, this._box);

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class InvitationsManager {
  final Api _api;
  final _Box _box;

  InvitationsManager._(this._api, this._box);

  /// current set of rooms that the user is invited to
  Future<FfiListRoomInvitation> roomInvitations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._invitationsManagerRoomInvitations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__InvitationsManager_room_invitations_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__invitationsManagerRoomInvitationsFuturePoll,
    );
    return tmp2;
  }

  /// current set of objects that the user is invited to
  Future<FfiListFfiString> objectInvitations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._invitationsManagerObjectInvitations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__InvitationsManager_object_invitations_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__invitationsManagerObjectInvitationsFuturePoll,
    );
    return tmp2;
  }

  /// whenever an update occurs
  Stream<bool> subscribeStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._invitationsManagerSubscribeStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__InvitationsManager_subscribe_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__invitationsManagerSubscribeStreamStreamPoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Main entry point for `acter`.
class Client {
  final Api _api;
  final _Box _box;

  Client._(this._api, this._box);

  /// start the sync
  SyncState startSync() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientStartSync(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_SyncState");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SyncState._(_api, tmp3_1);
    return tmp2;
  }

  /// Get the restore token for this session
  Future<String> restoreToken() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientRestoreToken(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_restore_token_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientRestoreTokenFuturePoll);
    return tmp2;
  }

  /// Whether the client is registered as a guest account
  bool isGuest() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientIsGuest(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Whether the client has finished a first sync run
  bool hasFirstSynced() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientHasFirstSynced(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Whether the client is syncing
  bool isSyncing() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientIsSyncing(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// return the account of the logged in user, if given
  Account account() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientAccount(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_Account");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = Account._(_api, tmp7_1);
    return tmp2;
  }

  /// The device_id of the client
  DeviceId deviceId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientDeviceId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_DeviceId");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = DeviceId._(_api, tmp7_1);
    return tmp2;
  }

  /// The user_id of the client
  /// deprecated, please use account() instead.
  UserId userId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientUserId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_UserId");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = UserId._(_api, tmp7_1);
    return tmp2;
  }

  /// Get the generic room that user belongs to
  Future<Room> room(String roomIdOrAlias) {
    final tmp1 = roomIdOrAlias;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientRoom(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_room_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientRoomFuturePoll);
    return tmp6;
  }

  /// get convo room
  Future<Convo> convo(String roomIdOrAlias) {
    final tmp1 = roomIdOrAlias;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientConvo(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_convo_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientConvoFuturePoll);
    return tmp6;
  }

  /// has convo room
  Future<bool> hasConvo(String roomId) {
    final tmp1 = roomId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientHasConvo(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_has_convo_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientHasConvoFuturePoll);
    return tmp6;
  }

  /// get convo room of retry 250ms for retry times
  Future<Convo> convoWithRetry(String roomIdOrAlias, int retry) {
    final tmp1 = roomIdOrAlias;
    final tmp5 = retry;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5;
    final tmp7 = _api._clientConvoWithRetry(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Client_convo_with_retry_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__clientConvoWithRetryFuturePoll);
    return tmp8;
  }

  /// get the room id of dm from user id
  OptionString dmWithUser(String userId) {
    final tmp1 = userId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientDmWithUser(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_OptionString");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = OptionString._(_api, tmp11_1);
    return tmp6;
  }

  /// upload file and return remote url
  Future<MxcUri> uploadMedia(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientUploadMedia(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_upload_media_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientUploadMediaFuturePoll);
    return tmp6;
  }

  /// Fires whenever the convo list changes (in order or number)
  /// fires immediately with the current state of convos
  Stream<ConvoDiff> convosStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientConvosStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_convos_stream_stream_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__clientConvosStreamStreamPoll);
    return tmp2;
  }

  /// The spaces the user is part of
  Future<FfiListSpace> spaces() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientSpaces(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_spaces_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientSpacesFuturePoll);
    return tmp2;
  }

  /// Fires whenever the space list changes (in order or number)
  /// fires immediately with the current state of spaces
  Stream<SpaceDiff> spacesStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientSpacesStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_spaces_stream_stream_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__clientSpacesStreamStreamPoll);
    return tmp2;
  }

  /// attempt to join a room
  Future<Room> joinRoom(String roomIdOrAlias, VecStringBuilder serverNames) {
    final tmp1 = roomIdOrAlias;
    final tmp5 = serverNames;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5._box.move();
    final tmp7 = _api._clientJoinRoom(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Client_join_room_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__clientJoinRoomFuturePoll);
    return tmp8;
  }

  /// Get the space that user belongs to
  Future<Space> space(String roomIdOrAlias) {
    final tmp1 = roomIdOrAlias;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSpace(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_space_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientSpaceFuturePoll);
    return tmp6;
  }

  /// Get the invitation event stream
  InvitationsManager invitations() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientInvitations(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_InvitationsManager");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = InvitationsManager._(_api, tmp3_1);
    return tmp2;
  }

  /// the users out of room
  Future<FfiListUserProfile> suggestedUsers(String? roomName) {
    final tmp1 = roomName;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    final tmp7 = _api._clientSuggestedUsers(tmp0, tmp2, tmp4, tmp5, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Client_suggested_users_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__clientSuggestedUsersFuturePoll);
    return tmp8;
  }

  /// search the user directory
  Future<FfiListUserProfile> searchUsers(String searchTerm) {
    final tmp1 = searchTerm;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSearchUsers(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_search_users_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientSearchUsersFuturePoll);
    return tmp6;
  }

  /// search the public directory for rooms
  Future<PublicSearchResult> searchPublicRoom(
    String? searchTerm,
    String? server,
    String? roomFilter,
    String? since,
  ) {
    final tmp1 = searchTerm;
    final tmp7 = server;
    final tmp13 = roomFilter;
    final tmp19 = since;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp5 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    var tmp20 = 0;
    var tmp22 = 0;
    var tmp23 = 0;
    var tmp24 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      final tmp3_0 = utf8.encode(tmp3);
      tmp5 = tmp3_0.length;

      final ffi.Pointer<ffi.Uint8> tmp4_0 = _api.__allocate(tmp5 * 1, 1);
      final Uint8List tmp4_1 = tmp4_0.asTypedList(tmp5);
      tmp4_1.setAll(0, tmp3_0);
      tmp4 = tmp4_0.address;
      tmp6 = tmp5;
    }
    if (tmp7 == null) {
      tmp8 = 0;
    } else {
      tmp8 = 1;
      final tmp9 = tmp7;
      final tmp9_0 = utf8.encode(tmp9);
      tmp11 = tmp9_0.length;

      final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
      final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
      tmp10_1.setAll(0, tmp9_0);
      tmp10 = tmp10_0.address;
      tmp12 = tmp11;
    }
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    if (tmp19 == null) {
      tmp20 = 0;
    } else {
      tmp20 = 1;
      final tmp21 = tmp19;
      final tmp21_0 = utf8.encode(tmp21);
      tmp23 = tmp21_0.length;

      final ffi.Pointer<ffi.Uint8> tmp22_0 = _api.__allocate(tmp23 * 1, 1);
      final Uint8List tmp22_1 = tmp22_0.asTypedList(tmp23);
      tmp22_1.setAll(0, tmp21_0);
      tmp22 = tmp22_0.address;
      tmp24 = tmp23;
    }
    final tmp25 = _api._clientSearchPublicRoom(
      tmp0,
      tmp2,
      tmp4,
      tmp5,
      tmp6,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
      tmp20,
      tmp22,
      tmp23,
      tmp24,
    );
    final tmp27 = tmp25;
    final ffi.Pointer<ffi.Void> tmp27_0 = ffi.Pointer.fromAddress(tmp27);
    final tmp27_1 = _Box(
      _api,
      tmp27_0,
      "__Client_search_public_room_future_drop",
    );
    tmp27_1._finalizer = _api._registerFinalizer(tmp27_1);
    final tmp26 = _nativeFuture(
      tmp27_1,
      _api.__clientSearchPublicRoomFuturePoll,
    );
    return tmp26;
  }

  /// Whether the user already verified the device
  Future<bool> verifiedDevice(String devId) {
    final tmp1 = devId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientVerifiedDevice(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_verified_device_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientVerifiedDeviceFuturePoll);
    return tmp6;
  }

  /// log out this client
  Future<bool> logout() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientLogout(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_logout_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientLogoutFuturePoll);
    return tmp2;
  }

  /// Get the verification event receiver
  Stream<VerificationEvent> verificationEventRx() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientVerificationEventRx(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Client_verification_event_rx_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__clientVerificationEventRxStreamPoll,
    );
    return tmp2;
  }

  /// Get session manager that returns all/verified/unverified/inactive session list
  SessionManager sessionManager() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientSessionManager(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_SessionManager");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SessionManager._(_api, tmp3_1);
    return tmp2;
  }

  /// Trigger verification of another device
  /// returns flow id of verification
  Future<VerificationEvent> requestVerification(String devId) {
    final tmp1 = devId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientRequestVerification(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_request_verification_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__clientRequestVerificationFuturePoll,
    );
    return tmp6;
  }

  /// install verification request event handler
  Future<bool> installRequestEventHandler(String flowId) {
    final tmp1 = flowId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientInstallRequestEventHandler(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_install_request_event_handler_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__clientInstallRequestEventHandlerFuturePoll,
    );
    return tmp6;
  }

  /// install sas verification event handler
  Future<bool> installSasEventHandler(String flowId) {
    final tmp1 = flowId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientInstallSasEventHandler(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_install_sas_event_handler_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__clientInstallSasEventHandlerFuturePoll,
    );
    return tmp6;
  }

  /// Return the event handler that new device was found or existing device was changed
  Stream<DeviceEvent> deviceEventRx() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientDeviceEventRx(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_device_event_rx_stream_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(tmp3_1, _api.__clientDeviceEventRxStreamPoll);
    return tmp2;
  }

  /// Return the typing event receiver
  Stream<TypingEvent> subscribeToTypingEventStream(String roomId) {
    final tmp1 = roomId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeToTypingEventStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_subscribe_to_typing_event_stream_stream_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeStream(
      tmp7_1,
      _api.__clientSubscribeToTypingEventStreamStreamPoll,
    );
    return tmp6;
  }

  /// create convo
  Future<RoomId> createConvo(CreateConvoSettings settings) {
    final tmp1 = settings;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._clientCreateConvo(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Client_create_convo_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__clientCreateConvoFuturePoll);
    return tmp4;
  }

  /// create default space
  Future<RoomId> createActerSpace(CreateSpaceSettings settings) {
    final tmp1 = settings;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._clientCreateActerSpace(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Client_create_acter_space_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__clientCreateActerSpaceFuturePoll);
    return tmp4;
  }

  /// listen to updates to any section
  Stream<bool> subscribeSectionStream(String section) {
    final tmp1 = section;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeSectionStream(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_subscribe_section_stream_stream_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = _nativeStream(
      tmp11_1,
      _api.__clientSubscribeSectionStreamStreamPoll,
    );
    return tmp6;
  }

  /// listen to updates to any model
  Stream<bool> subscribeModelStream(String modelId) {
    final tmp1 = modelId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeModelStream(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_subscribe_model_stream_stream_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = _nativeStream(
      tmp11_1,
      _api.__clientSubscribeModelStreamStreamPoll,
    );
    return tmp6;
  }

  /// listen to updates to objects of a model, e.g. rsvp or comments
  Stream<bool> subscribeModelObjectsStream(String modelId, String sublist) {
    final tmp1 = modelId;
    final tmp5 = sublist;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientSubscribeModelObjectsStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Client_subscribe_model_objects_stream_stream_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = _nativeStream(
      tmp15_1,
      _api.__clientSubscribeModelObjectsStreamStreamPoll,
    );
    return tmp10;
  }

  /// listen to updates to any room parameter
  Stream<bool> subscribeModelParamStream(String key, String param) {
    final tmp1 = key;
    final tmp5 = param;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientSubscribeModelParamStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Client_subscribe_model_param_stream_stream_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = _nativeStream(
      tmp15_1,
      _api.__clientSubscribeModelParamStreamStreamPoll,
    );
    return tmp10;
  }

  /// listen to updates to any room
  Stream<bool> subscribeRoomStream(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeRoomStream(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_subscribe_room_stream_stream_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = _nativeStream(
      tmp11_1,
      _api.__clientSubscribeRoomStreamStreamPoll,
    );
    return tmp6;
  }

  /// listen to updates to any room parameter
  Stream<bool> subscribeRoomParamStream(String key, String param) {
    final tmp1 = key;
    final tmp5 = param;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientSubscribeRoomParamStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Client_subscribe_room_param_stream_stream_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = _nativeStream(
      tmp15_1,
      _api.__clientSubscribeRoomParamStreamStreamPoll,
    );
    return tmp10;
  }

  /// listen to updates to a room section
  Stream<bool> subscribeRoomSectionStream(String key, String section) {
    final tmp1 = key;
    final tmp5 = section;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientSubscribeRoomSectionStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Client_subscribe_room_section_stream_stream_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = _nativeStream(
      tmp15_1,
      _api.__clientSubscribeRoomSectionStreamStreamPoll,
    );
    return tmp10;
  }

  /// listen to updates to any event type
  Stream<bool> subscribeEventTypeStream(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeEventTypeStream(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_subscribe_event_type_stream_stream_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = _nativeStream(
      tmp11_1,
      _api.__clientSubscribeEventTypeStreamStreamPoll,
    );
    return tmp6;
  }

  /// listen to account data updates
  Stream<bool> subscribeAccountDataStream(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientSubscribeAccountDataStream(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_subscribe_account_data_stream_stream_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = _nativeStream(
      tmp11_1,
      _api.__clientSubscribeAccountDataStreamStreamPoll,
    );
    return tmp6;
  }

  /// listen to account data updates of specific room
  Stream<bool> subscribeRoomAccountDataStream(String room, String key) {
    final tmp1 = room;
    final tmp5 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientSubscribeRoomAccountDataStream(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__Client_subscribe_room_account_data_stream_stream_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = _nativeStream(
      tmp15_1,
      _api.__clientSubscribeRoomAccountDataStreamStreamPoll,
    );
    return tmp10;
  }

  /// Find the room or wait until it becomes available
  Future<bool> waitForRoom(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForRoom(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_room_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForRoomFuturePoll);
    return tmp10;
  }

  /// Fetch the Comment or use its event_id to wait for it to come down the wire
  Future<Comment> waitForComment(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForComment(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_wait_for_comment_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForCommentFuturePoll);
    return tmp10;
  }

  /// Fetch the NewsEntry or use its event_id to wait for it to come down the wire
  Future<NewsEntry> waitForNews(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForNews(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_news_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForNewsFuturePoll);
    return tmp10;
  }

  /// Get the latest News for the client
  Future<FfiListNewsEntry> latestNewsEntries(int count) {
    final tmp1 = count;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._clientLatestNewsEntries(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__Client_latest_news_entries_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__clientLatestNewsEntriesFuturePoll,
    );
    return tmp4;
  }

  /// Fetch the Story or use its event_id to wait for it to come down the wire
  Future<Story> waitForStory(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForStory(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_story_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForStoryFuturePoll);
    return tmp10;
  }

  /// Get the Stories for the client
  Future<FfiListStory> latestStories(int count) {
    final tmp1 = count;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1;
    final tmp3 = _api._clientLatestStories(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Client_latest_stories_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__clientLatestStoriesFuturePoll);
    return tmp4;
  }

  /// Fetch the ActerPin or use its event_id to wait for it to come down the wire
  Future<ActerPin> waitForPin(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForPin(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_pin_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForPinFuturePoll);
    return tmp10;
  }

  /// Get the Pins for the client
  Future<FfiListActerPin> pins() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientPins(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_pins_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientPinsFuturePoll);
    return tmp2;
  }

  /// Get a specific Pin for the client
  Future<ActerPin> pin(String pinId) {
    final tmp1 = pinId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientPin(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_pin_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientPinFuturePoll);
    return tmp6;
  }

  /// Fetch the Tasklist or use its event_id to wait for it to come down the wire
  Future<TaskList> taskList(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientTaskList(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_task_list_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientTaskListFuturePoll);
    return tmp10;
  }

  /// the Tasks lists for the client
  Future<FfiListTaskList> taskLists() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientTaskLists(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_task_lists_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientTaskListsFuturePoll);
    return tmp2;
  }

  /// Fetch the Task or use its event_id to wait for it to come down the wire
  Future<Task> waitForTask(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForTask(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_task_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForTaskFuturePoll);
    return tmp10;
  }

  /// the Tasks lists of this Space
  Future<FfiListTask> myOpenTasks() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientMyOpenTasks(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_my_open_tasks_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientMyOpenTasksFuturePoll);
    return tmp2;
  }

  /// listen to updates of the my_open_tasks list
  Stream<bool> subscribeMyOpenTasksStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientSubscribeMyOpenTasksStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Client_subscribe_my_open_tasks_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__clientSubscribeMyOpenTasksStreamStreamPoll,
    );
    return tmp2;
  }

  /// get all calendar events
  Future<FfiListCalendarEvent> calendarEvents() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientCalendarEvents(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_calendar_events_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientCalendarEventsFuturePoll);
    return tmp2;
  }

  /// Get a specific Calendar Event for the client
  Future<CalendarEvent> calendarEvent(String calendarId) {
    final tmp1 = calendarId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientCalendarEvent(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_calendar_event_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientCalendarEventFuturePoll);
    return tmp6;
  }

  /// Fetch the calendar event or use its event_id to wait for it to come down the wire
  Future<CalendarEvent> waitForCalendarEvent(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForCalendarEvent(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_wait_for_calendar_event_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__clientWaitForCalendarEventFuturePoll,
    );
    return tmp10;
  }

  /// Fetch the reaction event or use its event_id to wait for it to come down the wire
  Future<Reaction> waitForReaction(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForReaction(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_wait_for_reaction_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__clientWaitForReactionFuturePoll,
    );
    return tmp10;
  }

  /// Fetch the RSVP or use its event_id to wait for it to come down the wire
  Future<Rsvp> waitForRsvp(String key, int? timeout) {
    final tmp1 = key;
    final tmp5 = timeout;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      tmp8 = tmp7;
    }
    final tmp9 = _api._clientWaitForRsvp(tmp0, tmp2, tmp3, tmp4, tmp6, tmp8);
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "__Client_wait_for_rsvp_future_drop");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(tmp11_1, _api.__clientWaitForRsvpFuturePoll);
    return tmp10;
  }

  /// install the default acter push rules for fallback
  Future<bool> installDefaultActerPushRules() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientInstallDefaultActerPushRules(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Client_install_default_acter_push_rules_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__clientInstallDefaultActerPushRulesFuturePoll,
    );
    return tmp2;
  }

  /// list of pushers
  Future<FfiListPusher> pushers() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientPushers(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__Client_pushers_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__clientPushersFuturePoll);
    return tmp2;
  }

  /// add another http pusher to the notification system
  Future<bool> addPusher(
    String appId,
    String token,
    String deviceName,
    String appName,
    String serverUrl,
    bool withIosDefault,
    String? lang,
  ) {
    final tmp1 = appId;
    final tmp5 = token;
    final tmp9 = deviceName;
    final tmp13 = appName;
    final tmp17 = serverUrl;
    final tmp21 = withIosDefault;
    final tmp23 = lang;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp15 = 0;
    var tmp16 = 0;
    var tmp18 = 0;
    var tmp19 = 0;
    var tmp20 = 0;
    var tmp22 = 0;
    var tmp24 = 0;
    var tmp26 = 0;
    var tmp27 = 0;
    var tmp28 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9_0 = utf8.encode(tmp9);
    tmp11 = tmp9_0.length;

    final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
    final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
    tmp10_1.setAll(0, tmp9_0);
    tmp10 = tmp10_0.address;
    tmp12 = tmp11;
    final tmp13_0 = utf8.encode(tmp13);
    tmp15 = tmp13_0.length;

    final ffi.Pointer<ffi.Uint8> tmp14_0 = _api.__allocate(tmp15 * 1, 1);
    final Uint8List tmp14_1 = tmp14_0.asTypedList(tmp15);
    tmp14_1.setAll(0, tmp13_0);
    tmp14 = tmp14_0.address;
    tmp16 = tmp15;
    final tmp17_0 = utf8.encode(tmp17);
    tmp19 = tmp17_0.length;

    final ffi.Pointer<ffi.Uint8> tmp18_0 = _api.__allocate(tmp19 * 1, 1);
    final Uint8List tmp18_1 = tmp18_0.asTypedList(tmp19);
    tmp18_1.setAll(0, tmp17_0);
    tmp18 = tmp18_0.address;
    tmp20 = tmp19;
    tmp22 = tmp21 ? 1 : 0;
    if (tmp23 == null) {
      tmp24 = 0;
    } else {
      tmp24 = 1;
      final tmp25 = tmp23;
      final tmp25_0 = utf8.encode(tmp25);
      tmp27 = tmp25_0.length;

      final ffi.Pointer<ffi.Uint8> tmp26_0 = _api.__allocate(tmp27 * 1, 1);
      final Uint8List tmp26_1 = tmp26_0.asTypedList(tmp27);
      tmp26_1.setAll(0, tmp25_0);
      tmp26 = tmp26_0.address;
      tmp28 = tmp27;
    }
    final tmp29 = _api._clientAddPusher(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp15,
      tmp16,
      tmp18,
      tmp19,
      tmp20,
      tmp22,
      tmp24,
      tmp26,
      tmp27,
      tmp28,
    );
    final tmp31 = tmp29;
    final ffi.Pointer<ffi.Void> tmp31_0 = ffi.Pointer.fromAddress(tmp31);
    final tmp31_1 = _Box(_api, tmp31_0, "__Client_add_pusher_future_drop");
    tmp31_1._finalizer = _api._registerFinalizer(tmp31_1);
    final tmp30 = _nativeFuture(tmp31_1, _api.__clientAddPusherFuturePoll);
    return tmp30;
  }

  /// add another http pusher to the notification system
  Future<bool> addEmailPusher(
    String deviceName,
    String appName,
    String email,
    String? lang,
  ) {
    final tmp1 = deviceName;
    final tmp5 = appName;
    final tmp9 = email;
    final tmp13 = lang;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    var tmp14 = 0;
    var tmp16 = 0;
    var tmp17 = 0;
    var tmp18 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9_0 = utf8.encode(tmp9);
    tmp11 = tmp9_0.length;

    final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
    final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
    tmp10_1.setAll(0, tmp9_0);
    tmp10 = tmp10_0.address;
    tmp12 = tmp11;
    if (tmp13 == null) {
      tmp14 = 0;
    } else {
      tmp14 = 1;
      final tmp15 = tmp13;
      final tmp15_0 = utf8.encode(tmp15);
      tmp17 = tmp15_0.length;

      final ffi.Pointer<ffi.Uint8> tmp16_0 = _api.__allocate(tmp17 * 1, 1);
      final Uint8List tmp16_1 = tmp16_0.asTypedList(tmp17);
      tmp16_1.setAll(0, tmp15_0);
      tmp16 = tmp16_0.address;
      tmp18 = tmp17;
    }
    final tmp19 = _api._clientAddEmailPusher(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
      tmp14,
      tmp16,
      tmp17,
      tmp18,
    );
    final tmp21 = tmp19;
    final ffi.Pointer<ffi.Void> tmp21_0 = ffi.Pointer.fromAddress(tmp21);
    final tmp21_1 = _Box(
      _api,
      tmp21_0,
      "__Client_add_email_pusher_future_drop",
    );
    tmp21_1._finalizer = _api._registerFinalizer(tmp21_1);
    final tmp20 = _nativeFuture(tmp21_1, _api.__clientAddEmailPusherFuturePoll);
    return tmp20;
  }

  /// getting a notification item from the notification data;
  Future<NotificationItem> getNotificationItem(String roomId, String eventId) {
    final tmp1 = roomId;
    final tmp5 = eventId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientGetNotificationItem(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__Client_get_notification_item_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__clientGetNotificationItemFuturePoll,
    );
    return tmp10;
  }

  /// get all upcoming events, whether I responded or not
  Future<FfiListCalendarEvent> allUpcomingEvents(int? secsFromNow) {
    final tmp1 = secsFromNow;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3;
    }
    final tmp5 = _api._clientAllUpcomingEvents(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_all_upcoming_events_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__clientAllUpcomingEventsFuturePoll,
    );
    return tmp6;
  }

  /// get only upcoming events that I responded as rsvp
  Future<FfiListCalendarEvent> myUpcomingEvents(int? secsFromNow) {
    final tmp1 = secsFromNow;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3;
    }
    final tmp5 = _api._clientMyUpcomingEvents(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__Client_my_upcoming_events_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientMyUpcomingEventsFuturePoll);
    return tmp6;
  }

  /// get only past events that I responded as rsvp
  Future<FfiListCalendarEvent> myPastEvents(int? secsFromNow) {
    final tmp1 = secsFromNow;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    if (tmp1 == null) {
      tmp2 = 0;
    } else {
      tmp2 = 1;
      final tmp3 = tmp1;
      tmp4 = tmp3;
    }
    final tmp5 = _api._clientMyPastEvents(tmp0, tmp2, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_my_past_events_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientMyPastEventsFuturePoll);
    return tmp6;
  }

  /// super invites interface
  SuperInvites superInvites() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientSuperInvites(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_SuperInvites");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SuperInvites._(_api, tmp3_1);
    return tmp2;
  }

  /// allow to configure notification settings
  Future<NotificationSettings> notificationSettings() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientNotificationSettings(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__Client_notification_settings_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__clientNotificationSettingsFuturePoll,
    );
    return tmp2;
  }

  /// the list of devices
  Future<FfiListDeviceRecord> deviceRecords(bool verified) {
    final tmp1 = verified;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    final tmp3 = _api._clientDeviceRecords(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(_api, tmp5_0, "__Client_device_records_future_drop");
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(tmp5_1, _api.__clientDeviceRecordsFuturePoll);
    return tmp4;
  }

  /// make draft to send text plain msg
  MsgDraft textPlainDraft(String body) {
    final tmp1 = body;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientTextPlainDraft(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_MsgDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = MsgDraft._(_api, tmp7_1);
    return tmp6;
  }

  /// make draft to send text markdown msg
  MsgDraft textMarkdownDraft(String body) {
    final tmp1 = body;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientTextMarkdownDraft(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_MsgDraft");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = MsgDraft._(_api, tmp7_1);
    return tmp6;
  }

  /// make draft to send html marked up msg
  MsgDraft textHtmlDraft(String html, String plain) {
    final tmp1 = html;
    final tmp5 = plain;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientTextHtmlDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// make draft to send image msg
  MsgDraft imageDraft(String source, String mimetype) {
    final tmp1 = source;
    final tmp5 = mimetype;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientImageDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// make draft to send audio msg
  MsgDraft audioDraft(String source, String mimetype) {
    final tmp1 = source;
    final tmp5 = mimetype;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientAudioDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// make draft to send video msg
  MsgDraft videoDraft(String source, String mimetype) {
    final tmp1 = source;
    final tmp5 = mimetype;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientVideoDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// make draft to send file msg
  MsgDraft fileDraft(String source, String mimetype) {
    final tmp1 = source;
    final tmp5 = mimetype;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientFileDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// make draft to send location msg
  /// geo_uri follows RFC 5870, for example `geo:51.5074,-0.1278`
  MsgDraft locationDraft(String body, String geoUri) {
    final tmp1 = body;
    final tmp5 = geoUri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientLocationDraft(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_MsgDraft");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = MsgDraft._(_api, tmp11_1);
    return tmp10;
  }

  /// get access to the backup manager
  BackupManager backupManager() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientBackupManager(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_BackupManager");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = BackupManager._(_api, tmp3_1);
    return tmp2;
  }

  /// Room preview
  Future<RoomPreview> roomPreview(
    String roomIdOrAlias,
    VecStringBuilder serverNames,
  ) {
    final tmp1 = roomIdOrAlias;
    final tmp5 = serverNames;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5._box.move();
    final tmp7 = _api._clientRoomPreview(tmp0, tmp2, tmp3, tmp4, tmp6);
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(_api, tmp9_0, "__Client_room_preview_future_drop");
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(tmp9_1, _api.__clientRoomPreviewFuturePoll);
    return tmp8;
  }

  /// create a link ref details
  RefDetails newLinkRefDetails(String title, String uri) {
    final tmp1 = title;
    final tmp5 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._clientNewLinkRefDetails(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9.arg0;
    final tmp12 = tmp9.arg1;
    final tmp13 = tmp9.arg2;
    final tmp14 = tmp9.arg3;
    final tmp15 = tmp9.arg4;
    if (tmp11 == 0) {
      debugAllocation("handle error", tmp12, tmp13);
      final ffi.Pointer<ffi.Uint8> tmp12_0 = ffi.Pointer.fromAddress(tmp12);
      final tmp11_0 = utf8.decode(
        tmp12_0.asTypedList(tmp13),
        allowMalformed: true,
      );
      if (tmp13 > 0) {
        final ffi.Pointer<ffi.Void> tmp12_0;
        tmp12_0 = ffi.Pointer.fromAddress(tmp12);
        _api.__deallocate(tmp12_0, tmp14, 1);
      }
      throw tmp11_0;
    }
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(_api, tmp15_0, "drop_box_RefDetails");
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp10 = RefDetails._(_api, tmp15_1);
    return tmp10;
  }

  /// get a specific activity
  Future<Activity> activity(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientActivity(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_activity_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientActivityFuturePoll);
    return tmp6;
  }

  /// get the activities listener for a room
  Activities activitiesForRoom(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientActivitiesForRoom(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_Activities");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = Activities._(_api, tmp11_1);
    return tmp6;
  }

  /// get the activities listener for a all historic events
  Activities allActivities() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._clientAllActivities(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    final tmp7 = tmp1.arg4;
    if (tmp3 == 0) {
      debugAllocation("handle error", tmp4, tmp5);
      final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      final tmp3_0 = utf8.decode(
        tmp4_0.asTypedList(tmp5),
        allowMalformed: true,
      );
      if (tmp5 > 0) {
        final ffi.Pointer<ffi.Void> tmp4_0;
        tmp4_0 = ffi.Pointer.fromAddress(tmp4);
        _api.__deallocate(tmp4_0, tmp6, 1);
      }
      throw tmp3_0;
    }
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "drop_box_Activities");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp2 = Activities._(_api, tmp7_1);
    return tmp2;
  }

  /// get the activities listener for a specific object
  Activities activitiesForObj(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientActivitiesForObj(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    final tmp11 = tmp5.arg4;
    if (tmp7 == 0) {
      debugAllocation("handle error", tmp8, tmp9);
      final ffi.Pointer<ffi.Uint8> tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      final tmp7_0 = utf8.decode(
        tmp8_0.asTypedList(tmp9),
        allowMalformed: true,
      );
      if (tmp9 > 0) {
        final ffi.Pointer<ffi.Void> tmp8_0;
        tmp8_0 = ffi.Pointer.fromAddress(tmp8);
        _api.__deallocate(tmp8_0, tmp10, 1);
      }
      throw tmp7_0;
    }
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(_api, tmp11_0, "drop_box_Activities");
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp6 = Activities._(_api, tmp11_1);
    return tmp6;
  }

  /// fetch a UrlPreview locally
  Future<LocalUrlPreview> urlPreview(String uri) {
    final tmp1 = uri;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._clientUrlPreview(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__Client_url_preview_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__clientUrlPreviewFuturePoll);
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class NotificationSettings {
  final Api _api;
  final _Box _box;

  NotificationSettings._(this._api, this._box);

  /// get informed about changes to the notification settings
  Stream<bool> changesStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._notificationSettingsChangesStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__NotificationSettings_changes_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__notificationSettingsChangesStreamStreamPoll,
    );
    return tmp2;
  }

  /// default RoomNotificationMode for the selected features
  Future<String> defaultNotificationMode(bool isEncrypted, bool isOneOnOne) {
    final tmp1 = isEncrypted;
    final tmp3 = isOneOnOne;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    tmp4 = tmp3 ? 1 : 0;
    final tmp5 = _api._notificationSettingsDefaultNotificationMode(
      tmp0,
      tmp2,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__NotificationSettings_default_notification_mode_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__notificationSettingsDefaultNotificationModeFuturePoll,
    );
    return tmp6;
  }

  /// set default RoomNotificationMode for this combination
  Future<bool> setDefaultNotificationMode(
    bool isEncrypted,
    bool isOneOnOne,
    String mode,
  ) {
    final tmp1 = isEncrypted;
    final tmp3 = isOneOnOne;
    final tmp5 = mode;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    tmp4 = tmp3 ? 1 : 0;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9 = _api._notificationSettingsSetDefaultNotificationMode(
      tmp0,
      tmp2,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
    );
    final tmp11 = tmp9;
    final ffi.Pointer<ffi.Void> tmp11_0 = ffi.Pointer.fromAddress(tmp11);
    final tmp11_1 = _Box(
      _api,
      tmp11_0,
      "__NotificationSettings_set_default_notification_mode_future_drop",
    );
    tmp11_1._finalizer = _api._registerFinalizer(tmp11_1);
    final tmp10 = _nativeFuture(
      tmp11_1,
      _api.__notificationSettingsSetDefaultNotificationModeFuturePoll,
    );
    return tmp10;
  }

  /// app settings
  Future<bool> globalContentSetting(String appKey) {
    final tmp1 = appKey;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._notificationSettingsGlobalContentSetting(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__NotificationSettings_global_content_setting_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__notificationSettingsGlobalContentSettingFuturePoll,
    );
    return tmp6;
  }

  Future<bool> setGlobalContentSetting(String appKey, bool enabled) {
    final tmp1 = appKey;
    final tmp5 = enabled;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    tmp6 = tmp5 ? 1 : 0;
    final tmp7 = _api._notificationSettingsSetGlobalContentSetting(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
    );
    final tmp9 = tmp7;
    final ffi.Pointer<ffi.Void> tmp9_0 = ffi.Pointer.fromAddress(tmp9);
    final tmp9_1 = _Box(
      _api,
      tmp9_0,
      "__NotificationSettings_set_global_content_setting_future_drop",
    );
    tmp9_1._finalizer = _api._registerFinalizer(tmp9_1);
    final tmp8 = _nativeFuture(
      tmp9_1,
      _api.__notificationSettingsSetGlobalContentSettingFuturePoll,
    );
    return tmp8;
  }

  /// specific object based subscriptions
  /// one of 'subscribed', 'parent' or 'none'
  Future<String> objectPushSubscriptionStatusStr(
    String objectId,
    String? subType,
  ) {
    final tmp1 = objectId;
    final tmp5 = subType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._notificationSettingsObjectPushSubscriptionStatusStr(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__NotificationSettings_object_push_subscription_status_str_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(
      tmp13_1,
      _api.__notificationSettingsObjectPushSubscriptionStatusStrFuturePoll,
    );
    return tmp12;
  }

  Future<bool> subscribeObjectPush(String objectId, String? subType) {
    final tmp1 = objectId;
    final tmp5 = subType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._notificationSettingsSubscribeObjectPush(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__NotificationSettings_subscribe_object_push_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(
      tmp13_1,
      _api.__notificationSettingsSubscribeObjectPushFuturePoll,
    );
    return tmp12;
  }

  Future<bool> unsubscribeObjectPush(String objectId, String? subType) {
    final tmp1 = objectId;
    final tmp5 = subType;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp8 = 0;
    var tmp9 = 0;
    var tmp10 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    if (tmp5 == null) {
      tmp6 = 0;
    } else {
      tmp6 = 1;
      final tmp7 = tmp5;
      final tmp7_0 = utf8.encode(tmp7);
      tmp9 = tmp7_0.length;

      final ffi.Pointer<ffi.Uint8> tmp8_0 = _api.__allocate(tmp9 * 1, 1);
      final Uint8List tmp8_1 = tmp8_0.asTypedList(tmp9);
      tmp8_1.setAll(0, tmp7_0);
      tmp8 = tmp8_0.address;
      tmp10 = tmp9;
    }
    final tmp11 = _api._notificationSettingsUnsubscribeObjectPush(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp8,
      tmp9,
      tmp10,
    );
    final tmp13 = tmp11;
    final ffi.Pointer<ffi.Void> tmp13_0 = ffi.Pointer.fromAddress(tmp13);
    final tmp13_1 = _Box(
      _api,
      tmp13_0,
      "__NotificationSettings_unsubscribe_object_push_future_drop",
    );
    tmp13_1._finalizer = _api._registerFinalizer(tmp13_1);
    final tmp12 = _nativeFuture(
      tmp13_1,
      _api.__notificationSettingsUnsubscribeObjectPushFuturePoll,
    );
    return tmp12;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class RoomInvitation {
  final Api _api;
  final _Box _box;

  RoomInvitation._(this._api, this._box);

  /// whether this is an invite to a DM
  bool isDm() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationIsDm(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// the RoomId as a String
  String roomIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationRoomIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the room of this invitation
  Room room() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationRoom(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_Room");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = Room._(_api, tmp3_1);
    return tmp2;
  }

  /// get the user id of this invitation sender as string
  String senderIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationSenderIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// get the user profile that contains avatar and display name
  UserProfile? senderProfile() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationSenderProfile(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
    final tmp4_1 = _Box(_api, tmp4_0, "drop_box_UserProfile");
    tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
    final tmp2 = UserProfile._(_api, tmp4_1);
    return tmp2;
  }

  /// accept invitation about me to this room
  Future<bool> accept() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationAccept(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__RoomInvitation_accept_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomInvitationAcceptFuturePoll);
    return tmp2;
  }

  /// reject invitation about me to this room
  Future<bool> reject() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._roomInvitationReject(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__RoomInvitation_reject_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__roomInvitationRejectFuturePoll);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SuperInvites {
  final Api _api;
  final _Box _box;

  SuperInvites._(this._api, this._box);

  /// the current tokens
  Future<FfiListSuperInviteToken> tokens() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInvitesTokens(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__SuperInvites_tokens_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__superInvitesTokensFuturePoll);
    return tmp2;
  }

  /// create a token updater to create a fresh token
  SuperInvitesTokenUpdateBuilder newTokenUpdater() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInvitesNewTokenUpdater(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "drop_box_SuperInvitesTokenUpdateBuilder",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SuperInvitesTokenUpdateBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// Send or update
  Future<SuperInviteToken> createOrUpdateToken(
    SuperInvitesTokenUpdateBuilder builder,
  ) {
    final tmp1 = builder;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1._box.move();
    final tmp3 = _api._superInvitesCreateOrUpdateToken(tmp0, tmp2);
    final tmp5 = tmp3;
    final ffi.Pointer<ffi.Void> tmp5_0 = ffi.Pointer.fromAddress(tmp5);
    final tmp5_1 = _Box(
      _api,
      tmp5_0,
      "__SuperInvites_create_or_update_token_future_drop",
    );
    tmp5_1._finalizer = _api._registerFinalizer(tmp5_1);
    final tmp4 = _nativeFuture(
      tmp5_1,
      _api.__superInvitesCreateOrUpdateTokenFuturePoll,
    );
    return tmp4;
  }

  /// delete the given token
  Future<bool> delete(String token) {
    final tmp1 = token;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._superInvitesDelete(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__SuperInvites_delete_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__superInvitesDeleteFuturePoll);
    return tmp6;
  }

  /// try to redeem a token
  Future<FfiListFfiString> redeem(String token) {
    final tmp1 = token;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._superInvitesRedeem(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__SuperInvites_redeem_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__superInvitesRedeemFuturePoll);
    return tmp6;
  }

  /// get the token info
  Future<SuperInviteInfo> info(String token) {
    final tmp1 = token;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._superInvitesInfo(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__SuperInvites_info_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__superInvitesInfoFuturePoll);
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SuperInviteInfo {
  final Api _api;
  final _Box _box;

  SuperInviteInfo._(this._api, this._box);

  /// whether or not this token will create a DM with the new user
  bool createDm() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoCreateDm(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether or not this token has been redeemed by the caller
  bool hasRedeemed() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoHasRedeemed(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// the number of rooms that will be added - includes DM if created
  int roomsCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoRoomsCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// the UserId of the inviter
  String inviterUserIdStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoInviterUserIdStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// the display_name of the inviter if known
  String? inviterDisplayNameStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoInviterDisplayNameStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// the Avatar URl of the inviter if known
  String? inviterAvatarUrlStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteInfoInviterAvatarUrlStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SuperInviteToken {
  final Api _api;
  final _Box _box;

  SuperInviteToken._(this._api, this._box);

  /// the textual ID of the token
  String token() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenToken(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// whether or not this token will create a DM with the new user
  bool createDm() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenCreateDm(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Which rooms the redeemer will be invited to
  FfiListFfiString rooms() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenRooms(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// How often this token has been redeemed
  int acceptedCount() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenAcceptedCount(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// Updater for this SuperInviteToken
  SuperInvitesTokenUpdateBuilder updateBuilder() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenUpdateBuilder(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "drop_box_SuperInvitesTokenUpdateBuilder",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = SuperInvitesTokenUpdateBuilder._(_api, tmp3_1);
    return tmp2;
  }

  /// get the internal reference object
  RefDetails refDetails() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._superInviteTokenRefDetails(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_RefDetails");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = RefDetails._(_api, tmp3_1);
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Updater/Creator for an invite token
class SuperInvitesTokenUpdateBuilder {
  final Api _api;
  final _Box _box;

  SuperInvitesTokenUpdateBuilder._(this._api, this._box);

  /// set the token name
  void token(String token) {
    final tmp1 = token;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._superInvitesTokenUpdateBuilderToken(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// add a room to the updater
  void addRoom(String room) {
    final tmp1 = room;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._superInvitesTokenUpdateBuilderAddRoom(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// remove a room from the updater
  void removeRoom(String room) {
    final tmp1 = room;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    _api._superInvitesTokenUpdateBuilderRemoveRoom(tmp0, tmp2, tmp3, tmp4);
    return;
  }

  /// set the create_dm field
  void createDm(bool value) {
    final tmp1 = value;
    var tmp0 = 0;
    var tmp2 = 0;
    tmp0 = _box.borrow();
    tmp2 = tmp1 ? 1 : 0;
    _api._superInvitesTokenUpdateBuilderCreateDm(tmp0, tmp2);
    return;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class VerificationEvent {
  final Api _api;
  final _Box _box;

  VerificationEvent._(this._api, this._box);

  /// Get event type
  String eventType() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventEventType(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Get flow id (EventId or TransactionId)
  String flowId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventFlowId(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Get user id of event sender
  String sender() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventSender(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Get content by field
  String? getContent(String key) {
    final tmp1 = key;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._verificationEventGetContent(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5.arg0;
    final tmp8 = tmp5.arg1;
    final tmp9 = tmp5.arg2;
    final tmp10 = tmp5.arg3;
    if (tmp7 == 0) {
      return null;
    }
    if (tmp9 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp8_ptr = ffi.Pointer.fromAddress(tmp8);
    List<int> tmp8_buf = [];
    final tmp8_precast = tmp8_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp9; i++) {
      int char = tmp8_precast.elementAt(i).value;
      tmp8_buf.add(char);
    }
    final tmp6 = utf8.decode(tmp8_buf, allowMalformed: true);
    if (tmp10 > 0) {
      final ffi.Pointer<ffi.Void> tmp8_0;
      tmp8_0 = ffi.Pointer.fromAddress(tmp8);
      _api.__deallocate(tmp8_0, tmp10 * 1, 1);
    }
    return tmp6;
  }

  /// Get emoji array
  FfiListVerificationEmoji emojis() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventEmojis(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListVerificationEmoji");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListVerificationEmoji._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Get emoji array
  Future<FfiListVerificationEmoji> getEmojis() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventGetEmojis(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_get_emojis_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventGetEmojisFuturePoll,
    );
    return tmp2;
  }

  /// Bob accepts the verification request from Alice
  Future<bool> acceptVerificationRequest() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventAcceptVerificationRequest(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_accept_verification_request_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventAcceptVerificationRequestFuturePoll,
    );
    return tmp2;
  }

  /// Bob cancels the verification request from Alice
  /// alternative of terminate_verification
  Future<bool> cancelVerificationRequest() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventCancelVerificationRequest(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_cancel_verification_request_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventCancelVerificationRequestFuturePoll,
    );
    return tmp2;
  }

  /// Bob accepts the verification request from Alice with specified method
  Future<bool> acceptVerificationRequestWithMethod(String method) {
    final tmp1 = method;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._verificationEventAcceptVerificationRequestWithMethod(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__VerificationEvent_accept_verification_request_with_method_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__verificationEventAcceptVerificationRequestWithMethodFuturePoll,
    );
    return tmp6;
  }

  /// Alice starts the SAS verification
  Future<bool> startSasVerification() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventStartSasVerification(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_start_sas_verification_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventStartSasVerificationFuturePoll,
    );
    return tmp2;
  }

  /// Bob accepts the SAS verification
  Future<bool> acceptSasVerification() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventAcceptSasVerification(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_accept_sas_verification_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventAcceptSasVerificationFuturePoll,
    );
    return tmp2;
  }

  /// Bob cancels the SAS verification
  Future<bool> cancelSasVerification() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventCancelSasVerification(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_cancel_sas_verification_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventCancelSasVerificationFuturePoll,
    );
    return tmp2;
  }

  /// Alice says to Bob that SAS verification matches and vice versa
  Future<bool> confirmSasVerification() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventConfirmSasVerification(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_confirm_sas_verification_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventConfirmSasVerificationFuturePoll,
    );
    return tmp2;
  }

  /// Alice says to Bob that SAS verification doesn’t match and vice versa
  Future<bool> mismatchSasVerification() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEventMismatchSasVerification(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__VerificationEvent_mismatch_sas_verification_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__verificationEventMismatchSasVerificationFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class VerificationEmoji {
  final Api _api;
  final _Box _box;

  VerificationEmoji._(this._api, this._box);

  /// binary representation of emoji unicode
  int symbol() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEmojiSymbol(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3;
    return tmp2;
  }

  /// text description of emoji unicode
  String description() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._verificationEmojiDescription(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

class SessionManager {
  final Api _api;
  final _Box _box;

  SessionManager._(this._api, this._box);

  Future<FfiListDeviceRecord> allSessions() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._sessionManagerAllSessions(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__SessionManager_all_sessions_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__sessionManagerAllSessionsFuturePoll,
    );
    return tmp2;
  }

  /// Force to logout another device
  /// Authentication is required to do so
  Future<bool> deleteDevice(String devId, String username, String password) {
    final tmp1 = devId;
    final tmp5 = username;
    final tmp9 = password;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    var tmp6 = 0;
    var tmp7 = 0;
    var tmp8 = 0;
    var tmp10 = 0;
    var tmp11 = 0;
    var tmp12 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5_0 = utf8.encode(tmp5);
    tmp7 = tmp5_0.length;

    final ffi.Pointer<ffi.Uint8> tmp6_0 = _api.__allocate(tmp7 * 1, 1);
    final Uint8List tmp6_1 = tmp6_0.asTypedList(tmp7);
    tmp6_1.setAll(0, tmp5_0);
    tmp6 = tmp6_0.address;
    tmp8 = tmp7;
    final tmp9_0 = utf8.encode(tmp9);
    tmp11 = tmp9_0.length;

    final ffi.Pointer<ffi.Uint8> tmp10_0 = _api.__allocate(tmp11 * 1, 1);
    final Uint8List tmp10_1 = tmp10_0.asTypedList(tmp11);
    tmp10_1.setAll(0, tmp9_0);
    tmp10 = tmp10_0.address;
    tmp12 = tmp11;
    final tmp13 = _api._sessionManagerDeleteDevice(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
      tmp6,
      tmp7,
      tmp8,
      tmp10,
      tmp11,
      tmp12,
    );
    final tmp15 = tmp13;
    final ffi.Pointer<ffi.Void> tmp15_0 = ffi.Pointer.fromAddress(tmp15);
    final tmp15_1 = _Box(
      _api,
      tmp15_0,
      "__SessionManager_delete_device_future_drop",
    );
    tmp15_1._finalizer = _api._registerFinalizer(tmp15_1);
    final tmp14 = _nativeFuture(
      tmp15_1,
      _api.__sessionManagerDeleteDeviceFuturePoll,
    );
    return tmp14;
  }

  /// Trigger verification of another device
  /// returns flow id of verification
  Future<String> requestVerification(String devId) {
    final tmp1 = devId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._sessionManagerRequestVerification(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__SessionManager_request_verification_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__sessionManagerRequestVerificationFuturePoll,
    );
    return tmp6;
  }

  /// Terminate verification of another device
  /// alternative of cancel_verification_request
  /// this fn is used in case without verification event
  Future<bool> terminateVerification(String flowId) {
    final tmp1 = flowId;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._sessionManagerTerminateVerification(
      tmp0,
      tmp2,
      tmp3,
      tmp4,
    );
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__SessionManager_terminate_verification_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__sessionManagerTerminateVerificationFuturePoll,
    );
    return tmp6;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Deliver devices new event from rust to flutter
class DeviceEvent {
  final Api _api;
  final _Box _box;

  DeviceEvent._(this._api, this._box);

  /// get devices that was found newly
  FfiListFfiString newDevices() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceEventNewDevices(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// get devices that already existed and was just changed
  FfiListFfiString changedDevices() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceEventChangedDevices(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_FfiListFfiString");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp4 = FfiListFfiString._(_api, tmp3_1);
    final tmp2 = tmp4;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Provide various device infos
class DeviceRecord {
  final Api _api;
  final _Box _box;

  DeviceRecord._(this._api, this._box);

  /// get the id of this device
  DeviceId deviceId() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordDeviceId(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "drop_box_DeviceId");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = DeviceId._(_api, tmp3_1);
    return tmp2;
  }

  /// get the display name of this device
  String? displayName() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordDisplayName(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// last seen ip of this device
  String? lastSeenIp() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordLastSeenIp(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    final tmp6 = tmp1.arg3;
    if (tmp3 == 0) {
      return null;
    }
    if (tmp5 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp4_ptr = ffi.Pointer.fromAddress(tmp4);
    List<int> tmp4_buf = [];
    final tmp4_precast = tmp4_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp5; i++) {
      int char = tmp4_precast.elementAt(i).value;
      tmp4_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp4_buf, allowMalformed: true);
    if (tmp6 > 0) {
      final ffi.Pointer<ffi.Void> tmp4_0;
      tmp4_0 = ffi.Pointer.fromAddress(tmp4);
      _api.__deallocate(tmp4_0, tmp6 * 1, 1);
    }
    return tmp2;
  }

  /// last seen timestamp of this device in milliseconds
  int? lastSeenTs() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordLastSeenTs(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    if (tmp3 == 0) {
      return null;
    }
    final tmp2 = tmp4;
    return tmp2;
  }

  /// whether it was verified
  bool isVerified() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordIsVerified(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether it is active
  bool isActive() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordIsActive(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// whether it is this session
  bool isMe() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._deviceRecordIsMe(tmp0);
    final tmp3 = tmp1;
    final tmp2 = tmp3 > 0;
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

/// Manage Encryption Backups
class BackupManager {
  final Api _api;
  final _Box _box;

  BackupManager._(this._api, this._box);

  /// Create a new backup, encrypted with a new backup recovery key.
  Future<String> enable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerEnable(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__BackupManager_enable_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__backupManagerEnableFuturePoll);
    return tmp2;
  }

  /// Reset the existing backup, encrypted with a new backup recovery key.
  Future<String> resetKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerResetKey(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__BackupManager_reset_key_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__backupManagerResetKeyFuturePoll);
    return tmp2;
  }

  /// Reset the existing backup and identity, encrypted with a new key.
  Future<String> resetIdentity(String password) {
    final tmp1 = password;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._backupManagerResetIdentity(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(
      _api,
      tmp7_0,
      "__BackupManager_reset_identity_future_drop",
    );
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(
      tmp7_1,
      _api.__backupManagerResetIdentityFuturePoll,
    );
    return tmp6;
  }

  /// Disable and delete the currently active backup.
  Future<bool> disable() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerDisable(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(_api, tmp3_0, "__BackupManager_disable_future_drop");
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(tmp3_1, _api.__backupManagerDisableFuturePoll);
    return tmp2;
  }

  /// Current state as a string
  String stateStr() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerStateStr(tmp0);
    final tmp3 = tmp1.arg0;
    final tmp4 = tmp1.arg1;
    final tmp5 = tmp1.arg2;
    if (tmp4 == 0) {
      print("returning empty string");
      return "";
    }
    final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
    List<int> tmp3_buf = [];
    final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
    for (int i = 0; i < tmp4; i++) {
      int char = tmp3_precast.elementAt(i).value;
      tmp3_buf.add(char);
    }
    final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
    if (tmp5 > 0) {
      final ffi.Pointer<ffi.Void> tmp3_0;
      tmp3_0 = ffi.Pointer.fromAddress(tmp3);
      _api.__deallocate(tmp3_0, tmp5 * 1, 1);
    }
    return tmp2;
  }

  /// state as a string via a stream. Issues the current state immediately
  Stream<String> stateStream() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerStateStream(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__BackupManager_state_stream_stream_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeStream(
      tmp3_1,
      _api.__backupManagerStateStreamStreamPoll,
    );
    return tmp2;
  }

  /// Open the existing secret store using the given key and import the keys
  Future<bool> recover(String secret) {
    final tmp1 = secret;
    var tmp0 = 0;
    var tmp2 = 0;
    var tmp3 = 0;
    var tmp4 = 0;
    tmp0 = _box.borrow();
    final tmp1_0 = utf8.encode(tmp1);
    tmp3 = tmp1_0.length;

    final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
    final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
    tmp2_1.setAll(0, tmp1_0);
    tmp2 = tmp2_0.address;
    tmp4 = tmp3;
    final tmp5 = _api._backupManagerRecover(tmp0, tmp2, tmp3, tmp4);
    final tmp7 = tmp5;
    final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
    final tmp7_1 = _Box(_api, tmp7_0, "__BackupManager_recover_future_drop");
    tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
    final tmp6 = _nativeFuture(tmp7_1, _api.__backupManagerRecoverFuturePoll);
    return tmp6;
  }

  /// the backup key as it was stored last, might be empty if there isn’t any stored
  Future<OptionString> storedEncKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerStoredEncKey(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__BackupManager_stored_enc_key_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__backupManagerStoredEncKeyFuturePoll,
    );
    return tmp2;
  }

  /// When was the key stored as unix timestamp. 0 if nothing was found
  Future<int> storedEncKeyWhen() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerStoredEncKeyWhen(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__BackupManager_stored_enc_key_when_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__backupManagerStoredEncKeyWhenFuturePoll,
    );
    return tmp2;
  }

  /// Remove the key from storage - backup will continue to work fine though
  Future<bool> destroyStoredEncKey() {
    var tmp0 = 0;
    tmp0 = _box.borrow();
    final tmp1 = _api._backupManagerDestroyStoredEncKey(tmp0);
    final tmp3 = tmp1;
    final ffi.Pointer<ffi.Void> tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    final tmp3_1 = _Box(
      _api,
      tmp3_0,
      "__BackupManager_destroy_stored_enc_key_future_drop",
    );
    tmp3_1._finalizer = _api._registerFinalizer(tmp3_1);
    final tmp2 = _nativeFuture(
      tmp3_1,
      _api.__backupManagerDestroyStoredEncKeyFuturePoll,
    );
    return tmp2;
  }

  /// Manually drops the object and unregisters the FinalizableHandle.
  void drop() {
    _box.drop();
  }
}

enum RsvpStatusTag { Yes, Maybe, No }

class RsvpStatus {
  final Api _api;
  final _Box _box;

  RsvpStatusTag? _tag;
  Object? _inner;

  void destructureSelf() {
    final parts = this._api._destructureRsvpStatus(this._box.borrow());
    switch (parts.tag) {
      case 0:
        this._tag = RsvpStatusTag.Yes;

        break;
      case 1:
        this._tag = RsvpStatusTag.Maybe;

        break;
      case 2:
        this._tag = RsvpStatusTag.No;

        break;
      default:
        throw new StateError(
          "Destructuring enum gave back an invalid tag: ${parts.tag}",
        );
    }
  }

  /// The tag of this enum object
  RsvpStatusTag get tag {
    if (_tag == null) {
      destructureSelf();
    }
    return _tag!;
  }

  /// The data contained inside this enum object. You will need
  /// to cast it to the correct type based on the value of tag
  Object? get inner {
    if (_inner == null) {
      destructureSelf();
    }
    return _inner;
  }

  RsvpStatus._(this._api, this._box);
}

enum RelationTargetTypeTag { Unknown, ChatRoom, Space, ActerSpace }

class RelationTargetType {
  final Api _api;
  final _Box _box;

  RelationTargetTypeTag? _tag;
  Object? _inner;

  void destructureSelf() {
    final parts = this._api._destructureRelationTargetType(this._box.borrow());
    switch (parts.tag) {
      case 0:
        this._tag = RelationTargetTypeTag.Unknown;

        break;
      case 1:
        this._tag = RelationTargetTypeTag.ChatRoom;

        break;
      case 2:
        this._tag = RelationTargetTypeTag.Space;

        break;
      case 3:
        this._tag = RelationTargetTypeTag.ActerSpace;

        break;
      default:
        throw new StateError(
          "Destructuring enum gave back an invalid tag: ${parts.tag}",
        );
    }
  }

  /// The tag of this enum object
  RelationTargetTypeTag get tag {
    if (_tag == null) {
      destructureSelf();
    }
    return _tag!;
  }

  /// The data contained inside this enum object. You will need
  /// to cast it to the correct type based on the value of tag
  Object? get inner {
    if (_inner == null) {
      destructureSelf();
    }
    return _inner;
  }

  RelationTargetType._(this._api, this._box);
}

enum MembershipStatusTag { Admin, Mod, Custom, Regular }

class MembershipStatus {
  final Api _api;
  final _Box _box;

  MembershipStatusTag? _tag;
  Object? _inner;

  void destructureSelf() {
    final parts = this._api._destructureMembershipStatus(this._box.borrow());
    switch (parts.tag) {
      case 0:
        this._tag = MembershipStatusTag.Admin;

        break;
      case 1:
        this._tag = MembershipStatusTag.Mod;

        break;
      case 2:
        this._tag = MembershipStatusTag.Custom;

        break;
      case 3:
        this._tag = MembershipStatusTag.Regular;

        break;
      default:
        throw new StateError(
          "Destructuring enum gave back an invalid tag: ${parts.tag}",
        );
    }
  }

  /// The tag of this enum object
  MembershipStatusTag get tag {
    if (_tag == null) {
      destructureSelf();
    }
    return _tag!;
  }

  /// The data contained inside this enum object. You will need
  /// to cast it to the correct type based on the value of tag
  Object? get inner {
    if (_inner == null) {
      destructureSelf();
    }
    return _inner;
  }

  MembershipStatus._(this._api, this._box);
}

enum MemberPermissionTag {
  CanSendChatMessages,
  CanToggleReaction,
  CanSendSticker,
  CanPostNews,
  CanPostStories,
  CanPostPin,
  CanPostEvent,
  CanPostTaskList,
  CanPostTask,
  CanBan,
  CanKick,
  CanInvite,
  CanRedactOwn,
  CanRedactOther,
  CanTriggerRoomNotification,
  CanUpgradeToActerSpace,
  CanSetName,
  CanUpdateAvatar,
  CanUpdateJoinRule,
  CanSetTopic,
  CanLinkSpaces,
  CanUpdatePowerLevels,
  CanSetParentSpace,
  CanChangeAppSettings,
}

class MemberPermission {
  final Api _api;
  final _Box _box;

  MemberPermissionTag? _tag;
  Object? _inner;

  void destructureSelf() {
    final parts = this._api._destructureMemberPermission(this._box.borrow());
    switch (parts.tag) {
      case 0:
        this._tag = MemberPermissionTag.CanSendChatMessages;

        break;
      case 1:
        this._tag = MemberPermissionTag.CanToggleReaction;

        break;
      case 2:
        this._tag = MemberPermissionTag.CanSendSticker;

        break;
      case 3:
        this._tag = MemberPermissionTag.CanPostNews;

        break;
      case 4:
        this._tag = MemberPermissionTag.CanPostStories;

        break;
      case 5:
        this._tag = MemberPermissionTag.CanPostPin;

        break;
      case 6:
        this._tag = MemberPermissionTag.CanPostEvent;

        break;
      case 7:
        this._tag = MemberPermissionTag.CanPostTaskList;

        break;
      case 8:
        this._tag = MemberPermissionTag.CanPostTask;

        break;
      case 9:
        this._tag = MemberPermissionTag.CanBan;

        break;
      case 10:
        this._tag = MemberPermissionTag.CanKick;

        break;
      case 11:
        this._tag = MemberPermissionTag.CanInvite;

        break;
      case 12:
        this._tag = MemberPermissionTag.CanRedactOwn;

        break;
      case 13:
        this._tag = MemberPermissionTag.CanRedactOther;

        break;
      case 14:
        this._tag = MemberPermissionTag.CanTriggerRoomNotification;

        break;
      case 15:
        this._tag = MemberPermissionTag.CanUpgradeToActerSpace;

        break;
      case 16:
        this._tag = MemberPermissionTag.CanSetName;

        break;
      case 17:
        this._tag = MemberPermissionTag.CanUpdateAvatar;

        break;
      case 18:
        this._tag = MemberPermissionTag.CanUpdateJoinRule;

        break;
      case 19:
        this._tag = MemberPermissionTag.CanSetTopic;

        break;
      case 20:
        this._tag = MemberPermissionTag.CanLinkSpaces;

        break;
      case 21:
        this._tag = MemberPermissionTag.CanUpdatePowerLevels;

        break;
      case 22:
        this._tag = MemberPermissionTag.CanSetParentSpace;

        break;
      case 23:
        this._tag = MemberPermissionTag.CanChangeAppSettings;

        break;
      default:
        throw new StateError(
          "Destructuring enum gave back an invalid tag: ${parts.tag}",
        );
    }
  }

  /// The tag of this enum object
  MemberPermissionTag get tag {
    if (_tag == null) {
      destructureSelf();
    }
    return _tag!;
  }

  /// The data contained inside this enum object. You will need
  /// to cast it to the correct type based on the value of tag
  Object? get inner {
    if (_inner == null) {
      destructureSelf();
    }
    return _inner;
  }

  MemberPermission._(this._api, this._box);
}

class _InitLoggingReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RotateLogFileReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
  @ffi.UintPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
}

class _NewThumbSizeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _NewColorizeBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _NewObjRefBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _UtcDateTimeToRfc2822Return extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _UtcDateTimeToRfc3339Return extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RefDetailsTargetIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsRoomIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RefDetailsEmbedActionStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RefDetailsTaskListIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsTitleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsRoomDisplayNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsParticipantsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _RefDetailsUtcStartReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RefDetailsUriReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RefDetailsGenerateInternalLinkReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
  @ffi.UintPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
}

class _UrlPreviewUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _UrlPreviewTitleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _UrlPreviewDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _UrlPreviewImageSourceReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _LocalUrlPreviewUrlReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _LocalUrlPreviewTitleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _LocalUrlPreviewDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _LocalUrlPreviewImageUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ObjRefPositionStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ColorizeColorReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint32()
  external int arg1;
}

class _ColorizeBackgroundReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint32()
  external int arg1;
}

class _ColorizeLinkReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint32()
  external int arg1;
}

class _OptionStringTextReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _OptionBufferDataReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _OptionRsvpStatusStatusReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _OptionRsvpStatusStatusStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _OptionComposeDraftDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _UserProfileDisplayNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TextMessageContentBodyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TextMessageContentFormattedReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MediaSourceUrlReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ThumbnailInfoMimetypeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ThumbnailInfoSizeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _ThumbnailInfoWidthReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _ThumbnailInfoHeightReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _DeviceIdToStringReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _EventIdToStringReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _MxcUriToStringReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ComposeDraftPlainTextReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ComposeDraftHtmlTextReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ComposeDraftEventIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ComposeDraftDraftTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomIdToStringReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _UserIdToStringReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RegistrationTokenViaEmailResponseSidReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RegistrationTokenViaEmailResponseSubmitUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PasswordChangeEmailTokenResponseClientSecretReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PasswordChangeEmailTokenResponseSidReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PasswordChangeEmailTokenResponseSubmitUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NewsSlideTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NewsSlideUniqueIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NewsSlideColorsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NewsEntryGetSlideReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NewsEntryUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _NewsEntryDraftSwapSlidesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NewsEntryUpdateBuilderSwapSlidesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _StorySlideTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _StorySlideUniqueIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _StorySlideColorsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _StoryGetSlideReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _StoryUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _StoryDraftSwapSlidesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _StoryUpdateBuilderSwapSlidesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActerPinTitleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActerPinContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActerPinContentFormattedReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActerPinUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActerPinDisplayReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActerPinEventIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActerPinRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActerPinUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _CalendarEventTitleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _CalendarEventDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _CalendarEventRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _CalendarEventUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _CalendarEventIcalForSharingReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.Uint8()
  external int arg4;
}

class _CalendarEventUpdateBuilderUtcStartFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventUpdateBuilderUtcStartFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventUpdateBuilderUtcStartFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventUpdateBuilderUtcEndFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventUpdateBuilderUtcEndFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventUpdateBuilderUtcEndFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcStartFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcStartFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcStartFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcEndFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcEndFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CalendarEventDraftUtcEndFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventLocationInfoLocationTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _EventLocationInfoNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventLocationInfoDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _EventLocationInfoCoordinatesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventLocationInfoUriReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventLocationInfoAddressReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventLocationInfoNotesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RsvpManagerRsvpDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _RsvpStatusReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ReactionEventIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ReactionRelatesToReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _EventSendStateStateReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _EventSendStateErrorReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _EventSendStateEventIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemSenderReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TimelineEventItemSendStateReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemEventTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TimelineEventItemEventIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TimelineEventItemMsgTypeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TimelineEventItemMsgContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemMembershipContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemProfileContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemPolicyRuleRoomContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemPolicyRuleServerContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemPolicyRuleUserContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomAvatarContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomCreateContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomEncryptionContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomGuestAccessContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomHistoryVisibilityContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomJoinRulesContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomNameContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomPinnedEventsContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomPowerLevelsContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomServerAclContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomTombstoneContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemRoomTopicContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemSpaceChildContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemSpaceParentContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemInReplyToIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TimelineEventItemInReplyToEventReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineEventItemReceiptTsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _TimelineEventItemReactionRecordsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineVirtualItemEventTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TimelineVirtualItemDescReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TimelineItemUniqueIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TimelineItemEventItemReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineItemVirtualItemReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _MsgContentBodyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _MsgContentFormattedBodyReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgContentSourceReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _MsgContentMimetypeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgContentSizeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _MsgContentWidthReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _MsgContentHeightReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _MsgContentThumbnailSourceReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _MsgContentThumbnailInfoReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _MsgContentDurationReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _MsgContentBlurhashReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgContentFilenameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgContentGeoUriReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MembershipContentChangeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ProfileContentDisplayNameChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ProfileContentDisplayNameOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ProfileContentDisplayNameNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ProfileContentAvatarUrlChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ProfileContentAvatarUrlOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ProfileContentAvatarUrlNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineItemDiffActionReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TimelineItemDiffValuesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TimelineItemDiffIndexReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
}

class _TimelineItemDiffValueReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _PolicyRuleRoomContentEntityChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleRoomContentEntityNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleRoomContentEntityOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleRoomContentReasonChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleRoomContentReasonNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleRoomContentReasonOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleRoomContentRecommendationChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleRoomContentRecommendationNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleRoomContentRecommendationOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentEntityChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentEntityNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleServerContentEntityOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentReasonChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentReasonNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleServerContentReasonOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentRecommendationChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleServerContentRecommendationNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleServerContentRecommendationOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentEntityChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentEntityNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleUserContentEntityOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentReasonChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentReasonNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleUserContentReasonOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentRecommendationChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PolicyRuleUserContentRecommendationNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PolicyRuleUserContentRecommendationOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomAvatarContentUrlChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomAvatarContentUrlNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomAvatarContentUrlOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomEncryptionContentAlgorithmChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomEncryptionContentAlgorithmNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomEncryptionContentAlgorithmOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomGuestAccessContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomGuestAccessContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomGuestAccessContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomHistoryVisibilityContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomHistoryVisibilityContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomHistoryVisibilityContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomJoinRulesContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomJoinRulesContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomJoinRulesContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomNameContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomNameContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomNameContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPinnedEventsContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPinnedEventsContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RoomPowerLevelsContentBanChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentBanOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentEventsChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentEventsNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentEventsOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentEventsDefaultChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentEventsDefaultOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentInviteChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentInviteOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentKickChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentKickOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentNotificationsChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentNotificationsOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentRedactChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentRedactOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentStateDefaultChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentStateDefaultOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsContentUsersChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentUsersDefaultChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPowerLevelsContentUsersDefaultOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomServerAclContentAllowIpLiteralsChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomServerAclContentAllowIpLiteralsOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _RoomServerAclContentAllowChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomServerAclContentAllowOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RoomServerAclContentDenyChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomServerAclContentDenyOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RoomTombstoneContentBodyChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomTombstoneContentBodyNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomTombstoneContentBodyOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomTombstoneContentReplacementRoomChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomTombstoneContentReplacementRoomNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomTombstoneContentReplacementRoomOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomTopicContentChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomTopicContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomTopicContentOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentRoomIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceChildContentViaChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentViaOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _SpaceChildContentOrderChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentOrderNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentOrderOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentSuggestedChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceChildContentSuggestedOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _SpaceParentContentRoomIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceParentContentViaChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceParentContentViaOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _SpaceParentContentCanonicalChangeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceParentContentCanonicalOldValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _RoomRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomJoinRuleStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ConvoDiffActionReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ConvoDiffValuesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ConvoDiffIndexReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
}

class _ConvoDiffValueReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _SpaceDiffActionReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceDiffValuesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _SpaceDiffIndexReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
}

class _SpaceDiffValueReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _MsgDraftAddMentionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgDraftAddRefDetailsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgDraftAddUrlPreviewReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _MsgDraftAddRoomMentionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ConvoTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ConvoLatestMessageReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ConvoGetRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _CommentsManagerRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _CommentsManagerObjectIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _AttachmentSenderReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentAttachmentIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentMsgContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _AttachmentRefDetailsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _AttachmentLinkReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _AttachmentsManagerRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _AttachmentsManagerObjectIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskTitleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskEventIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskTaskListIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TaskAuthorStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskPriorityReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _TaskDueDateReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskUtcDueTimeOfDayReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int32()
  external int arg1;
}

class _TaskUtcStartRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskDisplayReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TaskProgressPercentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _TaskUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _TaskUpdateBuilderUtcStartFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskUpdateBuilderUtcStartFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskUpdateBuilderUtcStartFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskDraftUtcStartFromRfc3339Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskDraftUtcStartFromRfc2822Return extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskDraftUtcStartFromFormatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskListNameReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskListEventIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TaskListDescriptionReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TaskListRoleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskListDisplayReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TaskListTimeZoneReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _TaskListTaskBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _TaskListUpdateBuilderReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _TaskListSpaceIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceHierarchyRoomInfoNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceHierarchyRoomInfoRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceHierarchyRoomInfoTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceHierarchyRoomInfoAvatarUrlStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceHierarchyRoomInfoJoinRuleStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceRelationTargetTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceRelationsRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceRelationsMainParentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RoomPowerLevelsNewsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsNewsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsStoriesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsStoriesKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsEventsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsEventsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsPinsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsPinsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsTasksReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsTasksKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsTaskListsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsTaskListsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsRsvpReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsRsvpKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsCommentsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsCommentsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPowerLevelsAttachmentsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Int64()
  external int arg1;
}

class _RoomPowerLevelsAttachmentsKeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SimpleOnOffSettingBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SimpleSettingWithTurnOffBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ActivityObjectTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityObjectObjectIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityObjectTitleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityObjectEmojiReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityObjectTaskListIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityEventIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivitySenderIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivitySubTypeStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityRefDetailsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityTargetUrlReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActivityTaskListIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityObjectReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomAvatarReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityRoomNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityRoomTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityTitleReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityMsgContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityMembershipContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityProfileContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityPolicyRuleRoomContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityPolicyRuleServerContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityPolicyRuleUserContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomAvatarContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomCreateContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomEncryptionContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomGuestAccessContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomHistoryVisibilityContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomJoinRulesContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomNameContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomPinnedEventsContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomPowerLevelsContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomServerAclContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomTombstoneContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityRoomTopicContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivitySpaceChildContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivitySpaceParentContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityReactionKeyReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActivityTitleContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityDescriptionContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityDateContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ActivityDateTimeRangeContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _TitleContentChangeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _TitleContentNewValReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _DescriptionContentChangeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _DescriptionContentNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DateContentChangeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _DateContentNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DateTimeRangeContentStartNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _DateTimeRangeContentEndNewValReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _RoomPreviewRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPreviewNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPreviewTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPreviewAvatarUrlStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPreviewCanonicalAliasStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _RoomPreviewRoomTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPreviewJoinRuleStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPreviewStateStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomPreviewIsDirectReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _RoomPreviewIsWorldReadableReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _CategoryTitleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _CategoryDisplayReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _CategoryBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _DisplayIconTypeStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DisplayIconStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DisplayColorReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint32()
  external int arg1;
}

class _DisplayBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SpaceGetRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceJoinRuleStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SpaceTaskListDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceCalendarEventDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceNewsDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpaceStoryDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _SpacePinDraftReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _MemberRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _MemberMembershipStatusStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ActerUserAppSettingsAutoDownloadChatReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ActerUserAppSettingsTypingNoticeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ExternalIdAddressReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ExternalIdMediumReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ThreePidEmailTokenResponseSidReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _ThreePidEmailTokenResponseSubmitUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _ThreePidEmailTokenResponseClientSecretReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PublicSearchResultItemNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultItemTopicReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultItemCanonicalAliasStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultItemRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PublicSearchResultItemAvatarUrlStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultItemJoinRuleStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PublicSearchResultItemRoomTypeStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PublicSearchResultNextBatchReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultPrevBatchReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PublicSearchResultTotalRoomCountEstimateReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _NotificationSenderUserIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationSenderDisplayNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationRoomRoomIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationRoomDisplayNameReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationItemPushStyleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationItemTitleReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationItemParentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NotificationItemParentIdStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationItemTargetUrlReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _NotificationItemBodyReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NotificationItemIconUrlReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationItemThreadIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationItemRoomInviteStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationItemReactionKeyReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _NotificationItemUtcStartReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NotificationItemUtcEndReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _NotificationItemDueDateReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _PusherPushkeyReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PusherAppIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PusherAppDisplayNameReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PusherDeviceDisplayNameReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PusherLangReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _PusherProfileTagReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CreateConvoSettingsBuilderAddInviteeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CreateConvoSettingsBuilderSetParentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CreateConvoSettingsBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _CreateSpaceSettingsBuilderAddInviteeReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CreateSpaceSettingsBuilderSetParentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _CreateSpaceSettingsBuilderBuildReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientAccountReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientDeviceIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientUserIdReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientDmWithUserReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeSectionStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeModelStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeModelObjectsStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeModelParamStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeRoomStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeRoomParamStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeRoomSectionStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeEventTypeStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeAccountDataStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientSubscribeRoomAccountDataStreamReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientNewLinkRefDetailsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientActivitiesForRoomReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientAllActivitiesReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _ClientActivitiesForObjReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.IntPtr()
  external int arg4;
}

class _RoomInvitationRoomIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomInvitationSenderIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _RoomInvitationSenderProfileReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _SuperInviteInfoInviterUserIdStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _SuperInviteInfoInviterDisplayNameStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SuperInviteInfoInviterAvatarUrlStrReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _SuperInviteTokenTokenReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _VerificationEventEventTypeReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _VerificationEventFlowIdReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _VerificationEventSenderReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _VerificationEventGetContentReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _VerificationEmojiDescriptionReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _DeviceRecordDisplayNameReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DeviceRecordLastSeenIpReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _DeviceRecordLastSeenTsReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint64()
  external int arg1;
}

class _BackupManagerStateStrReturn extends ffi.Struct {
  @ffi.IntPtr()
  external int arg0;
  @ffi.UintPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
}

class _LoginNewClientFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _LoginWithTokenFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _GuestClientFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RegisterWithTokenFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RequestRegistrationTokenViaEmailFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RequestPasswordChangeTokenViaEmailFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ResetPasswordFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _DestroyLocalDataFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RefDetailsGenerateExternalLinkFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _UserProfileGetAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsSlideSourceBinaryFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _NewsEntryReactionsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryReadReceiptsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NewsEntryUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StorySlideSourceBinaryFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StoryCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _StoryReactionsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StoryReadReceiptsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StoryCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StoryDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _StoryUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _PinDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ActerPinRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ActerPinRefreshFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ActerPinCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ActerPinCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ActerPinAttachmentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _PinUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventRsvpsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventReactionsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventRespondedByMeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventParticipantsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _CalendarEventCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventAttachmentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CalendarEventDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RsvpManagerRsvpEntriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RsvpManagerRespondedByMeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RsvpManagerCountAtStatusFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint32()
  external int arg5;
}

class _RsvpManagerUsersAtStatusFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RsvpDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerReactionEntriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerSendLikeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerSendReactionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerRedactLikeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerRedactReactionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReactionManagerReloadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ReadReceiptsManagerAnnounceReadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ReadReceiptsManagerReloadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _EventSendStateAbortFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomDisplayNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomSetJoinRuleFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomSpaceRelationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomIsDirectFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomAddParentRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _RoomRemoveParentRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomAddChildRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _RoomRemoveChildRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomGetMyMembershipFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomActiveMembersIdsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomActiveMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomInvitedMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomGetMemberFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomInviteUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomNotificationModeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _RoomDefaultNotificationModeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _RoomUnmuteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomSetNotificationModeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomUpdatePowerLevelFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomUploadAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomRemoveAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomSetTopicFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomSetNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomLeaveFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomUserSettingsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _UserRoomSettingsSetHasSeenSuggestedFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _UserRoomSettingsSetIncludeCalSyncFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamGetMessageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TimelineStreamFetchDetailsForEventFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamPaginateBackwardsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamSendMessageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamEditMessageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamReplyMessageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamMarkAsReadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TimelineStreamToggleReactionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoSpaceRelationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoUploadAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoRemoveAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetTopicFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoActiveMembersIdsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoActiveMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoInvitedMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoGetMemberFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoGetMyMembershipFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoTypingNoticeFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoMediaBinaryFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetBookmarkedFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoInviteUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoPermalinkFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _ConvoJoinFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoLeaveFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoGetInviteesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoDownloadMediaFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoMediaPathFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoIsEncryptedFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoRedactMessageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoUpdatePowerLevelFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoReportContentFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoRedactContentFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoMsgDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSaveMsgDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoClearMsgDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ConvoRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPolicyRuleRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPolicyRuleServerFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPolicyRuleUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetEncryptionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetGuestAccessFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetHistoryVisibilityFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetJoinRulesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPinnedEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsBanFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsEventsDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsInviteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsKickFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsStateDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsUsersDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetPowerLevelsNotificationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetServerAclFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ConvoSetTombstoneFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CommentDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CommentCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _CommentsManagerCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _CommentsManagerReloadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ObjectInvitationsManagerInviteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _ObjectInvitationsManagerReloadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentDownloadMediaFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentMediaPathFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AttachmentsManagerAttachmentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentsManagerContentDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentsManagerLinkDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentsManagerReferenceDraftFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentsManagerReloadFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AttachmentsManagerRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskAssignSelfFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskUnassignSelfFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskRefreshFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TaskCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskAttachmentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskInvitationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListTasksFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListTaskFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListRefreshFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListCanRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _TaskListRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListCommentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListAttachmentsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListDraftSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _TaskListUpdateBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceHierarchyRoomInfoGetAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceRelationsQueryHierarchyFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ActivitiesGetIdsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _RoomPreviewAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceCreateOnboardingDataFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceSpaceRelationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceIsChildSpaceOfFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _SpaceAddChildRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _SpaceRemoveChildRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceUploadAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetActerSpaceStatesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceRemoveAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetTopicFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetBookmarkedFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceActiveMembersIdsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceActiveMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceInvitedMembersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceInviteUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceGetMemberFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceGetMyMembershipFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceIsEncryptedFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceIsActerSpaceFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceTaskListsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceLatestNewsEntriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceLatestStoriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceCalendarEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpacePinsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceJoinFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceLeaveFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpacePowerLevelsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceAppSettingsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceUpdateAppSettingsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _SpaceUpdateFeaturePowerLevelsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceUpdateRegularPowerLevelsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceReportContentFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceRedactContentFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceCategoriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetCategoriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SpaceRefDetailsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPolicyRuleRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPolicyRuleServerFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPolicyRuleUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetEncryptionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetGuestAccessFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetHistoryVisibilityFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetJoinRulesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPinnedEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsBanFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsEventsDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsInviteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsKickFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsRedactFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsStateDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsUsersDefaultFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetPowerLevelsNotificationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetServerAclFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SpaceSetTombstoneFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _MemberIgnoreFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _MemberUnignoreFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _MemberKickFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _MemberBanFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _MemberUnbanFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ActerUserAppSettingsBuilderSendFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountDisplayNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountSetDisplayNameFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountUploadAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountIgnoredUsersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountIgnoreUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountUnignoreUserFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountActerAppSettingsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountDeactivateFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountChangePasswordFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountConfirmedEmailAddressesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountRequestedEmailAddressesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountRequest3pidManagementTokenViaEmailFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountExternalIdsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _AccountTryConfirmEmailStatusFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountSubmitTokenFromEmailFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountRemoveEmailAddressFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _AccountBookmarksFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _BookmarksAddFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _BookmarksRemoveFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _PublicSearchResultItemGetAvatarFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NotificationSenderImageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NotificationRoomImageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NotificationItemImageFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NotificationItemImagePathFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _PusherDeleteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _InvitationsManagerRoomInvitationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _InvitationsManagerObjectInvitationsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientRestoreTokenFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _ClientRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientConvoFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientHasConvoFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientConvoWithRetryFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientUploadMediaFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientSpacesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientJoinRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientSpaceFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientSuggestedUsersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientSearchUsersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientSearchPublicRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientVerifiedDeviceFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientLogoutFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientRequestVerificationFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientInstallRequestEventHandlerFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientInstallSasEventHandlerFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientCreateConvoFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientCreateActerSpaceFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForRoomFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientWaitForCommentFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForNewsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientLatestNewsEntriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForStoryFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientLatestStoriesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForPinFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientPinsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientPinFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientTaskListFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientTaskListsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForTaskFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientMyOpenTasksFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientCalendarEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientCalendarEventFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForCalendarEventFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForReactionFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientWaitForRsvpFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientInstallDefaultActerPushRulesFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientPushersFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientAddPusherFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientAddEmailPusherFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ClientGetNotificationItemFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientAllUpcomingEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientMyUpcomingEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientMyPastEventsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientNotificationSettingsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientDeviceRecordsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientRoomPreviewFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientActivityFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _ClientUrlPreviewFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _NotificationSettingsDefaultNotificationModeFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _NotificationSettingsSetDefaultNotificationModeFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _NotificationSettingsGlobalContentSettingFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _NotificationSettingsSetGlobalContentSettingFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _NotificationSettingsObjectPushSubscriptionStatusStrFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _NotificationSettingsSubscribeObjectPushFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _NotificationSettingsUnsubscribeObjectPushFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomInvitationAcceptFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _RoomInvitationRejectFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SuperInvitesTokensFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SuperInvitesCreateOrUpdateTokenFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SuperInvitesDeleteFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SuperInvitesRedeemFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SuperInvitesInfoFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _VerificationEventGetEmojisFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _VerificationEventAcceptVerificationRequestFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventCancelVerificationRequestFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventAcceptVerificationRequestWithMethodFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventStartSasVerificationFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventAcceptSasVerificationFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventCancelSasVerificationFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventConfirmSasVerificationFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _VerificationEventMismatchSasVerificationFuturePollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SessionManagerAllSessionsFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _SessionManagerDeleteDeviceFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _SessionManagerRequestVerificationFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _SessionManagerTerminateVerificationFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _BackupManagerEnableFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _BackupManagerResetKeyFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _BackupManagerResetIdentityFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
  @ffi.UintPtr()
  external int arg6;
  @ffi.UintPtr()
  external int arg7;
}

class _BackupManagerDisableFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _BackupManagerRecoverFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _BackupManagerStoredEncKeyFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.IntPtr()
  external int arg5;
}

class _BackupManagerStoredEncKeyWhenFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint64()
  external int arg5;
}

class _BackupManagerDestroyStoredEncKeyFuturePollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
  @ffi.IntPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
  @ffi.UintPtr()
  external int arg4;
  @ffi.Uint8()
  external int arg5;
}

class _ActerPinSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _RsvpManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ReactionManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ReadReceiptsManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _RoomSubscribeToUpdatesStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _UserRoomSettingsSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _TimelineStreamMessagesStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _CommentsManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ObjectInvitationsManagerSubscribeStreamStreamPollReturn
    extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _AttachmentsManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _TaskSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _TaskListSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ActivitiesSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _AccountSubscribeAppSettingsStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _SyncStateFirstSyncedRxStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _SyncStateSyncErrorRxStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class _InvitationsManagerSubscribeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientConvosStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ClientSpacesStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ClientVerificationEventRxStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ClientDeviceEventRxStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ClientSubscribeToTypingEventStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
}

class _ClientSubscribeSectionStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeModelStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeModelObjectsStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeModelParamStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeRoomStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeRoomParamStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeRoomSectionStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeEventTypeStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeAccountDataStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeRoomAccountDataStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _ClientSubscribeMyOpenTasksStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _NotificationSettingsChangesStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.Uint8()
  external int arg1;
}

class _BackupManagerStateStreamStreamPollReturn extends ffi.Struct {
  @ffi.Uint8()
  external int arg0;
  @ffi.IntPtr()
  external int arg1;
  @ffi.UintPtr()
  external int arg2;
  @ffi.UintPtr()
  external int arg3;
}

class FfiListActerPin extends Iterable<ActerPin>
    implements CustomIterable<ActerPin> {
  final Api _api;
  final _Box _box;

  FfiListActerPin._(this._api, this._box);

  @override
  Iterator<ActerPin> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListActerPinLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  ActerPin elementAt(int index) {
    final address = _api._ffiListActerPinElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return ActerPin._(_api, reference);
  }

  ActerPin operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  ActerPin remove(int index) {
    final address = _api._ffiListActerPinRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_ActerPin",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return ActerPin._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(ActerPin element) {
    _api._ffiListActerPinAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, ActerPin element) {
    _api._ffiListActerPinInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListAttachment extends Iterable<Attachment>
    implements CustomIterable<Attachment> {
  final Api _api;
  final _Box _box;

  FfiListAttachment._(this._api, this._box);

  @override
  Iterator<Attachment> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListAttachmentLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Attachment elementAt(int index) {
    final address = _api._ffiListAttachmentElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Attachment._(_api, reference);
  }

  Attachment operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Attachment remove(int index) {
    final address = _api._ffiListAttachmentRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Attachment",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Attachment._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Attachment element) {
    _api._ffiListAttachmentAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Attachment element) {
    _api._ffiListAttachmentInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListCalendarEvent extends Iterable<CalendarEvent>
    implements CustomIterable<CalendarEvent> {
  final Api _api;
  final _Box _box;

  FfiListCalendarEvent._(this._api, this._box);

  @override
  Iterator<CalendarEvent> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListCalendarEventLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  CalendarEvent elementAt(int index) {
    final address = _api._ffiListCalendarEventElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return CalendarEvent._(_api, reference);
  }

  CalendarEvent operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  CalendarEvent remove(int index) {
    final address = _api._ffiListCalendarEventRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_CalendarEvent",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return CalendarEvent._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(CalendarEvent element) {
    _api._ffiListCalendarEventAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, CalendarEvent element) {
    _api._ffiListCalendarEventInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListCategory extends Iterable<Category>
    implements CustomIterable<Category> {
  final Api _api;
  final _Box _box;

  FfiListCategory._(this._api, this._box);

  @override
  Iterator<Category> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListCategoryLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Category elementAt(int index) {
    final address = _api._ffiListCategoryElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Category._(_api, reference);
  }

  Category operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Category remove(int index) {
    final address = _api._ffiListCategoryRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Category",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Category._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Category element) {
    _api._ffiListCategoryAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Category element) {
    _api._ffiListCategoryInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListComment extends Iterable<Comment>
    implements CustomIterable<Comment> {
  final Api _api;
  final _Box _box;

  FfiListComment._(this._api, this._box);

  @override
  Iterator<Comment> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListCommentLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Comment elementAt(int index) {
    final address = _api._ffiListCommentElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Comment._(_api, reference);
  }

  Comment operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Comment remove(int index) {
    final address = _api._ffiListCommentRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Comment",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Comment._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Comment element) {
    _api._ffiListCommentAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Comment element) {
    _api._ffiListCommentInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListConvo extends Iterable<Convo> implements CustomIterable<Convo> {
  final Api _api;
  final _Box _box;

  FfiListConvo._(this._api, this._box);

  @override
  Iterator<Convo> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListConvoLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Convo elementAt(int index) {
    final address = _api._ffiListConvoElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Convo._(_api, reference);
  }

  Convo operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Convo remove(int index) {
    final address = _api._ffiListConvoRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Convo",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Convo._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Convo element) {
    _api._ffiListConvoAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Convo element) {
    _api._ffiListConvoInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListDeviceRecord extends Iterable<DeviceRecord>
    implements CustomIterable<DeviceRecord> {
  final Api _api;
  final _Box _box;

  FfiListDeviceRecord._(this._api, this._box);

  @override
  Iterator<DeviceRecord> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListDeviceRecordLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  DeviceRecord elementAt(int index) {
    final address = _api._ffiListDeviceRecordElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return DeviceRecord._(_api, reference);
  }

  DeviceRecord operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  DeviceRecord remove(int index) {
    final address = _api._ffiListDeviceRecordRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_DeviceRecord",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return DeviceRecord._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(DeviceRecord element) {
    _api._ffiListDeviceRecordAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, DeviceRecord element) {
    _api._ffiListDeviceRecordInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListEventLocationInfo extends Iterable<EventLocationInfo>
    implements CustomIterable<EventLocationInfo> {
  final Api _api;
  final _Box _box;

  FfiListEventLocationInfo._(this._api, this._box);

  @override
  Iterator<EventLocationInfo> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListEventLocationInfoLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  EventLocationInfo elementAt(int index) {
    final address = _api._ffiListEventLocationInfoElementAt(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return EventLocationInfo._(_api, reference);
  }

  EventLocationInfo operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  EventLocationInfo remove(int index) {
    final address = _api._ffiListEventLocationInfoRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_EventLocationInfo",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return EventLocationInfo._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(EventLocationInfo element) {
    _api._ffiListEventLocationInfoAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, EventLocationInfo element) {
    _api._ffiListEventLocationInfoInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListExternalId extends Iterable<ExternalId>
    implements CustomIterable<ExternalId> {
  final Api _api;
  final _Box _box;

  FfiListExternalId._(this._api, this._box);

  @override
  Iterator<ExternalId> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListExternalIdLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  ExternalId elementAt(int index) {
    final address = _api._ffiListExternalIdElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return ExternalId._(_api, reference);
  }

  ExternalId operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  ExternalId remove(int index) {
    final address = _api._ffiListExternalIdRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_ExternalId",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return ExternalId._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(ExternalId element) {
    _api._ffiListExternalIdAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, ExternalId element) {
    _api._ffiListExternalIdInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListFfiString extends Iterable<FfiString>
    implements CustomIterable<FfiString> {
  final Api _api;
  final _Box _box;

  FfiListFfiString._(this._api, this._box);

  @override
  Iterator<FfiString> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListFfiStringLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  FfiString elementAt(int index) {
    final address = _api._ffiListFfiStringElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return FfiString._(_api, reference);
  }

  FfiString operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  FfiString remove(int index) {
    final address = _api._ffiListFfiStringRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_FfiString",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return FfiString._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(FfiString element) {
    _api._ffiListFfiStringAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, FfiString element) {
    _api._ffiListFfiStringInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListMember extends Iterable<Member> implements CustomIterable<Member> {
  final Api _api;
  final _Box _box;

  FfiListMember._(this._api, this._box);

  @override
  Iterator<Member> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListMemberLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Member elementAt(int index) {
    final address = _api._ffiListMemberElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Member._(_api, reference);
  }

  Member operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Member remove(int index) {
    final address = _api._ffiListMemberRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Member",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Member._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Member element) {
    _api._ffiListMemberAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Member element) {
    _api._ffiListMemberInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListNewsEntry extends Iterable<NewsEntry>
    implements CustomIterable<NewsEntry> {
  final Api _api;
  final _Box _box;

  FfiListNewsEntry._(this._api, this._box);

  @override
  Iterator<NewsEntry> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListNewsEntryLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  NewsEntry elementAt(int index) {
    final address = _api._ffiListNewsEntryElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return NewsEntry._(_api, reference);
  }

  NewsEntry operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  NewsEntry remove(int index) {
    final address = _api._ffiListNewsEntryRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_NewsEntry",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return NewsEntry._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(NewsEntry element) {
    _api._ffiListNewsEntryAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, NewsEntry element) {
    _api._ffiListNewsEntryInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListNewsSlide extends Iterable<NewsSlide>
    implements CustomIterable<NewsSlide> {
  final Api _api;
  final _Box _box;

  FfiListNewsSlide._(this._api, this._box);

  @override
  Iterator<NewsSlide> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListNewsSlideLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  NewsSlide elementAt(int index) {
    final address = _api._ffiListNewsSlideElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return NewsSlide._(_api, reference);
  }

  NewsSlide operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  NewsSlide remove(int index) {
    final address = _api._ffiListNewsSlideRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_NewsSlide",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return NewsSlide._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(NewsSlide element) {
    _api._ffiListNewsSlideAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, NewsSlide element) {
    _api._ffiListNewsSlideInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListNewsSlideDraft extends Iterable<NewsSlideDraft>
    implements CustomIterable<NewsSlideDraft> {
  final Api _api;
  final _Box _box;

  FfiListNewsSlideDraft._(this._api, this._box);

  @override
  Iterator<NewsSlideDraft> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListNewsSlideDraftLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  NewsSlideDraft elementAt(int index) {
    final address = _api._ffiListNewsSlideDraftElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return NewsSlideDraft._(_api, reference);
  }

  NewsSlideDraft operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  NewsSlideDraft remove(int index) {
    final address = _api._ffiListNewsSlideDraftRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_NewsSlideDraft",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return NewsSlideDraft._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(NewsSlideDraft element) {
    _api._ffiListNewsSlideDraftAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, NewsSlideDraft element) {
    _api._ffiListNewsSlideDraftInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListObjRef extends Iterable<ObjRef> implements CustomIterable<ObjRef> {
  final Api _api;
  final _Box _box;

  FfiListObjRef._(this._api, this._box);

  @override
  Iterator<ObjRef> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListObjRefLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  ObjRef elementAt(int index) {
    final address = _api._ffiListObjRefElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return ObjRef._(_api, reference);
  }

  ObjRef operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  ObjRef remove(int index) {
    final address = _api._ffiListObjRefRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_ObjRef",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return ObjRef._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(ObjRef element) {
    _api._ffiListObjRefAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, ObjRef element) {
    _api._ffiListObjRefInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListPublicSearchResultItem extends Iterable<PublicSearchResultItem>
    implements CustomIterable<PublicSearchResultItem> {
  final Api _api;
  final _Box _box;

  FfiListPublicSearchResultItem._(this._api, this._box);

  @override
  Iterator<PublicSearchResultItem> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListPublicSearchResultItemLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  PublicSearchResultItem elementAt(int index) {
    final address = _api._ffiListPublicSearchResultItemElementAt(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return PublicSearchResultItem._(_api, reference);
  }

  PublicSearchResultItem operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  PublicSearchResultItem remove(int index) {
    final address = _api._ffiListPublicSearchResultItemRemove(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_PublicSearchResultItem",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return PublicSearchResultItem._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(PublicSearchResultItem element) {
    _api._ffiListPublicSearchResultItemAdd(
      _box.borrow(),
      element._box.borrow(),
    );
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, PublicSearchResultItem element) {
    _api._ffiListPublicSearchResultItemInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListPusher extends Iterable<Pusher> implements CustomIterable<Pusher> {
  final Api _api;
  final _Box _box;

  FfiListPusher._(this._api, this._box);

  @override
  Iterator<Pusher> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListPusherLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Pusher elementAt(int index) {
    final address = _api._ffiListPusherElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Pusher._(_api, reference);
  }

  Pusher operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Pusher remove(int index) {
    final address = _api._ffiListPusherRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Pusher",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Pusher._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Pusher element) {
    _api._ffiListPusherAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Pusher element) {
    _api._ffiListPusherInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListReaction extends Iterable<Reaction>
    implements CustomIterable<Reaction> {
  final Api _api;
  final _Box _box;

  FfiListReaction._(this._api, this._box);

  @override
  Iterator<Reaction> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListReactionLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Reaction elementAt(int index) {
    final address = _api._ffiListReactionElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Reaction._(_api, reference);
  }

  Reaction operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Reaction remove(int index) {
    final address = _api._ffiListReactionRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Reaction",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Reaction._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Reaction element) {
    _api._ffiListReactionAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Reaction element) {
    _api._ffiListReactionInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListReactionRecord extends Iterable<ReactionRecord>
    implements CustomIterable<ReactionRecord> {
  final Api _api;
  final _Box _box;

  FfiListReactionRecord._(this._api, this._box);

  @override
  Iterator<ReactionRecord> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListReactionRecordLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  ReactionRecord elementAt(int index) {
    final address = _api._ffiListReactionRecordElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return ReactionRecord._(_api, reference);
  }

  ReactionRecord operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  ReactionRecord remove(int index) {
    final address = _api._ffiListReactionRecordRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_ReactionRecord",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return ReactionRecord._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(ReactionRecord element) {
    _api._ffiListReactionRecordAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, ReactionRecord element) {
    _api._ffiListReactionRecordInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListRoomInvitation extends Iterable<RoomInvitation>
    implements CustomIterable<RoomInvitation> {
  final Api _api;
  final _Box _box;

  FfiListRoomInvitation._(this._api, this._box);

  @override
  Iterator<RoomInvitation> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListRoomInvitationLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  RoomInvitation elementAt(int index) {
    final address = _api._ffiListRoomInvitationElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return RoomInvitation._(_api, reference);
  }

  RoomInvitation operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  RoomInvitation remove(int index) {
    final address = _api._ffiListRoomInvitationRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_RoomInvitation",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return RoomInvitation._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(RoomInvitation element) {
    _api._ffiListRoomInvitationAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, RoomInvitation element) {
    _api._ffiListRoomInvitationInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListRsvp extends Iterable<Rsvp> implements CustomIterable<Rsvp> {
  final Api _api;
  final _Box _box;

  FfiListRsvp._(this._api, this._box);

  @override
  Iterator<Rsvp> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListRsvpLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Rsvp elementAt(int index) {
    final address = _api._ffiListRsvpElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Rsvp._(_api, reference);
  }

  Rsvp operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Rsvp remove(int index) {
    final address = _api._ffiListRsvpRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Rsvp",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Rsvp._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Rsvp element) {
    _api._ffiListRsvpAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Rsvp element) {
    _api._ffiListRsvpInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListSpace extends Iterable<Space> implements CustomIterable<Space> {
  final Api _api;
  final _Box _box;

  FfiListSpace._(this._api, this._box);

  @override
  Iterator<Space> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListSpaceLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Space elementAt(int index) {
    final address = _api._ffiListSpaceElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Space._(_api, reference);
  }

  Space operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Space remove(int index) {
    final address = _api._ffiListSpaceRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Space",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Space._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Space element) {
    _api._ffiListSpaceAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Space element) {
    _api._ffiListSpaceInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListSpaceHierarchyRoomInfo extends Iterable<SpaceHierarchyRoomInfo>
    implements CustomIterable<SpaceHierarchyRoomInfo> {
  final Api _api;
  final _Box _box;

  FfiListSpaceHierarchyRoomInfo._(this._api, this._box);

  @override
  Iterator<SpaceHierarchyRoomInfo> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListSpaceHierarchyRoomInfoLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  SpaceHierarchyRoomInfo elementAt(int index) {
    final address = _api._ffiListSpaceHierarchyRoomInfoElementAt(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return SpaceHierarchyRoomInfo._(_api, reference);
  }

  SpaceHierarchyRoomInfo operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  SpaceHierarchyRoomInfo remove(int index) {
    final address = _api._ffiListSpaceHierarchyRoomInfoRemove(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_SpaceHierarchyRoomInfo",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return SpaceHierarchyRoomInfo._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(SpaceHierarchyRoomInfo element) {
    _api._ffiListSpaceHierarchyRoomInfoAdd(
      _box.borrow(),
      element._box.borrow(),
    );
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, SpaceHierarchyRoomInfo element) {
    _api._ffiListSpaceHierarchyRoomInfoInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListSpaceRelation extends Iterable<SpaceRelation>
    implements CustomIterable<SpaceRelation> {
  final Api _api;
  final _Box _box;

  FfiListSpaceRelation._(this._api, this._box);

  @override
  Iterator<SpaceRelation> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListSpaceRelationLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  SpaceRelation elementAt(int index) {
    final address = _api._ffiListSpaceRelationElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return SpaceRelation._(_api, reference);
  }

  SpaceRelation operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  SpaceRelation remove(int index) {
    final address = _api._ffiListSpaceRelationRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_SpaceRelation",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return SpaceRelation._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(SpaceRelation element) {
    _api._ffiListSpaceRelationAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, SpaceRelation element) {
    _api._ffiListSpaceRelationInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListStory extends Iterable<Story> implements CustomIterable<Story> {
  final Api _api;
  final _Box _box;

  FfiListStory._(this._api, this._box);

  @override
  Iterator<Story> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListStoryLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Story elementAt(int index) {
    final address = _api._ffiListStoryElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Story._(_api, reference);
  }

  Story operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Story remove(int index) {
    final address = _api._ffiListStoryRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Story",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Story._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Story element) {
    _api._ffiListStoryAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Story element) {
    _api._ffiListStoryInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListStorySlide extends Iterable<StorySlide>
    implements CustomIterable<StorySlide> {
  final Api _api;
  final _Box _box;

  FfiListStorySlide._(this._api, this._box);

  @override
  Iterator<StorySlide> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListStorySlideLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  StorySlide elementAt(int index) {
    final address = _api._ffiListStorySlideElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return StorySlide._(_api, reference);
  }

  StorySlide operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  StorySlide remove(int index) {
    final address = _api._ffiListStorySlideRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_StorySlide",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return StorySlide._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(StorySlide element) {
    _api._ffiListStorySlideAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, StorySlide element) {
    _api._ffiListStorySlideInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListStorySlideDraft extends Iterable<StorySlideDraft>
    implements CustomIterable<StorySlideDraft> {
  final Api _api;
  final _Box _box;

  FfiListStorySlideDraft._(this._api, this._box);

  @override
  Iterator<StorySlideDraft> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListStorySlideDraftLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  StorySlideDraft elementAt(int index) {
    final address = _api._ffiListStorySlideDraftElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return StorySlideDraft._(_api, reference);
  }

  StorySlideDraft operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  StorySlideDraft remove(int index) {
    final address = _api._ffiListStorySlideDraftRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_StorySlideDraft",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return StorySlideDraft._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(StorySlideDraft element) {
    _api._ffiListStorySlideDraftAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, StorySlideDraft element) {
    _api._ffiListStorySlideDraftInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListSuperInviteToken extends Iterable<SuperInviteToken>
    implements CustomIterable<SuperInviteToken> {
  final Api _api;
  final _Box _box;

  FfiListSuperInviteToken._(this._api, this._box);

  @override
  Iterator<SuperInviteToken> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListSuperInviteTokenLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  SuperInviteToken elementAt(int index) {
    final address = _api._ffiListSuperInviteTokenElementAt(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return SuperInviteToken._(_api, reference);
  }

  SuperInviteToken operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  SuperInviteToken remove(int index) {
    final address = _api._ffiListSuperInviteTokenRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_SuperInviteToken",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return SuperInviteToken._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(SuperInviteToken element) {
    _api._ffiListSuperInviteTokenAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, SuperInviteToken element) {
    _api._ffiListSuperInviteTokenInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListTask extends Iterable<Task> implements CustomIterable<Task> {
  final Api _api;
  final _Box _box;

  FfiListTask._(this._api, this._box);

  @override
  Iterator<Task> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListTaskLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  Task elementAt(int index) {
    final address = _api._ffiListTaskElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return Task._(_api, reference);
  }

  Task operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  Task remove(int index) {
    final address = _api._ffiListTaskRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Task",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return Task._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(Task element) {
    _api._ffiListTaskAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, Task element) {
    _api._ffiListTaskInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListTaskList extends Iterable<TaskList>
    implements CustomIterable<TaskList> {
  final Api _api;
  final _Box _box;

  FfiListTaskList._(this._api, this._box);

  @override
  Iterator<TaskList> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListTaskListLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  TaskList elementAt(int index) {
    final address = _api._ffiListTaskListElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return TaskList._(_api, reference);
  }

  TaskList operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  TaskList remove(int index) {
    final address = _api._ffiListTaskListRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_TaskList",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return TaskList._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(TaskList element) {
    _api._ffiListTaskListAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, TaskList element) {
    _api._ffiListTaskListInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListTimelineItem extends Iterable<TimelineItem>
    implements CustomIterable<TimelineItem> {
  final Api _api;
  final _Box _box;

  FfiListTimelineItem._(this._api, this._box);

  @override
  Iterator<TimelineItem> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListTimelineItemLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  TimelineItem elementAt(int index) {
    final address = _api._ffiListTimelineItemElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return TimelineItem._(_api, reference);
  }

  TimelineItem operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  TimelineItem remove(int index) {
    final address = _api._ffiListTimelineItemRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_TimelineItem",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return TimelineItem._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(TimelineItem element) {
    _api._ffiListTimelineItemAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, TimelineItem element) {
    _api._ffiListTimelineItemInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListUrlPreview extends Iterable<UrlPreview>
    implements CustomIterable<UrlPreview> {
  final Api _api;
  final _Box _box;

  FfiListUrlPreview._(this._api, this._box);

  @override
  Iterator<UrlPreview> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListUrlPreviewLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  UrlPreview elementAt(int index) {
    final address = _api._ffiListUrlPreviewElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return UrlPreview._(_api, reference);
  }

  UrlPreview operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  UrlPreview remove(int index) {
    final address = _api._ffiListUrlPreviewRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_UrlPreview",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return UrlPreview._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(UrlPreview element) {
    _api._ffiListUrlPreviewAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, UrlPreview element) {
    _api._ffiListUrlPreviewInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListUserId extends Iterable<UserId> implements CustomIterable<UserId> {
  final Api _api;
  final _Box _box;

  FfiListUserId._(this._api, this._box);

  @override
  Iterator<UserId> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListUserIdLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  UserId elementAt(int index) {
    final address = _api._ffiListUserIdElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return UserId._(_api, reference);
  }

  UserId operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  UserId remove(int index) {
    final address = _api._ffiListUserIdRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_UserId",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return UserId._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(UserId element) {
    _api._ffiListUserIdAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, UserId element) {
    _api._ffiListUserIdInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListUserProfile extends Iterable<UserProfile>
    implements CustomIterable<UserProfile> {
  final Api _api;
  final _Box _box;

  FfiListUserProfile._(this._api, this._box);

  @override
  Iterator<UserProfile> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListUserProfileLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  UserProfile elementAt(int index) {
    final address = _api._ffiListUserProfileElementAt(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return UserProfile._(_api, reference);
  }

  UserProfile operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  UserProfile remove(int index) {
    final address = _api._ffiListUserProfileRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_UserProfile",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return UserProfile._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(UserProfile element) {
    _api._ffiListUserProfileAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, UserProfile element) {
    _api._ffiListUserProfileInsert(_box.borrow(), index, element._box.borrow());
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}

class FfiListVerificationEmoji extends Iterable<VerificationEmoji>
    implements CustomIterable<VerificationEmoji> {
  final Api _api;
  final _Box _box;

  FfiListVerificationEmoji._(this._api, this._box);

  @override
  Iterator<VerificationEmoji> get iterator => CustomIterator(this);

  @override
  int get length {
    return _api._ffiListVerificationEmojiLen(_box.borrow());
  }

  /// List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.
  @override
  VerificationEmoji elementAt(int index) {
    final address = _api._ffiListVerificationEmojiElementAt(
      _box.borrow(),
      index,
    );
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_Leak",
      context: this,
    );
    return VerificationEmoji._(_api, reference);
  }

  VerificationEmoji operator [](int index) {
    return elementAt(index);
  }

  /// Moves the element out of this list and returns it
  VerificationEmoji remove(int index) {
    final address = _api._ffiListVerificationEmojiRemove(_box.borrow(), index);
    final reference = _Box(
      _api,
      ffi.Pointer.fromAddress(address),
      "drop_box_VerificationEmoji",
    );
    reference._finalizer = _api._registerFinalizer(reference);
    return VerificationEmoji._(_api, reference);
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void add(VerificationEmoji element) {
    _api._ffiListVerificationEmojiAdd(_box.borrow(), element._box.borrow());
    element._box.move();
  }

  /// The inserted element is moved into the list and must not be used again
  /// Although you can use the "elementAt" method to get a reference to the added element
  void insert(int index, VerificationEmoji element) {
    _api._ffiListVerificationEmojiInsert(
      _box.borrow(),
      index,
      element._box.borrow(),
    );
    element._box.move();
  }

  void drop() {
    _box.drop();
  }
}
// These are dart extensions we add to the generated ffi bindings after
// processing.

extension AddressClientExtension on Client {
  int get address => _box.borrow();
}
