// Autogenerated from Pigeon (v25.3.2), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers import 'dart:async'; import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; import 'package:flutter/services.dart'; PlatformException _createConnectionError(String channelName) { return PlatformException( code: 'channel-error', message: 'Unable to establish connection on channel: "$channelName".', ); } bool _deepEquals(Object? a, Object? b) { if (a is List && b is List) { return a.length == b.length && a.indexed .every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1])); } if (a is Map && b is Map) { return a.length == b.length && a.entries.every((MapEntry entry) => (b as Map).containsKey(entry.key) && _deepEquals(entry.value, b[entry.key])); } return a == b; } class ImAsset { ImAsset({ required this.id, required this.name, required this.type, this.createdAt, this.updatedAt, required this.durationInSeconds, }); String id; String name; int type; int? createdAt; int? updatedAt; int durationInSeconds; List _toList() { return [ id, name, type, createdAt, updatedAt, durationInSeconds, ]; } Object encode() { return _toList(); } static ImAsset decode(Object result) { result as List; return ImAsset( id: result[0]! as String, name: result[1]! as String, type: result[2]! as int, createdAt: result[3] as int?, updatedAt: result[4] as int?, durationInSeconds: result[5]! as int, ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { if (other is! ImAsset || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } return _deepEquals(encode(), other.encode()); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => Object.hashAll(_toList()) ; } class ImAlbum { ImAlbum({ required this.id, required this.name, this.updatedAt, required this.isCloud, required this.assetCount, }); String id; String name; int? updatedAt; bool isCloud; int assetCount; List _toList() { return [ id, name, updatedAt, isCloud, assetCount, ]; } Object encode() { return _toList(); } static ImAlbum decode(Object result) { result as List; return ImAlbum( id: result[0]! as String, name: result[1]! as String, updatedAt: result[2] as int?, isCloud: result[3]! as bool, assetCount: result[4]! as int, ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { if (other is! ImAlbum || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } return _deepEquals(encode(), other.encode()); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => Object.hashAll(_toList()) ; } class SyncDelta { SyncDelta({ required this.hasChanges, required this.updates, required this.deletes, required this.assetAlbums, }); bool hasChanges; List updates; List deletes; Map> assetAlbums; List _toList() { return [ hasChanges, updates, deletes, assetAlbums, ]; } Object encode() { return _toList(); } static SyncDelta decode(Object result) { result as List; return SyncDelta( hasChanges: result[0]! as bool, updates: (result[1] as List?)!.cast(), deletes: (result[2] as List?)!.cast(), assetAlbums: (result[3] as Map?)!.cast>(), ); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes bool operator ==(Object other) { if (other is! SyncDelta || other.runtimeType != runtimeType) { return false; } if (identical(this, other)) { return true; } return _deepEquals(encode(), other.encode()); } @override // ignore: avoid_equals_and_hash_code_on_mutable_classes int get hashCode => Object.hashAll(_toList()) ; } class _PigeonCodec extends StandardMessageCodec { const _PigeonCodec(); @override void writeValue(WriteBuffer buffer, Object? value) { if (value is int) { buffer.putUint8(4); buffer.putInt64(value); } else if (value is ImAsset) { buffer.putUint8(129); writeValue(buffer, value.encode()); } else if (value is ImAlbum) { buffer.putUint8(130); writeValue(buffer, value.encode()); } else if (value is SyncDelta) { buffer.putUint8(131); writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } } @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { case 129: return ImAsset.decode(readValue(buffer)!); case 130: return ImAlbum.decode(readValue(buffer)!); case 131: return SyncDelta.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); } } } class NativeSyncApi { /// Constructor for [NativeSyncApi]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. NativeSyncApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) : pigeonVar_binaryMessenger = binaryMessenger, pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; final BinaryMessenger? pigeonVar_binaryMessenger; static const MessageCodec pigeonChannelCodec = _PigeonCodec(); final String pigeonVar_messageChannelSuffix; Future shouldFullSync() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.shouldFullSync$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as bool?)!; } } Future getMediaChanges() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getMediaChanges$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as SyncDelta?)!; } } Future checkpointSync() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.checkpointSync$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else { return; } } Future clearSyncCheckpoint() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.clearSyncCheckpoint$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else { return; } } Future> getAssetIdsForAlbum(String albumId) async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetIdsForAlbum$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId]); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as List?)!.cast(); } } Future> getAlbums() async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAlbums$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as List?)!.cast(); } } Future getAssetsCountSince(String albumId, int timestamp) async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsCountSince$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, timestamp]); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as int?)!; } } Future> getAssetsForAlbum(String albumId, {int? updatedTimeCond}) async { final String pigeonVar_channelName = 'dev.flutter.pigeon.immich_mobile.NativeSyncApi.getAssetsForAlbum$pigeonVar_messageChannelSuffix'; final BasicMessageChannel pigeonVar_channel = BasicMessageChannel( pigeonVar_channelName, pigeonChannelCodec, binaryMessenger: pigeonVar_binaryMessenger, ); final Future pigeonVar_sendFuture = pigeonVar_channel.send([albumId, updatedTimeCond]); final List? pigeonVar_replyList = await pigeonVar_sendFuture as List?; if (pigeonVar_replyList == null) { throw _createConnectionError(pigeonVar_channelName); } else if (pigeonVar_replyList.length > 1) { throw PlatformException( code: pigeonVar_replyList[0]! as String, message: pigeonVar_replyList[1] as String?, details: pigeonVar_replyList[2], ); } else if (pigeonVar_replyList[0] == null) { throw PlatformException( code: 'null-error', message: 'Host platform returned null value for non-null return value.', ); } else { return (pigeonVar_replyList[0] as List?)!.cast(); } } }