From 3a27f3b24be0669eb4de9f25c8852f6e180a1060 Mon Sep 17 00:00:00 2001 From: otsmr Date: Sat, 29 Aug 2026 15:43:32 +0200 Subject: [PATCH] remove old protobuf model --- dependencies | 2 +- lib/app.dart | 6 +- .../handshake/initial_pqc_keys.dart | 42 + .../api/proto/client_to_server/response.dart | 28 + .../api/proto/server_to_client/response.dart | 268 + lib/core/bridge/api.dart | 225 +- lib/core/frb_generated.dart | 524 +- lib/core/frb_generated.io.dart | 175 + lib/core/frb_generated.web.dart | 175 + lib/locator.dart | 1 - lib/src/model/error_code.dart | 58 + .../api/http/http_requests.pbserver.dart | 13 - .../api/websocket/client_to_server.pb.dart | 4519 ----------------- .../websocket/client_to_server.pbenum.dart | 11 - .../websocket/client_to_server.pbjson.dart | 1359 ----- .../websocket/client_to_server.pbserver.dart | 13 - .../protobuf/api/websocket/error.pb.dart | 17 - .../protobuf/api/websocket/error.pbenum.dart | 153 - .../protobuf/api/websocket/error.pbjson.dart | 86 - .../api/websocket/error.pbserver.dart | 13 - .../api/websocket/server_to_client.pb.dart | 3229 ------------ .../websocket/server_to_client.pbenum.dart | 11 - .../websocket/server_to_client.pbjson.dart | 1135 ----- .../websocket/server_to_client.pbserver.dart | 13 - .../generated}/http_requests.pb.dart | 2 +- .../generated}/http_requests.pbenum.dart | 2 +- .../generated}/http_requests.pbjson.dart | 2 +- .../model/protobuf/client/http_requests.proto | 70 + .../services/api/mediafiles/upload.api.dart | 3 +- lib/src/services/api/rust_api_result.dart | 38 +- lib/src/services/api/utils.api.dart | 20 +- lib/src/services/group.service.dart | 56 - .../memories/memories_cloud.service.dart | 50 +- .../passwordless_recovery.service.dart | 16 +- lib/src/services/user_discovery.service.dart | 13 +- lib/src/utils/misc.dart | 7 +- .../select_chat_deletion_time.comp.dart | 7 +- .../entries/chat_ask_a_friend.entry.dart | 12 +- .../entries/chat_contacts.entry.dart | 10 +- .../contact/add_contact_via_qr_link.view.dart | 14 +- .../views/contact/add_new_contact.view.dart | 14 +- .../friend_suggestions.comp.dart | 11 +- lib/src/visual/views/groups/group.view.dart | 16 +- .../group_create_select_group_name.view.dart | 12 +- .../views/groups/group_member.context.dart | 30 +- .../visual/views/memories/memories.view.dart | 5 +- .../views/onboarding/register.view.dart | 6 +- .../settings/backup/backup_settings.view.dart | 11 +- .../backup/memories_backup_detail.view.dart | 11 +- .../views/settings/help/contact_us.view.dart | 2 +- .../subscription/additional_users.view.dart | 22 +- .../subscription/subscription.view.dart | 16 +- rust/src/api/runtime/helpers.rs | 7 + rust/src/api/server/purchases.rs | 12 +- rust/src/bridge/api.rs | 195 +- rust/src/frb_generated.rs | 470 ++ test/mocks/test_client.dart | 15 +- .../passwordless_recovery_service_test.dart | 10 - 58 files changed, 2334 insertions(+), 10929 deletions(-) create mode 100644 lib/core/api/proto/client_to_server/handshake/initial_pqc_keys.dart create mode 100644 lib/core/api/proto/client_to_server/response.dart create mode 100644 lib/src/model/error_code.dart delete mode 100644 lib/src/model/protobuf/api/http/http_requests.pbserver.dart delete mode 100644 lib/src/model/protobuf/api/websocket/client_to_server.pb.dart delete mode 100644 lib/src/model/protobuf/api/websocket/client_to_server.pbenum.dart delete mode 100644 lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart delete mode 100644 lib/src/model/protobuf/api/websocket/client_to_server.pbserver.dart delete mode 100644 lib/src/model/protobuf/api/websocket/error.pb.dart delete mode 100644 lib/src/model/protobuf/api/websocket/error.pbenum.dart delete mode 100644 lib/src/model/protobuf/api/websocket/error.pbjson.dart delete mode 100644 lib/src/model/protobuf/api/websocket/error.pbserver.dart delete mode 100644 lib/src/model/protobuf/api/websocket/server_to_client.pb.dart delete mode 100644 lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart delete mode 100644 lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart delete mode 100644 lib/src/model/protobuf/api/websocket/server_to_client.pbserver.dart rename lib/src/model/protobuf/{api/http => client/generated}/http_requests.pb.dart (99%) rename lib/src/model/protobuf/{api/http => client/generated}/http_requests.pbenum.dart (89%) rename lib/src/model/protobuf/{api/http => client/generated}/http_requests.pbjson.dart (99%) create mode 100644 lib/src/model/protobuf/client/http_requests.proto delete mode 100644 lib/src/services/group.service.dart diff --git a/dependencies b/dependencies index 76a36c4d..f46500ce 160000 --- a/dependencies +++ b/dependencies @@ -1 +1 @@ -Subproject commit 76a36c4d3da1fd0da04da3aa5a6c2b3b9c984925 +Subproject commit f46500ce45dbce12ee4431e5becb759ac7f26098 diff --git a/lib/app.dart b/lib/app.dart index 74031493..db0bc7ae 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -227,14 +227,12 @@ class _AppMainWidgetState extends State { // This means the user is in the onboarding screen, so start with the Proof of Work. final proofResult = await rustApiResult(RustApi.getProofOfWork()); - final proof = proofResult.value == null - ? null - : decodeProofOfWork(proofResult.value!); + final proof = proofResult.value; final disabled = proofResult.error == ErrorCode.RegistrationDisabled; if (proof != null) { Log.info('Starting with proof of work calculation.'); _proofOfWork = ( - calculatePoW(proof.prefix, proof.difficulty.toInt()), + calculatePoW(proof.prefix, proof.difficulty), false, ); } else { diff --git a/lib/core/api/proto/client_to_server/handshake/initial_pqc_keys.dart b/lib/core/api/proto/client_to_server/handshake/initial_pqc_keys.dart new file mode 100644 index 00000000..2936eba9 --- /dev/null +++ b/lib/core/api/proto/client_to_server/handshake/initial_pqc_keys.dart @@ -0,0 +1,42 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.12.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../../../../frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +class PqcPreKey { + final PlatformInt64 eccPreKeyId; + final Uint8List eccPreKey; + final PlatformInt64 kyberPreKeyId; + final Uint8List kyberPreKey; + final Uint8List kyberPreKeySignature; + + const PqcPreKey({ + required this.eccPreKeyId, + required this.eccPreKey, + required this.kyberPreKeyId, + required this.kyberPreKey, + required this.kyberPreKeySignature, + }); + + @override + int get hashCode => + eccPreKeyId.hashCode ^ + eccPreKey.hashCode ^ + kyberPreKeyId.hashCode ^ + kyberPreKey.hashCode ^ + kyberPreKeySignature.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PqcPreKey && + runtimeType == other.runtimeType && + eccPreKeyId == other.eccPreKeyId && + eccPreKey == other.eccPreKey && + kyberPreKeyId == other.kyberPreKeyId && + kyberPreKey == other.kyberPreKey && + kyberPreKeySignature == other.kyberPreKeySignature; +} diff --git a/lib/core/api/proto/client_to_server/response.dart b/lib/core/api/proto/client_to_server/response.dart new file mode 100644 index 00000000..ff844a8f --- /dev/null +++ b/lib/core/api/proto/client_to_server/response.dart @@ -0,0 +1,28 @@ +// This file is automatically generated, so please do not edit it. +// @generated by `flutter_rust_bridge`@ 2.12.0. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../../../frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +class PreKey { + final PlatformInt64 id; + final Uint8List prekey; + + const PreKey({ + required this.id, + required this.prekey, + }); + + @override + int get hashCode => id.hashCode ^ prekey.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PreKey && + runtimeType == other.runtimeType && + id == other.id && + prekey == other.prekey; +} diff --git a/lib/core/api/proto/server_to_client/response.dart b/lib/core/api/proto/server_to_client/response.dart index da8a4b8a..97eb4795 100644 --- a/lib/core/api/proto/server_to_client/response.dart +++ b/lib/core/api/proto/server_to_client/response.dart @@ -4,8 +4,213 @@ // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import import '../../../frb_generated.dart'; +import '../client_to_server/handshake/initial_pqc_keys.dart'; +import '../client_to_server/response.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +class AdditionalAccount { + final PlatformInt64 userId; + final String planId; + + const AdditionalAccount({ + required this.userId, + required this.planId, + }); + + @override + int get hashCode => userId.hashCode ^ planId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AdditionalAccount && + runtimeType == other.runtimeType && + userId == other.userId && + planId == other.planId; +} + +class MemoriesUploadUrls { + final String mediaId; + final PresignedPost? thumbnailUpload; + final PresignedPost? fullUpload; + + const MemoriesUploadUrls({ + required this.mediaId, + this.thumbnailUpload, + this.fullUpload, + }); + + @override + int get hashCode => + mediaId.hashCode ^ thumbnailUpload.hashCode ^ fullUpload.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MemoriesUploadUrls && + runtimeType == other.runtimeType && + mediaId == other.mediaId && + thumbnailUpload == other.thumbnailUpload && + fullUpload == other.fullUpload; +} + +class MemoriesUsage { + final PlatformInt64 maxBytes; + final PlatformInt64 currentBytes; + final PlatformInt64 count; + + const MemoriesUsage({ + required this.maxBytes, + required this.currentBytes, + required this.count, + }); + + @override + int get hashCode => + maxBytes.hashCode ^ currentBytes.hashCode ^ count.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MemoriesUsage && + runtimeType == other.runtimeType && + maxBytes == other.maxBytes && + currentBytes == other.currentBytes && + count == other.count; +} + +class PasswordlessNotificationMessage { + final PlatformInt64 id; + final Uint8List encryptedMessage; + + const PasswordlessNotificationMessage({ + required this.id, + required this.encryptedMessage, + }); + + @override + int get hashCode => id.hashCode ^ encryptedMessage.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PasswordlessNotificationMessage && + runtimeType == other.runtimeType && + id == other.id && + encryptedMessage == other.encryptedMessage; +} + +class PlanBallance { + final PlatformInt64 usedDailyMediaUploadLimit; + final PlatformInt64 usedUploadMediaSizeLimit; + final PlatformInt64? paymentPeriodDays; + final PlatformInt64? lastPaymentDoneUnixTimestamp; + final List transactions; + final List additionalAccounts; + final bool? autoRenewal; + final PlatformInt64? additionalAccountOwnerId; + + const PlanBallance({ + required this.usedDailyMediaUploadLimit, + required this.usedUploadMediaSizeLimit, + this.paymentPeriodDays, + this.lastPaymentDoneUnixTimestamp, + required this.transactions, + required this.additionalAccounts, + this.autoRenewal, + this.additionalAccountOwnerId, + }); + + @override + int get hashCode => + usedDailyMediaUploadLimit.hashCode ^ + usedUploadMediaSizeLimit.hashCode ^ + paymentPeriodDays.hashCode ^ + lastPaymentDoneUnixTimestamp.hashCode ^ + transactions.hashCode ^ + additionalAccounts.hashCode ^ + autoRenewal.hashCode ^ + additionalAccountOwnerId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PlanBallance && + runtimeType == other.runtimeType && + usedDailyMediaUploadLimit == other.usedDailyMediaUploadLimit && + usedUploadMediaSizeLimit == other.usedUploadMediaSizeLimit && + paymentPeriodDays == other.paymentPeriodDays && + lastPaymentDoneUnixTimestamp == other.lastPaymentDoneUnixTimestamp && + transactions == other.transactions && + additionalAccounts == other.additionalAccounts && + autoRenewal == other.autoRenewal && + additionalAccountOwnerId == other.additionalAccountOwnerId; +} + +class PqcBundle { + final PlatformInt64 eccSignedPrekeyId; + final Uint8List eccSignedPrekey; + final Uint8List eccSignedPrekeySignature; + final PlatformInt64 kyberSignedPrekeyId; + final Uint8List kyberSignedPrekey; + final Uint8List kyberSignedPrekeySignature; + final PqcPreKey? prekey; + + const PqcBundle({ + required this.eccSignedPrekeyId, + required this.eccSignedPrekey, + required this.eccSignedPrekeySignature, + required this.kyberSignedPrekeyId, + required this.kyberSignedPrekey, + required this.kyberSignedPrekeySignature, + this.prekey, + }); + + @override + int get hashCode => + eccSignedPrekeyId.hashCode ^ + eccSignedPrekey.hashCode ^ + eccSignedPrekeySignature.hashCode ^ + kyberSignedPrekeyId.hashCode ^ + kyberSignedPrekey.hashCode ^ + kyberSignedPrekeySignature.hashCode ^ + prekey.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PqcBundle && + runtimeType == other.runtimeType && + eccSignedPrekeyId == other.eccSignedPrekeyId && + eccSignedPrekey == other.eccSignedPrekey && + eccSignedPrekeySignature == other.eccSignedPrekeySignature && + kyberSignedPrekeyId == other.kyberSignedPrekeyId && + kyberSignedPrekey == other.kyberSignedPrekey && + kyberSignedPrekeySignature == other.kyberSignedPrekeySignature && + prekey == other.prekey; +} + +class PresignedPost { + final String url; + final Map fields; + + const PresignedPost({ + required this.url, + required this.fields, + }); + + @override + int get hashCode => url.hashCode ^ fields.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PresignedPost && + runtimeType == other.runtimeType && + url == other.url && + fields == other.fields; +} + class ProofOfWork { final String prefix; final PlatformInt64 difficulty; @@ -26,3 +231,66 @@ class ProofOfWork { prefix == other.prefix && difficulty == other.difficulty; } + +class Transaction { + const Transaction(); + + @override + int get hashCode => 0; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Transaction && runtimeType == other.runtimeType; +} + +class UserData { + final PlatformInt64 userId; + final List prekeys; + final Uint8List? username; + final Uint8List? publicIdentityKey; + final Uint8List? signedPrekey; + final Uint8List? signedPrekeySignature; + final PlatformInt64? signedPrekeyId; + final PlatformInt64? registrationId; + final PqcBundle? pqcBundle; + + const UserData({ + required this.userId, + required this.prekeys, + this.username, + this.publicIdentityKey, + this.signedPrekey, + this.signedPrekeySignature, + this.signedPrekeyId, + this.registrationId, + this.pqcBundle, + }); + + @override + int get hashCode => + userId.hashCode ^ + prekeys.hashCode ^ + username.hashCode ^ + publicIdentityKey.hashCode ^ + signedPrekey.hashCode ^ + signedPrekeySignature.hashCode ^ + signedPrekeyId.hashCode ^ + registrationId.hashCode ^ + pqcBundle.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is UserData && + runtimeType == other.runtimeType && + userId == other.userId && + prekeys == other.prekeys && + username == other.username && + publicIdentityKey == other.publicIdentityKey && + signedPrekey == other.signedPrekey && + signedPrekeySignature == other.signedPrekeySignature && + signedPrekeyId == other.signedPrekeyId && + registrationId == other.registrationId && + pqcBundle == other.pqcBundle; +} diff --git a/lib/core/bridge/api.dart b/lib/core/bridge/api.dart index f6816b08..eb9016b3 100644 --- a/lib/core/bridge/api.dart +++ b/lib/core/bridge/api.dart @@ -7,9 +7,9 @@ import '../api/server/prekeys.dart'; import '../frb_generated.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -// These functions are ignored because they are not marked as `pub`: `api_result`, `empty_api_response`, `encoded_api_response`, `from_rust_state` +// These functions are ignored because they are not marked as `pub`: `api_result`, `empty_api_response`, `from_rust_state` // These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `ApiConfig`, `ServerResult` -// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_fields_are_eq`, `assert_fields_are_eq`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `assert_fields_are_eq`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `clone`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `eq`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt`, `fmt` enum ApiConnectionState { stopped, @@ -56,6 +56,208 @@ enum ApiEventKind { loginTokenMigrated, } +class FrbAdditionalAccount { + final PlatformInt64 userId; + final String planId; + + const FrbAdditionalAccount({ + required this.userId, + required this.planId, + }); + + @override + int get hashCode => userId.hashCode ^ planId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbAdditionalAccount && + runtimeType == other.runtimeType && + userId == other.userId && + planId == other.planId; +} + +class FrbMemoriesUploadUrls { + final String mediaId; + final FrbPresignedPost? thumbnailUpload; + final FrbPresignedPost? fullUpload; + + const FrbMemoriesUploadUrls({ + required this.mediaId, + this.thumbnailUpload, + this.fullUpload, + }); + + @override + int get hashCode => + mediaId.hashCode ^ thumbnailUpload.hashCode ^ fullUpload.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbMemoriesUploadUrls && + runtimeType == other.runtimeType && + mediaId == other.mediaId && + thumbnailUpload == other.thumbnailUpload && + fullUpload == other.fullUpload; +} + +class FrbMemoriesUsage { + final PlatformInt64 currentBytes; + final PlatformInt64 count; + final PlatformInt64 maxBytes; + + const FrbMemoriesUsage({ + required this.currentBytes, + required this.count, + required this.maxBytes, + }); + + @override + int get hashCode => + currentBytes.hashCode ^ count.hashCode ^ maxBytes.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbMemoriesUsage && + runtimeType == other.runtimeType && + currentBytes == other.currentBytes && + count == other.count && + maxBytes == other.maxBytes; +} + +class FrbPasswordlessNotificationMessage { + final PlatformInt64 id; + final Uint8List encryptedMessage; + + const FrbPasswordlessNotificationMessage({ + required this.id, + required this.encryptedMessage, + }); + + @override + int get hashCode => id.hashCode ^ encryptedMessage.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbPasswordlessNotificationMessage && + runtimeType == other.runtimeType && + id == other.id && + encryptedMessage == other.encryptedMessage; +} + +class FrbPlanBalance { + final PlatformInt64 usedDailyMediaUploadLimit; + final PlatformInt64 usedUploadMediaSizeLimit; + final PlatformInt64? paymentPeriodDays; + final PlatformInt64? lastPaymentDoneUnixTimestamp; + final List additionalAccounts; + final bool? autoRenewal; + final PlatformInt64? additionalAccountOwnerId; + + const FrbPlanBalance({ + required this.usedDailyMediaUploadLimit, + required this.usedUploadMediaSizeLimit, + this.paymentPeriodDays, + this.lastPaymentDoneUnixTimestamp, + required this.additionalAccounts, + this.autoRenewal, + this.additionalAccountOwnerId, + }); + + @override + int get hashCode => + usedDailyMediaUploadLimit.hashCode ^ + usedUploadMediaSizeLimit.hashCode ^ + paymentPeriodDays.hashCode ^ + lastPaymentDoneUnixTimestamp.hashCode ^ + additionalAccounts.hashCode ^ + autoRenewal.hashCode ^ + additionalAccountOwnerId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbPlanBalance && + runtimeType == other.runtimeType && + usedDailyMediaUploadLimit == other.usedDailyMediaUploadLimit && + usedUploadMediaSizeLimit == other.usedUploadMediaSizeLimit && + paymentPeriodDays == other.paymentPeriodDays && + lastPaymentDoneUnixTimestamp == other.lastPaymentDoneUnixTimestamp && + additionalAccounts == other.additionalAccounts && + autoRenewal == other.autoRenewal && + additionalAccountOwnerId == other.additionalAccountOwnerId; +} + +class FrbPresignedPost { + final String url; + final List<(String, String)> fields; + + const FrbPresignedPost({ + required this.url, + required this.fields, + }); + + @override + int get hashCode => url.hashCode ^ fields.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbPresignedPost && + runtimeType == other.runtimeType && + url == other.url && + fields == other.fields; +} + +class FrbProofOfWork { + final String prefix; + final PlatformInt64 difficulty; + + const FrbProofOfWork({ + required this.prefix, + required this.difficulty, + }); + + @override + int get hashCode => prefix.hashCode ^ difficulty.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbProofOfWork && + runtimeType == other.runtimeType && + prefix == other.prefix && + difficulty == other.difficulty; +} + +class FrbUserData { + final PlatformInt64 userId; + final Uint8List username; + final Uint8List publicIdentityKey; + + const FrbUserData({ + required this.userId, + required this.username, + required this.publicIdentityKey, + }); + + @override + int get hashCode => + userId.hashCode ^ username.hashCode ^ publicIdentityKey.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FrbUserData && + runtimeType == other.runtimeType && + userId == other.userId && + username == other.username && + publicIdentityKey == other.publicIdentityKey; +} + /// Flutter-facing facade for the Rust-owned API runtime. class RustApi { const RustApi(); @@ -79,7 +281,8 @@ class RustApi { static Future checkForDeletedUsernames() => RustLib.instance.api.crateBridgeApiRustApiCheckForDeletedUsernames(); - static Future checkForPasswordlessNotification({ + static Future> + checkForPasswordlessNotification({ required String notificationId, required List downloadAuthToken, required Int64List alreadyReceivedMessageIds, @@ -136,7 +339,7 @@ class RustApi { static Future forceIpaCheck() => RustLib.instance.api.crateBridgeApiRustApiForceIpaCheck(); - static Future getMemoriesUrl({ + static Future getMemoriesUrl({ required String mediaId, required bool thumbnail, }) => RustLib.instance.api.crateBridgeApiRustApiGetMemoriesUrl( @@ -144,13 +347,13 @@ class RustApi { thumbnail: thumbnail, ); - static Future getMemoriesUsage() => + static Future getMemoriesUsage() => RustLib.instance.api.crateBridgeApiRustApiGetMemoriesUsage(); - static Future getPlanBalance() => + static Future getPlanBalance() => RustLib.instance.api.crateBridgeApiRustApiGetPlanBalance(); - static Future getProofOfWork() => + static Future getProofOfWork() => RustLib.instance.api.crateBridgeApiRustApiGetProofOfWork(); static Future getServerKeyForPasswordlessRecovery({ @@ -168,10 +371,10 @@ class RustApi { email: email, ); - static Future getUserById({required PlatformInt64 userId}) => + static Future getUserById({required PlatformInt64 userId}) => RustLib.instance.api.crateBridgeApiRustApiGetUserById(userId: userId); - static Future getUserData({required String username}) => + static Future getUserData({required String username}) => RustLib.instance.api.crateBridgeApiRustApiGetUserData(username: username); static Future getUserIdFromUsername({ @@ -226,7 +429,7 @@ class RustApi { verificationData: verificationData, ); - static Future loadPlanBalance() => + static Future loadPlanBalance() => RustLib.instance.api.crateBridgeApiRustApiLoadPlanBalance(); static Future notifyMessagesOpened({ @@ -313,7 +516,7 @@ class RustApi { .api .crateBridgeApiRustApiRequestMediaReupload(mediaId: mediaId); - static Future requestMemoriesUpload({ + static Future requestMemoriesUpload({ required PlatformInt64 size, required PlatformInt64 originalDate, required String mediaId, diff --git a/lib/core/frb_generated.dart b/lib/core/frb_generated.dart index 50106c3c..b4835415 100644 --- a/lib/core/frb_generated.dart +++ b/lib/core/frb_generated.dart @@ -180,7 +180,8 @@ abstract class RustLibApi extends BaseApi { Future crateBridgeApiRustApiCheckForDeletedUsernames(); - Future crateBridgeApiRustApiCheckForPasswordlessNotification({ + Future> + crateBridgeApiRustApiCheckForPasswordlessNotification({ required String notificationId, required List downloadAuthToken, required Int64List alreadyReceivedMessageIds, @@ -217,16 +218,16 @@ abstract class RustLibApi extends BaseApi { Future crateBridgeApiRustApiForceIpaCheck(); - Future crateBridgeApiRustApiGetMemoriesUrl({ + Future crateBridgeApiRustApiGetMemoriesUrl({ required String mediaId, required bool thumbnail, }); - Future crateBridgeApiRustApiGetMemoriesUsage(); + Future crateBridgeApiRustApiGetMemoriesUsage(); - Future crateBridgeApiRustApiGetPlanBalance(); + Future crateBridgeApiRustApiGetPlanBalance(); - Future crateBridgeApiRustApiGetProofOfWork(); + Future crateBridgeApiRustApiGetProofOfWork(); Future crateBridgeApiRustApiGetServerKeyForPasswordlessRecovery({ required PlatformInt64 userId, @@ -236,11 +237,11 @@ abstract class RustLibApi extends BaseApi { String? email, }); - Future crateBridgeApiRustApiGetUserById({ + Future crateBridgeApiRustApiGetUserById({ required PlatformInt64 userId, }); - Future crateBridgeApiRustApiGetUserData({ + Future crateBridgeApiRustApiGetUserData({ required String username, }); @@ -276,7 +277,7 @@ abstract class RustLibApi extends BaseApi { required String verificationData, }); - Future crateBridgeApiRustApiLoadPlanBalance(); + Future crateBridgeApiRustApiLoadPlanBalance(); Future crateBridgeApiRustApiNotifyMessagesOpened({ required PlatformInt64 contactId, @@ -331,7 +332,7 @@ abstract class RustLibApi extends BaseApi { required String mediaId, }); - Future crateBridgeApiRustApiRequestMemoriesUpload({ + Future crateBridgeApiRustApiRequestMemoriesUpload({ required PlatformInt64 size, required PlatformInt64 originalDate, required String mediaId, @@ -1303,7 +1304,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiCheckForPasswordlessNotification({ + Future> + crateBridgeApiRustApiCheckForPasswordlessNotification({ required String notificationId, required List downloadAuthToken, required Int64List alreadyReceivedMessageIds, @@ -1326,7 +1328,8 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: + sse_decode_list_frb_passwordless_notification_message, decodeErrorData: sse_decode_AnyhowException, ), constMeta: @@ -1758,7 +1761,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetMemoriesUrl({ + Future crateBridgeApiRustApiGetMemoriesUrl({ required String mediaId, required bool thumbnail, }) { @@ -1776,7 +1779,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_String, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetMemoriesUrlConstMeta, @@ -1793,7 +1796,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetMemoriesUsage() { + Future crateBridgeApiRustApiGetMemoriesUsage() { return handler.executeNormal( NormalTask( callFfi: (port_) { @@ -1806,7 +1809,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_memories_usage, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetMemoriesUsageConstMeta, @@ -1823,7 +1826,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetPlanBalance() { + Future crateBridgeApiRustApiGetPlanBalance() { return handler.executeNormal( NormalTask( callFfi: (port_) { @@ -1836,7 +1839,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_plan_balance, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetPlanBalanceConstMeta, @@ -1853,7 +1856,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetProofOfWork() { + Future crateBridgeApiRustApiGetProofOfWork() { return handler.executeNormal( NormalTask( callFfi: (port_) { @@ -1866,7 +1869,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_proof_of_work, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetProofOfWorkConstMeta, @@ -1938,7 +1941,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetUserById({ + Future crateBridgeApiRustApiGetUserById({ required PlatformInt64 userId, }) { return handler.executeNormal( @@ -1954,7 +1957,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_user_data, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetUserByIdConstMeta, @@ -1971,7 +1974,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiGetUserData({ + Future crateBridgeApiRustApiGetUserData({ required String username, }) { return handler.executeNormal( @@ -1987,7 +1990,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_user_data, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiGetUserDataConstMeta, @@ -2219,7 +2222,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiLoadPlanBalance() { + Future crateBridgeApiRustApiLoadPlanBalance() { return handler.executeNormal( NormalTask( callFfi: (port_) { @@ -2232,7 +2235,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_plan_balance, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiLoadPlanBalanceConstMeta, @@ -2667,7 +2670,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); @override - Future crateBridgeApiRustApiRequestMemoriesUpload({ + Future crateBridgeApiRustApiRequestMemoriesUpload({ required PlatformInt64 size, required PlatformInt64 originalDate, required String mediaId, @@ -2687,7 +2690,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); }, codec: SseCodec( - decodeSuccessData: sse_decode_list_prim_u_8_strict, + decodeSuccessData: sse_decode_frb_memories_upload_urls, decodeErrorData: sse_decode_AnyhowException, ), constMeta: kCrateBridgeApiRustApiRequestMemoriesUploadConstMeta, @@ -5077,6 +5080,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return dco_decode_frb_pre_key_bundle(raw); } + @protected + FrbPresignedPost dco_decode_box_autoadd_frb_presigned_post(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_frb_presigned_post(raw); + } + @protected PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5129,6 +5138,74 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return FlutterUserDiscovery(); } + @protected + FrbAdditionalAccount dco_decode_frb_additional_account(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FrbAdditionalAccount( + userId: dco_decode_i_64(arr[0]), + planId: dco_decode_String(arr[1]), + ); + } + + @protected + FrbMemoriesUploadUrls dco_decode_frb_memories_upload_urls(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return FrbMemoriesUploadUrls( + mediaId: dco_decode_String(arr[0]), + thumbnailUpload: dco_decode_opt_box_autoadd_frb_presigned_post(arr[1]), + fullUpload: dco_decode_opt_box_autoadd_frb_presigned_post(arr[2]), + ); + } + + @protected + FrbMemoriesUsage dco_decode_frb_memories_usage(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return FrbMemoriesUsage( + currentBytes: dco_decode_i_64(arr[0]), + count: dco_decode_i_64(arr[1]), + maxBytes: dco_decode_i_64(arr[2]), + ); + } + + @protected + FrbPasswordlessNotificationMessage + dco_decode_frb_passwordless_notification_message(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FrbPasswordlessNotificationMessage( + id: dco_decode_i_64(arr[0]), + encryptedMessage: dco_decode_list_prim_u_8_strict(arr[1]), + ); + } + + @protected + FrbPlanBalance dco_decode_frb_plan_balance(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) + throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return FrbPlanBalance( + usedDailyMediaUploadLimit: dco_decode_i_64(arr[0]), + usedUploadMediaSizeLimit: dco_decode_i_64(arr[1]), + paymentPeriodDays: dco_decode_opt_box_autoadd_i_64(arr[2]), + lastPaymentDoneUnixTimestamp: dco_decode_opt_box_autoadd_i_64(arr[3]), + additionalAccounts: dco_decode_list_frb_additional_account(arr[4]), + autoRenewal: dco_decode_opt_box_autoadd_bool(arr[5]), + additionalAccountOwnerId: dco_decode_opt_box_autoadd_i_64(arr[6]), + ); + } + @protected FrbPqcPreKey dco_decode_frb_pqc_pre_key(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5165,6 +5242,43 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + FrbPresignedPost dco_decode_frb_presigned_post(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FrbPresignedPost( + url: dco_decode_String(arr[0]), + fields: dco_decode_list_record_string_string(arr[1]), + ); + } + + @protected + FrbProofOfWork dco_decode_frb_proof_of_work(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 2) + throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + return FrbProofOfWork( + prefix: dco_decode_String(arr[0]), + difficulty: dco_decode_i_64(arr[1]), + ); + } + + @protected + FrbUserData dco_decode_frb_user_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 3) + throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + return FrbUserData( + userId: dco_decode_i_64(arr[0]), + username: dco_decode_list_prim_u_8_strict(arr[1]), + publicIdentityKey: dco_decode_list_prim_u_8_strict(arr[2]), + ); + } + @protected int dco_decode_i_32(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5233,6 +5347,25 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (raw as List).map(dco_decode_String).toList(); } + @protected + List dco_decode_list_frb_additional_account( + dynamic raw, + ) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map(dco_decode_frb_additional_account) + .toList(); + } + + @protected + List + dco_decode_list_frb_passwordless_notification_message(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List) + .map(dco_decode_frb_passwordless_notification_message) + .toList(); + } + @protected List dco_decode_list_frb_pqc_pre_key(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5289,6 +5422,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { .toList(); } + @protected + List<(String, String)> dco_decode_list_record_string_string(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_record_string_string).toList(); + } + @protected List dco_decode_list_sql_row(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5343,6 +5482,12 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return raw == null ? null : dco_decode_box_autoadd_f_64(raw); } + @protected + FrbPresignedPost? dco_decode_opt_box_autoadd_frb_presigned_post(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_frb_presigned_post(raw); + } + @protected PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5862,6 +6007,14 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return (sse_decode_frb_pre_key_bundle(deserializer)); } + @protected + FrbPresignedPost sse_decode_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_frb_presigned_post(deserializer)); + } + @protected PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5917,6 +6070,89 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return FlutterUserDiscovery(); } + @protected + FrbAdditionalAccount sse_decode_frb_additional_account( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_userId = sse_decode_i_64(deserializer); + var var_planId = sse_decode_String(deserializer); + return FrbAdditionalAccount(userId: var_userId, planId: var_planId); + } + + @protected + FrbMemoriesUploadUrls sse_decode_frb_memories_upload_urls( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_mediaId = sse_decode_String(deserializer); + var var_thumbnailUpload = sse_decode_opt_box_autoadd_frb_presigned_post( + deserializer, + ); + var var_fullUpload = sse_decode_opt_box_autoadd_frb_presigned_post( + deserializer, + ); + return FrbMemoriesUploadUrls( + mediaId: var_mediaId, + thumbnailUpload: var_thumbnailUpload, + fullUpload: var_fullUpload, + ); + } + + @protected + FrbMemoriesUsage sse_decode_frb_memories_usage(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_currentBytes = sse_decode_i_64(deserializer); + var var_count = sse_decode_i_64(deserializer); + var var_maxBytes = sse_decode_i_64(deserializer); + return FrbMemoriesUsage( + currentBytes: var_currentBytes, + count: var_count, + maxBytes: var_maxBytes, + ); + } + + @protected + FrbPasswordlessNotificationMessage + sse_decode_frb_passwordless_notification_message( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_i_64(deserializer); + var var_encryptedMessage = sse_decode_list_prim_u_8_strict(deserializer); + return FrbPasswordlessNotificationMessage( + id: var_id, + encryptedMessage: var_encryptedMessage, + ); + } + + @protected + FrbPlanBalance sse_decode_frb_plan_balance(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_usedDailyMediaUploadLimit = sse_decode_i_64(deserializer); + var var_usedUploadMediaSizeLimit = sse_decode_i_64(deserializer); + var var_paymentPeriodDays = sse_decode_opt_box_autoadd_i_64(deserializer); + var var_lastPaymentDoneUnixTimestamp = sse_decode_opt_box_autoadd_i_64( + deserializer, + ); + var var_additionalAccounts = sse_decode_list_frb_additional_account( + deserializer, + ); + var var_autoRenewal = sse_decode_opt_box_autoadd_bool(deserializer); + var var_additionalAccountOwnerId = sse_decode_opt_box_autoadd_i_64( + deserializer, + ); + return FrbPlanBalance( + usedDailyMediaUploadLimit: var_usedDailyMediaUploadLimit, + usedUploadMediaSizeLimit: var_usedUploadMediaSizeLimit, + paymentPeriodDays: var_paymentPeriodDays, + lastPaymentDoneUnixTimestamp: var_lastPaymentDoneUnixTimestamp, + additionalAccounts: var_additionalAccounts, + autoRenewal: var_autoRenewal, + additionalAccountOwnerId: var_additionalAccountOwnerId, + ); + } + @protected FrbPqcPreKey sse_decode_frb_pqc_pre_key(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5969,6 +6205,35 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { ); } + @protected + FrbPresignedPost sse_decode_frb_presigned_post(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_url = sse_decode_String(deserializer); + var var_fields = sse_decode_list_record_string_string(deserializer); + return FrbPresignedPost(url: var_url, fields: var_fields); + } + + @protected + FrbProofOfWork sse_decode_frb_proof_of_work(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_prefix = sse_decode_String(deserializer); + var var_difficulty = sse_decode_i_64(deserializer); + return FrbProofOfWork(prefix: var_prefix, difficulty: var_difficulty); + } + + @protected + FrbUserData sse_decode_frb_user_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_userId = sse_decode_i_64(deserializer); + var var_username = sse_decode_list_prim_u_8_strict(deserializer); + var var_publicIdentityKey = sse_decode_list_prim_u_8_strict(deserializer); + return FrbUserData( + userId: var_userId, + username: var_username, + publicIdentityKey: var_publicIdentityKey, + ); + } + @protected int sse_decode_i_32(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6039,6 +6304,35 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return ans_; } + @protected + List sse_decode_list_frb_additional_account( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_frb_additional_account(deserializer)); + } + return ans_; + } + + @protected + List + sse_decode_list_frb_passwordless_notification_message( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = []; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_frb_passwordless_notification_message(deserializer)); + } + return ans_; + } + @protected List sse_decode_list_frb_pqc_pre_key( SseDeserializer deserializer, @@ -6130,6 +6424,20 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { return ans_; } + @protected + List<(String, String)> sse_decode_list_record_string_string( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var len_ = sse_decode_i_32(deserializer); + var ans_ = <(String, String)>[]; + for (var idx_ = 0; idx_ < len_; ++idx_) { + ans_.add(sse_decode_record_string_string(deserializer)); + } + return ans_; + } + @protected List sse_decode_list_sql_row(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6226,6 +6534,19 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + FrbPresignedPost? sse_decode_opt_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_frb_presigned_post(deserializer)); + } else { + return null; + } + } + @protected PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6947,6 +7268,15 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_frb_pre_key_bundle(self, serializer); } + @protected + void sse_encode_box_autoadd_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_frb_presigned_post(self, serializer); + } + @protected void sse_encode_box_autoadd_i_64( PlatformInt64 self, @@ -7012,6 +7342,69 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { // Codec=Sse (Serialization based), see doc to use other codecs } + @protected + void sse_encode_frb_additional_account( + FrbAdditionalAccount self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self.userId, serializer); + sse_encode_String(self.planId, serializer); + } + + @protected + void sse_encode_frb_memories_upload_urls( + FrbMemoriesUploadUrls self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.mediaId, serializer); + sse_encode_opt_box_autoadd_frb_presigned_post( + self.thumbnailUpload, + serializer, + ); + sse_encode_opt_box_autoadd_frb_presigned_post(self.fullUpload, serializer); + } + + @protected + void sse_encode_frb_memories_usage( + FrbMemoriesUsage self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self.currentBytes, serializer); + sse_encode_i_64(self.count, serializer); + sse_encode_i_64(self.maxBytes, serializer); + } + + @protected + void sse_encode_frb_passwordless_notification_message( + FrbPasswordlessNotificationMessage self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self.id, serializer); + sse_encode_list_prim_u_8_strict(self.encryptedMessage, serializer); + } + + @protected + void sse_encode_frb_plan_balance( + FrbPlanBalance self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self.usedDailyMediaUploadLimit, serializer); + sse_encode_i_64(self.usedUploadMediaSizeLimit, serializer); + sse_encode_opt_box_autoadd_i_64(self.paymentPeriodDays, serializer); + sse_encode_opt_box_autoadd_i_64( + self.lastPaymentDoneUnixTimestamp, + serializer, + ); + sse_encode_list_frb_additional_account(self.additionalAccounts, serializer); + sse_encode_opt_box_autoadd_bool(self.autoRenewal, serializer); + sse_encode_opt_box_autoadd_i_64(self.additionalAccountOwnerId, serializer); + } + @protected void sse_encode_frb_pqc_pre_key(FrbPqcPreKey self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7041,6 +7434,34 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { sse_encode_list_prim_u_8_strict(self.identityKey, serializer); } + @protected + void sse_encode_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.url, serializer); + sse_encode_list_record_string_string(self.fields, serializer); + } + + @protected + void sse_encode_frb_proof_of_work( + FrbProofOfWork self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.prefix, serializer); + sse_encode_i_64(self.difficulty, serializer); + } + + @protected + void sse_encode_frb_user_data(FrbUserData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self.userId, serializer); + sse_encode_list_prim_u_8_strict(self.username, serializer); + sse_encode_list_prim_u_8_strict(self.publicIdentityKey, serializer); + } + @protected void sse_encode_i_32(int self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7104,6 +7525,30 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + void sse_encode_list_frb_additional_account( + List self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_frb_additional_account(item, serializer); + } + } + + @protected + void sse_encode_list_frb_passwordless_notification_message( + List self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_frb_passwordless_notification_message(item, serializer); + } + } + @protected void sse_encode_list_frb_pqc_pre_key( List self, @@ -7196,6 +7641,18 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + void sse_encode_list_record_string_string( + List<(String, String)> self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + for (final item in self) { + sse_encode_record_string_string(item, serializer); + } + } + @protected void sse_encode_list_sql_row(List self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7286,6 +7743,19 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { } } + @protected + void sse_encode_opt_box_autoadd_frb_presigned_post( + FrbPresignedPost? self, + SseSerializer serializer, + ) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_frb_presigned_post(self, serializer); + } + } + @protected void sse_encode_opt_box_autoadd_i_64( PlatformInt64? self, diff --git a/lib/core/frb_generated.io.dart b/lib/core/frb_generated.io.dart index f9d106e5..e94d702e 100644 --- a/lib/core/frb_generated.io.dart +++ b/lib/core/frb_generated.io.dart @@ -118,6 +118,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw); + @protected + FrbPresignedPost dco_decode_box_autoadd_frb_presigned_post(dynamic raw); + @protected PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw); @@ -143,12 +146,37 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected FlutterUserDiscovery dco_decode_flutter_user_discovery(dynamic raw); + @protected + FrbAdditionalAccount dco_decode_frb_additional_account(dynamic raw); + + @protected + FrbMemoriesUploadUrls dco_decode_frb_memories_upload_urls(dynamic raw); + + @protected + FrbMemoriesUsage dco_decode_frb_memories_usage(dynamic raw); + + @protected + FrbPasswordlessNotificationMessage + dco_decode_frb_passwordless_notification_message(dynamic raw); + + @protected + FrbPlanBalance dco_decode_frb_plan_balance(dynamic raw); + @protected FrbPqcPreKey dco_decode_frb_pqc_pre_key(dynamic raw); @protected FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw); + @protected + FrbPresignedPost dco_decode_frb_presigned_post(dynamic raw); + + @protected + FrbProofOfWork dco_decode_frb_proof_of_work(dynamic raw); + + @protected + FrbUserData dco_decode_frb_user_data(dynamic raw); + @protected int dco_decode_i_32(dynamic raw); @@ -175,6 +203,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected List dco_decode_list_String(dynamic raw); + @protected + List dco_decode_list_frb_additional_account( + dynamic raw, + ); + + @protected + List + dco_decode_list_frb_passwordless_notification_message(dynamic raw); + @protected List dco_decode_list_frb_pqc_pre_key(dynamic raw); @@ -203,6 +240,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dynamic raw, ); + @protected + List<(String, String)> dco_decode_list_record_string_string(dynamic raw); + @protected List dco_decode_list_sql_row(dynamic raw); @@ -231,6 +271,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected double? dco_decode_opt_box_autoadd_f_64(dynamic raw); + @protected + FrbPresignedPost? dco_decode_opt_box_autoadd_frb_presigned_post(dynamic raw); + @protected PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw); @@ -408,6 +451,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + FrbPresignedPost sse_decode_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ); + @protected PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer); @@ -439,12 +487,43 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + FrbAdditionalAccount sse_decode_frb_additional_account( + SseDeserializer deserializer, + ); + + @protected + FrbMemoriesUploadUrls sse_decode_frb_memories_upload_urls( + SseDeserializer deserializer, + ); + + @protected + FrbMemoriesUsage sse_decode_frb_memories_usage(SseDeserializer deserializer); + + @protected + FrbPasswordlessNotificationMessage + sse_decode_frb_passwordless_notification_message( + SseDeserializer deserializer, + ); + + @protected + FrbPlanBalance sse_decode_frb_plan_balance(SseDeserializer deserializer); + @protected FrbPqcPreKey sse_decode_frb_pqc_pre_key(SseDeserializer deserializer); @protected FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer); + @protected + FrbPresignedPost sse_decode_frb_presigned_post(SseDeserializer deserializer); + + @protected + FrbProofOfWork sse_decode_frb_proof_of_work(SseDeserializer deserializer); + + @protected + FrbUserData sse_decode_frb_user_data(SseDeserializer deserializer); + @protected int sse_decode_i_32(SseDeserializer deserializer); @@ -475,6 +554,17 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected List sse_decode_list_String(SseDeserializer deserializer); + @protected + List sse_decode_list_frb_additional_account( + SseDeserializer deserializer, + ); + + @protected + List + sse_decode_list_frb_passwordless_notification_message( + SseDeserializer deserializer, + ); + @protected List sse_decode_list_frb_pqc_pre_key( SseDeserializer deserializer, @@ -509,6 +599,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + List<(String, String)> sse_decode_list_record_string_string( + SseDeserializer deserializer, + ); + @protected List sse_decode_list_sql_row(SseDeserializer deserializer); @@ -537,6 +632,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer); + @protected + FrbPresignedPost? sse_decode_opt_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ); + @protected PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); @@ -782,6 +882,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_box_autoadd_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ); + @protected void sse_encode_box_autoadd_i_64( PlatformInt64 self, @@ -824,6 +930,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_frb_additional_account( + FrbAdditionalAccount self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_memories_upload_urls( + FrbMemoriesUploadUrls self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_memories_usage( + FrbMemoriesUsage self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_passwordless_notification_message( + FrbPasswordlessNotificationMessage self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_plan_balance( + FrbPlanBalance self, + SseSerializer serializer, + ); + @protected void sse_encode_frb_pqc_pre_key(FrbPqcPreKey self, SseSerializer serializer); @@ -833,6 +969,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_proof_of_work( + FrbProofOfWork self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_user_data(FrbUserData self, SseSerializer serializer); + @protected void sse_encode_i_32(int self, SseSerializer serializer); @@ -866,6 +1017,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_list_String(List self, SseSerializer serializer); + @protected + void sse_encode_list_frb_additional_account( + List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_frb_passwordless_notification_message( + List self, + SseSerializer serializer, + ); + @protected void sse_encode_list_frb_pqc_pre_key( List self, @@ -911,6 +1074,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_list_record_string_string( + List<(String, String)> self, + SseSerializer serializer, + ); + @protected void sse_encode_list_sql_row(List self, SseSerializer serializer); @@ -944,6 +1113,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer); + @protected + void sse_encode_opt_box_autoadd_frb_presigned_post( + FrbPresignedPost? self, + SseSerializer serializer, + ); + @protected void sse_encode_opt_box_autoadd_i_64( PlatformInt64? self, diff --git a/lib/core/frb_generated.web.dart b/lib/core/frb_generated.web.dart index 8f9863f4..6ab4ed9c 100644 --- a/lib/core/frb_generated.web.dart +++ b/lib/core/frb_generated.web.dart @@ -120,6 +120,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected FrbPreKeyBundle dco_decode_box_autoadd_frb_pre_key_bundle(dynamic raw); + @protected + FrbPresignedPost dco_decode_box_autoadd_frb_presigned_post(dynamic raw); + @protected PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw); @@ -145,12 +148,37 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected FlutterUserDiscovery dco_decode_flutter_user_discovery(dynamic raw); + @protected + FrbAdditionalAccount dco_decode_frb_additional_account(dynamic raw); + + @protected + FrbMemoriesUploadUrls dco_decode_frb_memories_upload_urls(dynamic raw); + + @protected + FrbMemoriesUsage dco_decode_frb_memories_usage(dynamic raw); + + @protected + FrbPasswordlessNotificationMessage + dco_decode_frb_passwordless_notification_message(dynamic raw); + + @protected + FrbPlanBalance dco_decode_frb_plan_balance(dynamic raw); + @protected FrbPqcPreKey dco_decode_frb_pqc_pre_key(dynamic raw); @protected FrbPreKeyBundle dco_decode_frb_pre_key_bundle(dynamic raw); + @protected + FrbPresignedPost dco_decode_frb_presigned_post(dynamic raw); + + @protected + FrbProofOfWork dco_decode_frb_proof_of_work(dynamic raw); + + @protected + FrbUserData dco_decode_frb_user_data(dynamic raw); + @protected int dco_decode_i_32(dynamic raw); @@ -177,6 +205,15 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected List dco_decode_list_String(dynamic raw); + @protected + List dco_decode_list_frb_additional_account( + dynamic raw, + ); + + @protected + List + dco_decode_list_frb_passwordless_notification_message(dynamic raw); + @protected List dco_decode_list_frb_pqc_pre_key(dynamic raw); @@ -205,6 +242,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { dynamic raw, ); + @protected + List<(String, String)> dco_decode_list_record_string_string(dynamic raw); + @protected List dco_decode_list_sql_row(dynamic raw); @@ -233,6 +273,9 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected double? dco_decode_opt_box_autoadd_f_64(dynamic raw); + @protected + FrbPresignedPost? dco_decode_opt_box_autoadd_frb_presigned_post(dynamic raw); + @protected PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw); @@ -410,6 +453,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + FrbPresignedPost sse_decode_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ); + @protected PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer); @@ -441,12 +489,43 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + FrbAdditionalAccount sse_decode_frb_additional_account( + SseDeserializer deserializer, + ); + + @protected + FrbMemoriesUploadUrls sse_decode_frb_memories_upload_urls( + SseDeserializer deserializer, + ); + + @protected + FrbMemoriesUsage sse_decode_frb_memories_usage(SseDeserializer deserializer); + + @protected + FrbPasswordlessNotificationMessage + sse_decode_frb_passwordless_notification_message( + SseDeserializer deserializer, + ); + + @protected + FrbPlanBalance sse_decode_frb_plan_balance(SseDeserializer deserializer); + @protected FrbPqcPreKey sse_decode_frb_pqc_pre_key(SseDeserializer deserializer); @protected FrbPreKeyBundle sse_decode_frb_pre_key_bundle(SseDeserializer deserializer); + @protected + FrbPresignedPost sse_decode_frb_presigned_post(SseDeserializer deserializer); + + @protected + FrbProofOfWork sse_decode_frb_proof_of_work(SseDeserializer deserializer); + + @protected + FrbUserData sse_decode_frb_user_data(SseDeserializer deserializer); + @protected int sse_decode_i_32(SseDeserializer deserializer); @@ -477,6 +556,17 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected List sse_decode_list_String(SseDeserializer deserializer); + @protected + List sse_decode_list_frb_additional_account( + SseDeserializer deserializer, + ); + + @protected + List + sse_decode_list_frb_passwordless_notification_message( + SseDeserializer deserializer, + ); + @protected List sse_decode_list_frb_pqc_pre_key( SseDeserializer deserializer, @@ -511,6 +601,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseDeserializer deserializer, ); + @protected + List<(String, String)> sse_decode_list_record_string_string( + SseDeserializer deserializer, + ); + @protected List sse_decode_list_sql_row(SseDeserializer deserializer); @@ -539,6 +634,11 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected double? sse_decode_opt_box_autoadd_f_64(SseDeserializer deserializer); + @protected + FrbPresignedPost? sse_decode_opt_box_autoadd_frb_presigned_post( + SseDeserializer deserializer, + ); + @protected PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); @@ -784,6 +884,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_box_autoadd_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ); + @protected void sse_encode_box_autoadd_i_64( PlatformInt64 self, @@ -826,6 +932,36 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_frb_additional_account( + FrbAdditionalAccount self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_memories_upload_urls( + FrbMemoriesUploadUrls self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_memories_usage( + FrbMemoriesUsage self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_passwordless_notification_message( + FrbPasswordlessNotificationMessage self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_plan_balance( + FrbPlanBalance self, + SseSerializer serializer, + ); + @protected void sse_encode_frb_pqc_pre_key(FrbPqcPreKey self, SseSerializer serializer); @@ -835,6 +971,21 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_frb_presigned_post( + FrbPresignedPost self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_proof_of_work( + FrbProofOfWork self, + SseSerializer serializer, + ); + + @protected + void sse_encode_frb_user_data(FrbUserData self, SseSerializer serializer); + @protected void sse_encode_i_32(int self, SseSerializer serializer); @@ -868,6 +1019,18 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_list_String(List self, SseSerializer serializer); + @protected + void sse_encode_list_frb_additional_account( + List self, + SseSerializer serializer, + ); + + @protected + void sse_encode_list_frb_passwordless_notification_message( + List self, + SseSerializer serializer, + ); + @protected void sse_encode_list_frb_pqc_pre_key( List self, @@ -913,6 +1076,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { SseSerializer serializer, ); + @protected + void sse_encode_list_record_string_string( + List<(String, String)> self, + SseSerializer serializer, + ); + @protected void sse_encode_list_sql_row(List self, SseSerializer serializer); @@ -946,6 +1115,12 @@ abstract class RustLibApiImplPlatform extends BaseApiImpl { @protected void sse_encode_opt_box_autoadd_f_64(double? self, SseSerializer serializer); + @protected + void sse_encode_opt_box_autoadd_frb_presigned_post( + FrbPresignedPost? self, + SseSerializer serializer, + ); + @protected void sse_encode_opt_box_autoadd_i_64( PlatformInt64? self, diff --git a/lib/locator.dart b/lib/locator.dart index f11fdf72..b91512c5 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -5,7 +5,6 @@ import 'package:twonly/src/services/news.service.dart'; import 'package:twonly/src/services/user.service.dart'; export 'package:twonly/core/bridge/api.dart'; -export 'package:twonly/src/model/protobuf/api/websocket/error.pb.dart'; export 'package:twonly/src/services/api/rust_api_result.dart'; final GetIt locator = GetIt.instance; diff --git a/lib/src/model/error_code.dart b/lib/src/model/error_code.dart new file mode 100644 index 00000000..304ae474 --- /dev/null +++ b/lib/src/model/error_code.dart @@ -0,0 +1,58 @@ +// ignore_for_file: constant_identifier_names + +enum ErrorCode { + Unknown(0), + BadRequest(400), + TooManyRequests(429), + InternalError(500), + + InvalidInvitationCode(1002), + UsernameAlreadyTaken(1003), + SignatureNotValid(1004), + UsernameNotFound(1005), + UsernameNotValid(1006), + InvalidPublicKey(1007), + SessionAlreadyAuthenticated(1008), + SessionNotAuthenticated(1009), + OnlyOneSessionAllowed(1010), + UploadLimitReached(1011), + InvalidUpdateToken(1012), + InvalidOffset(1013), + InvalidGoogleFcmToken(1014), + UploadTokenIsBlocked(1015), + UploadChecksumInvalid(1016), + InvalidDownloadToken(1017), + ApiEndpointNotFound(1018), + AuthTokenNotValid(1019), + InvalidPreKeys(1020), + VoucherInValid(1021), + PlanNotAllowed(1022), + PlanLimitReached(1023), + NotEnoughCredit(1024), + PlanDowngrade(1025), + PlanUpgradeNotYearly(1026), + InvalidSignedPreKey(1027), + UserIdNotFound(1028), + UserIdAlreadyTaken(1029), + AppVersionOutdated(1030), + NewDeviceRegistered(1031), + InvalidProofOfWork(1032), + RegistrationDisabled(1033), + IPAPaymentExpired(1034), + UserIsNotInFreePlan(1035), + ForegroundSessionConnected(1036), + NoRecoveryData(1037), + InvalidRecoveryData(1038); + + const ErrorCode(this.value); + final int value; + + static ErrorCode fromValue(int? value) { + return ErrorCode.values.firstWhere( + (e) => e.value == value, + orElse: () => ErrorCode.Unknown, + ); + } + + static ErrorCode valueOf(int? value) => fromValue(value); +} diff --git a/lib/src/model/protobuf/api/http/http_requests.pbserver.dart b/lib/src/model/protobuf/api/http/http_requests.pbserver.dart deleted file mode 100644 index 51f279b3..00000000 --- a/lib/src/model/protobuf/api/http/http_requests.pbserver.dart +++ /dev/null @@ -1,13 +0,0 @@ -// -// Generated code. Do not modify. -// source: api/http/http_requests.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'http_requests.pb.dart'; diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart deleted file mode 100644 index 5ad0fa3d..00000000 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pb.dart +++ /dev/null @@ -1,4519 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/client_to_server.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports - -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'error.pbenum.dart' as $0; - -export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - -enum ClientToServer_V { v0, notSet } - -class ClientToServer extends $pb.GeneratedMessage { - factory ClientToServer({ - V0? v0, - }) { - final result = create(); - if (v0 != null) result.v0 = v0; - return result; - } - - ClientToServer._(); - - factory ClientToServer.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ClientToServer.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, ClientToServer_V> _ClientToServer_VByTag = { - 1: ClientToServer_V.v0, - 0: ClientToServer_V.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ClientToServer', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [1]) - ..aOM(1, _omitFieldNames ? '' : 'V0', - protoName: 'V0', subBuilder: V0.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ClientToServer clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ClientToServer copyWith(void Function(ClientToServer) updates) => - super.copyWith((message) => updates(message as ClientToServer)) - as ClientToServer; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ClientToServer create() => ClientToServer._(); - @$core.override - ClientToServer createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ClientToServer getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ClientToServer? _defaultInstance; - - @$pb.TagNumber(1) - ClientToServer_V whichV() => _ClientToServer_VByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - void clearV() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - V0 get v0 => $_getN(0); - @$pb.TagNumber(1) - set v0(V0 value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasV0() => $_has(0); - @$pb.TagNumber(1) - void clearV0() => $_clearField(1); - @$pb.TagNumber(1) - V0 ensureV0() => $_ensure(0); -} - -enum V0_Kind { handshake, applicationdata, response, notSet } - -class V0 extends $pb.GeneratedMessage { - factory V0({ - $fixnum.Int64? seq, - Handshake? handshake, - ApplicationData? applicationdata, - Response? response, - }) { - final result = create(); - if (seq != null) result.seq = seq; - if (handshake != null) result.handshake = handshake; - if (applicationdata != null) result.applicationdata = applicationdata; - if (response != null) result.response = response; - return result; - } - - V0._(); - - factory V0.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory V0.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, V0_Kind> _V0_KindByTag = { - 2: V0_Kind.handshake, - 3: V0_Kind.applicationdata, - 4: V0_Kind.response, - 0: V0_Kind.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'V0', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [2, 3, 4]) - ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6, - defaultOrMaker: $fixnum.Int64.ZERO) - ..aOM(2, _omitFieldNames ? '' : 'handshake', - subBuilder: Handshake.create) - ..aOM(3, _omitFieldNames ? '' : 'applicationdata', - subBuilder: ApplicationData.create) - ..aOM(4, _omitFieldNames ? '' : 'response', - subBuilder: Response.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - V0 clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - V0 copyWith(void Function(V0) updates) => - super.copyWith((message) => updates(message as V0)) as V0; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static V0 create() => V0._(); - @$core.override - V0 createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static V0 getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static V0? _defaultInstance; - - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!; - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - void clearKind() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $fixnum.Int64 get seq => $_getI64(0); - @$pb.TagNumber(1) - set seq($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasSeq() => $_has(0); - @$pb.TagNumber(1) - void clearSeq() => $_clearField(1); - - @$pb.TagNumber(2) - Handshake get handshake => $_getN(1); - @$pb.TagNumber(2) - set handshake(Handshake value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasHandshake() => $_has(1); - @$pb.TagNumber(2) - void clearHandshake() => $_clearField(2); - @$pb.TagNumber(2) - Handshake ensureHandshake() => $_ensure(1); - - @$pb.TagNumber(3) - ApplicationData get applicationdata => $_getN(2); - @$pb.TagNumber(3) - set applicationdata(ApplicationData value) => $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasApplicationdata() => $_has(2); - @$pb.TagNumber(3) - void clearApplicationdata() => $_clearField(3); - @$pb.TagNumber(3) - ApplicationData ensureApplicationdata() => $_ensure(2); - - @$pb.TagNumber(4) - Response get response => $_getN(3); - @$pb.TagNumber(4) - set response(Response value) => $_setField(4, value); - @$pb.TagNumber(4) - $core.bool hasResponse() => $_has(3); - @$pb.TagNumber(4) - void clearResponse() => $_clearField(4); - @$pb.TagNumber(4) - Response ensureResponse() => $_ensure(3); -} - -class Handshake_RequestPOW extends $pb.GeneratedMessage { - factory Handshake_RequestPOW() => create(); - - Handshake_RequestPOW._(); - - factory Handshake_RequestPOW.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_RequestPOW.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.RequestPOW', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_RequestPOW clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_RequestPOW copyWith(void Function(Handshake_RequestPOW) updates) => - super.copyWith((message) => updates(message as Handshake_RequestPOW)) - as Handshake_RequestPOW; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_RequestPOW create() => Handshake_RequestPOW._(); - @$core.override - Handshake_RequestPOW createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_RequestPOW getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_RequestPOW? _defaultInstance; -} - -class Handshake_Register extends $pb.GeneratedMessage { - factory Handshake_Register({ - $core.String? username, - $core.String? inviteCode, - $core.List<$core.int>? publicIdentityKey, - $core.List<$core.int>? signedPrekey, - $core.List<$core.int>? signedPrekeySignature, - $fixnum.Int64? signedPrekeyId, - $fixnum.Int64? registrationId, - $core.bool? isIos, - $core.String? langCode, - $fixnum.Int64? proofOfWork, - $core.List<$core.int>? loginToken, - }) { - final result = create(); - if (username != null) result.username = username; - if (inviteCode != null) result.inviteCode = inviteCode; - if (publicIdentityKey != null) result.publicIdentityKey = publicIdentityKey; - if (signedPrekey != null) result.signedPrekey = signedPrekey; - if (signedPrekeySignature != null) - result.signedPrekeySignature = signedPrekeySignature; - if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId; - if (registrationId != null) result.registrationId = registrationId; - if (isIos != null) result.isIos = isIos; - if (langCode != null) result.langCode = langCode; - if (proofOfWork != null) result.proofOfWork = proofOfWork; - if (loginToken != null) result.loginToken = loginToken; - return result; - } - - Handshake_Register._(); - - factory Handshake_Register.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_Register.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.Register', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'username') - ..aOS(2, _omitFieldNames ? '' : 'inviteCode') - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'publicIdentityKey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) - ..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId') - ..aInt64(7, _omitFieldNames ? '' : 'registrationId') - ..aOB(8, _omitFieldNames ? '' : 'isIos') - ..aOS(9, _omitFieldNames ? '' : 'langCode') - ..aInt64(10, _omitFieldNames ? '' : 'proofOfWork') - ..a<$core.List<$core.int>>( - 11, _omitFieldNames ? '' : 'loginToken', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_Register clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_Register copyWith(void Function(Handshake_Register) updates) => - super.copyWith((message) => updates(message as Handshake_Register)) - as Handshake_Register; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_Register create() => Handshake_Register._(); - @$core.override - Handshake_Register createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_Register getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_Register? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get username => $_getSZ(0); - @$pb.TagNumber(1) - set username($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasUsername() => $_has(0); - @$pb.TagNumber(1) - void clearUsername() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get inviteCode => $_getSZ(1); - @$pb.TagNumber(2) - set inviteCode($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasInviteCode() => $_has(1); - @$pb.TagNumber(2) - void clearInviteCode() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get publicIdentityKey => $_getN(2); - @$pb.TagNumber(3) - set publicIdentityKey($core.List<$core.int> value) => $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasPublicIdentityKey() => $_has(2); - @$pb.TagNumber(3) - void clearPublicIdentityKey() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get signedPrekey => $_getN(3); - @$pb.TagNumber(4) - set signedPrekey($core.List<$core.int> value) => $_setBytes(3, value); - @$pb.TagNumber(4) - $core.bool hasSignedPrekey() => $_has(3); - @$pb.TagNumber(4) - void clearSignedPrekey() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get signedPrekeySignature => $_getN(4); - @$pb.TagNumber(5) - set signedPrekeySignature($core.List<$core.int> value) => - $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasSignedPrekeySignature() => $_has(4); - @$pb.TagNumber(5) - void clearSignedPrekeySignature() => $_clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get signedPrekeyId => $_getI64(5); - @$pb.TagNumber(6) - set signedPrekeyId($fixnum.Int64 value) => $_setInt64(5, value); - @$pb.TagNumber(6) - $core.bool hasSignedPrekeyId() => $_has(5); - @$pb.TagNumber(6) - void clearSignedPrekeyId() => $_clearField(6); - - @$pb.TagNumber(7) - $fixnum.Int64 get registrationId => $_getI64(6); - @$pb.TagNumber(7) - set registrationId($fixnum.Int64 value) => $_setInt64(6, value); - @$pb.TagNumber(7) - $core.bool hasRegistrationId() => $_has(6); - @$pb.TagNumber(7) - void clearRegistrationId() => $_clearField(7); - - @$pb.TagNumber(8) - $core.bool get isIos => $_getBF(7); - @$pb.TagNumber(8) - set isIos($core.bool value) => $_setBool(7, value); - @$pb.TagNumber(8) - $core.bool hasIsIos() => $_has(7); - @$pb.TagNumber(8) - void clearIsIos() => $_clearField(8); - - @$pb.TagNumber(9) - $core.String get langCode => $_getSZ(8); - @$pb.TagNumber(9) - set langCode($core.String value) => $_setString(8, value); - @$pb.TagNumber(9) - $core.bool hasLangCode() => $_has(8); - @$pb.TagNumber(9) - void clearLangCode() => $_clearField(9); - - @$pb.TagNumber(10) - $fixnum.Int64 get proofOfWork => $_getI64(9); - @$pb.TagNumber(10) - set proofOfWork($fixnum.Int64 value) => $_setInt64(9, value); - @$pb.TagNumber(10) - $core.bool hasProofOfWork() => $_has(9); - @$pb.TagNumber(10) - void clearProofOfWork() => $_clearField(10); - - @$pb.TagNumber(11) - $core.List<$core.int> get loginToken => $_getN(10); - @$pb.TagNumber(11) - set loginToken($core.List<$core.int> value) => $_setBytes(10, value); - @$pb.TagNumber(11) - $core.bool hasLoginToken() => $_has(10); - @$pb.TagNumber(11) - void clearLoginToken() => $_clearField(11); -} - -class Handshake_GetAuthChallenge extends $pb.GeneratedMessage { - factory Handshake_GetAuthChallenge() => create(); - - Handshake_GetAuthChallenge._(); - - factory Handshake_GetAuthChallenge.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_GetAuthChallenge.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.GetAuthChallenge', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetAuthChallenge clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetAuthChallenge copyWith( - void Function(Handshake_GetAuthChallenge) updates) => - super.copyWith( - (message) => updates(message as Handshake_GetAuthChallenge)) - as Handshake_GetAuthChallenge; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_GetAuthChallenge create() => Handshake_GetAuthChallenge._(); - @$core.override - Handshake_GetAuthChallenge createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_GetAuthChallenge getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_GetAuthChallenge? _defaultInstance; -} - -class Handshake_GetUserIdByUsername extends $pb.GeneratedMessage { - factory Handshake_GetUserIdByUsername({ - $core.String? username, - }) { - final result = create(); - if (username != null) result.username = username; - return result; - } - - Handshake_GetUserIdByUsername._(); - - factory Handshake_GetUserIdByUsername.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_GetUserIdByUsername.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.GetUserIdByUsername', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'username') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetUserIdByUsername clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetUserIdByUsername copyWith( - void Function(Handshake_GetUserIdByUsername) updates) => - super.copyWith( - (message) => updates(message as Handshake_GetUserIdByUsername)) - as Handshake_GetUserIdByUsername; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_GetUserIdByUsername create() => - Handshake_GetUserIdByUsername._(); - @$core.override - Handshake_GetUserIdByUsername createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_GetUserIdByUsername getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_GetUserIdByUsername? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get username => $_getSZ(0); - @$pb.TagNumber(1) - set username($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasUsername() => $_has(0); - @$pb.TagNumber(1) - void clearUsername() => $_clearField(1); -} - -class Handshake_GetAuthToken extends $pb.GeneratedMessage { - factory Handshake_GetAuthToken({ - $fixnum.Int64? userId, - $core.List<$core.int>? response, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (response != null) result.response = response; - return result; - } - - Handshake_GetAuthToken._(); - - factory Handshake_GetAuthToken.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_GetAuthToken.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.GetAuthToken', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'response', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetAuthToken clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetAuthToken copyWith( - void Function(Handshake_GetAuthToken) updates) => - super.copyWith((message) => updates(message as Handshake_GetAuthToken)) - as Handshake_GetAuthToken; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_GetAuthToken create() => Handshake_GetAuthToken._(); - @$core.override - Handshake_GetAuthToken createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_GetAuthToken getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_GetAuthToken? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get response => $_getN(1); - @$pb.TagNumber(2) - set response($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasResponse() => $_has(1); - @$pb.TagNumber(2) - void clearResponse() => $_clearField(2); -} - -class Handshake_Authenticate extends $pb.GeneratedMessage { - factory Handshake_Authenticate({ - $fixnum.Int64? userId, - $core.List<$core.int>? authToken, - $core.String? appVersion, - $fixnum.Int64? deviceId, - $core.bool? inBackground, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (authToken != null) result.authToken = authToken; - if (appVersion != null) result.appVersion = appVersion; - if (deviceId != null) result.deviceId = deviceId; - if (inBackground != null) result.inBackground = inBackground; - return result; - } - - Handshake_Authenticate._(); - - factory Handshake_Authenticate.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_Authenticate.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.Authenticate', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'authToken', $pb.PbFieldType.OY) - ..aOS(3, _omitFieldNames ? '' : 'appVersion') - ..aInt64(4, _omitFieldNames ? '' : 'deviceId') - ..aOB(5, _omitFieldNames ? '' : 'inBackground') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_Authenticate clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_Authenticate copyWith( - void Function(Handshake_Authenticate) updates) => - super.copyWith((message) => updates(message as Handshake_Authenticate)) - as Handshake_Authenticate; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_Authenticate create() => Handshake_Authenticate._(); - @$core.override - Handshake_Authenticate createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_Authenticate getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Handshake_Authenticate? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get authToken => $_getN(1); - @$pb.TagNumber(2) - set authToken($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasAuthToken() => $_has(1); - @$pb.TagNumber(2) - void clearAuthToken() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get appVersion => $_getSZ(2); - @$pb.TagNumber(3) - set appVersion($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasAppVersion() => $_has(2); - @$pb.TagNumber(3) - void clearAppVersion() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get deviceId => $_getI64(3); - @$pb.TagNumber(4) - set deviceId($fixnum.Int64 value) => $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasDeviceId() => $_has(3); - @$pb.TagNumber(4) - void clearDeviceId() => $_clearField(4); - - @$pb.TagNumber(5) - $core.bool get inBackground => $_getBF(4); - @$pb.TagNumber(5) - set inBackground($core.bool value) => $_setBool(4, value); - @$pb.TagNumber(5) - $core.bool hasInBackground() => $_has(4); - @$pb.TagNumber(5) - void clearInBackground() => $_clearField(5); -} - -class Handshake_AuthenticateWithLoginToken extends $pb.GeneratedMessage { - factory Handshake_AuthenticateWithLoginToken({ - $fixnum.Int64? userId, - $core.List<$core.int>? secretLoginToken, - $core.String? appVersion, - $fixnum.Int64? deviceId, - $core.bool? inBackground, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (secretLoginToken != null) result.secretLoginToken = secretLoginToken; - if (appVersion != null) result.appVersion = appVersion; - if (deviceId != null) result.deviceId = deviceId; - if (inBackground != null) result.inBackground = inBackground; - return result; - } - - Handshake_AuthenticateWithLoginToken._(); - - factory Handshake_AuthenticateWithLoginToken.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_AuthenticateWithLoginToken.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.AuthenticateWithLoginToken', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'secretLoginToken', $pb.PbFieldType.OY) - ..aOS(3, _omitFieldNames ? '' : 'appVersion') - ..aInt64(4, _omitFieldNames ? '' : 'deviceId') - ..aOB(5, _omitFieldNames ? '' : 'inBackground') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_AuthenticateWithLoginToken clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_AuthenticateWithLoginToken copyWith( - void Function(Handshake_AuthenticateWithLoginToken) updates) => - super.copyWith((message) => - updates(message as Handshake_AuthenticateWithLoginToken)) - as Handshake_AuthenticateWithLoginToken; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_AuthenticateWithLoginToken create() => - Handshake_AuthenticateWithLoginToken._(); - @$core.override - Handshake_AuthenticateWithLoginToken createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_AuthenticateWithLoginToken getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Handshake_AuthenticateWithLoginToken>(create); - static Handshake_AuthenticateWithLoginToken? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get secretLoginToken => $_getN(1); - @$pb.TagNumber(2) - set secretLoginToken($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasSecretLoginToken() => $_has(1); - @$pb.TagNumber(2) - void clearSecretLoginToken() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get appVersion => $_getSZ(2); - @$pb.TagNumber(3) - set appVersion($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasAppVersion() => $_has(2); - @$pb.TagNumber(3) - void clearAppVersion() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get deviceId => $_getI64(3); - @$pb.TagNumber(4) - set deviceId($fixnum.Int64 value) => $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasDeviceId() => $_has(3); - @$pb.TagNumber(4) - void clearDeviceId() => $_clearField(4); - - @$pb.TagNumber(5) - $core.bool get inBackground => $_getBF(4); - @$pb.TagNumber(5) - set inBackground($core.bool value) => $_setBool(4, value); - @$pb.TagNumber(5) - $core.bool hasInBackground() => $_has(4); - @$pb.TagNumber(5) - void clearInBackground() => $_clearField(5); -} - -class Handshake_GetServerKeyForPasswordLessRecovery - extends $pb.GeneratedMessage { - factory Handshake_GetServerKeyForPasswordLessRecovery({ - $fixnum.Int64? userId, - $core.List<$core.int>? serverKeyProtection, - $core.List<$core.int>? pinUnlockToken, - $core.List<$core.int>? pinProtectionKey, - $core.String? email, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (serverKeyProtection != null) - result.serverKeyProtection = serverKeyProtection; - if (pinUnlockToken != null) result.pinUnlockToken = pinUnlockToken; - if (pinProtectionKey != null) result.pinProtectionKey = pinProtectionKey; - if (email != null) result.email = email; - return result; - } - - Handshake_GetServerKeyForPasswordLessRecovery._(); - - factory Handshake_GetServerKeyForPasswordLessRecovery.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_GetServerKeyForPasswordLessRecovery.fromJson( - $core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.GetServerKeyForPasswordLessRecovery', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'serverKeyProtection', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'pinUnlockToken', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'pinProtectionKey', $pb.PbFieldType.OY) - ..aOS(5, _omitFieldNames ? '' : 'email') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetServerKeyForPasswordLessRecovery clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_GetServerKeyForPasswordLessRecovery copyWith( - void Function(Handshake_GetServerKeyForPasswordLessRecovery) - updates) => - super.copyWith((message) => - updates(message as Handshake_GetServerKeyForPasswordLessRecovery)) - as Handshake_GetServerKeyForPasswordLessRecovery; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_GetServerKeyForPasswordLessRecovery create() => - Handshake_GetServerKeyForPasswordLessRecovery._(); - @$core.override - Handshake_GetServerKeyForPasswordLessRecovery createEmptyInstance() => - create(); - @$core.pragma('dart2js:noInline') - static Handshake_GetServerKeyForPasswordLessRecovery getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Handshake_GetServerKeyForPasswordLessRecovery>(create); - static Handshake_GetServerKeyForPasswordLessRecovery? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get serverKeyProtection => $_getN(1); - @$pb.TagNumber(2) - set serverKeyProtection($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasServerKeyProtection() => $_has(1); - @$pb.TagNumber(2) - void clearServerKeyProtection() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get pinUnlockToken => $_getN(2); - @$pb.TagNumber(3) - set pinUnlockToken($core.List<$core.int> value) => $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasPinUnlockToken() => $_has(2); - @$pb.TagNumber(3) - void clearPinUnlockToken() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get pinProtectionKey => $_getN(3); - @$pb.TagNumber(4) - set pinProtectionKey($core.List<$core.int> value) => $_setBytes(3, value); - @$pb.TagNumber(4) - $core.bool hasPinProtectionKey() => $_has(3); - @$pb.TagNumber(4) - void clearPinProtectionKey() => $_clearField(4); - - @$pb.TagNumber(5) - $core.String get email => $_getSZ(4); - @$pb.TagNumber(5) - set email($core.String value) => $_setString(4, value); - @$pb.TagNumber(5) - $core.bool hasEmail() => $_has(4); - @$pb.TagNumber(5) - void clearEmail() => $_clearField(5); -} - -class Handshake_RegisterPasswordlessNotification extends $pb.GeneratedMessage { - factory Handshake_RegisterPasswordlessNotification({ - $core.String? notificationId, - $core.List<$core.int>? downloadAuthToken, - $core.String? langCode, - $core.String? googleFcm, - }) { - final result = create(); - if (notificationId != null) result.notificationId = notificationId; - if (downloadAuthToken != null) result.downloadAuthToken = downloadAuthToken; - if (langCode != null) result.langCode = langCode; - if (googleFcm != null) result.googleFcm = googleFcm; - return result; - } - - Handshake_RegisterPasswordlessNotification._(); - - factory Handshake_RegisterPasswordlessNotification.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_RegisterPasswordlessNotification.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.RegisterPasswordlessNotification', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'notificationId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'downloadAuthToken', $pb.PbFieldType.OY) - ..aOS(3, _omitFieldNames ? '' : 'langCode') - ..aOS(4, _omitFieldNames ? '' : 'googleFcm') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_RegisterPasswordlessNotification clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_RegisterPasswordlessNotification copyWith( - void Function(Handshake_RegisterPasswordlessNotification) updates) => - super.copyWith((message) => - updates(message as Handshake_RegisterPasswordlessNotification)) - as Handshake_RegisterPasswordlessNotification; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_RegisterPasswordlessNotification create() => - Handshake_RegisterPasswordlessNotification._(); - @$core.override - Handshake_RegisterPasswordlessNotification createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_RegisterPasswordlessNotification getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Handshake_RegisterPasswordlessNotification>(create); - static Handshake_RegisterPasswordlessNotification? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get notificationId => $_getSZ(0); - @$pb.TagNumber(1) - set notificationId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasNotificationId() => $_has(0); - @$pb.TagNumber(1) - void clearNotificationId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get downloadAuthToken => $_getN(1); - @$pb.TagNumber(2) - set downloadAuthToken($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasDownloadAuthToken() => $_has(1); - @$pb.TagNumber(2) - void clearDownloadAuthToken() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get langCode => $_getSZ(2); - @$pb.TagNumber(3) - set langCode($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasLangCode() => $_has(2); - @$pb.TagNumber(3) - void clearLangCode() => $_clearField(3); - - @$pb.TagNumber(4) - $core.String get googleFcm => $_getSZ(3); - @$pb.TagNumber(4) - set googleFcm($core.String value) => $_setString(3, value); - @$pb.TagNumber(4) - $core.bool hasGoogleFcm() => $_has(3); - @$pb.TagNumber(4) - void clearGoogleFcm() => $_clearField(4); -} - -class Handshake_CheckForPasswordlessNotification extends $pb.GeneratedMessage { - factory Handshake_CheckForPasswordlessNotification({ - $core.String? notificationId, - $core.List<$core.int>? downloadAuthToken, - $core.Iterable<$fixnum.Int64>? alreadyReceivedMessageIds, - }) { - final result = create(); - if (notificationId != null) result.notificationId = notificationId; - if (downloadAuthToken != null) result.downloadAuthToken = downloadAuthToken; - if (alreadyReceivedMessageIds != null) - result.alreadyReceivedMessageIds.addAll(alreadyReceivedMessageIds); - return result; - } - - Handshake_CheckForPasswordlessNotification._(); - - factory Handshake_CheckForPasswordlessNotification.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake_CheckForPasswordlessNotification.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake.CheckForPasswordlessNotification', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'notificationId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'downloadAuthToken', $pb.PbFieldType.OY) - ..p<$fixnum.Int64>(3, _omitFieldNames ? '' : 'alreadyReceivedMessageIds', - $pb.PbFieldType.K6) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_CheckForPasswordlessNotification clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake_CheckForPasswordlessNotification copyWith( - void Function(Handshake_CheckForPasswordlessNotification) updates) => - super.copyWith((message) => - updates(message as Handshake_CheckForPasswordlessNotification)) - as Handshake_CheckForPasswordlessNotification; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake_CheckForPasswordlessNotification create() => - Handshake_CheckForPasswordlessNotification._(); - @$core.override - Handshake_CheckForPasswordlessNotification createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake_CheckForPasswordlessNotification getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Handshake_CheckForPasswordlessNotification>(create); - static Handshake_CheckForPasswordlessNotification? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get notificationId => $_getSZ(0); - @$pb.TagNumber(1) - set notificationId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasNotificationId() => $_has(0); - @$pb.TagNumber(1) - void clearNotificationId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get downloadAuthToken => $_getN(1); - @$pb.TagNumber(2) - set downloadAuthToken($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasDownloadAuthToken() => $_has(1); - @$pb.TagNumber(2) - void clearDownloadAuthToken() => $_clearField(2); - - @$pb.TagNumber(3) - $pb.PbList<$fixnum.Int64> get alreadyReceivedMessageIds => $_getList(2); -} - -enum Handshake_Handshake { - register, - getAuthChallenge, - getAuthToken, - authenticate, - requestPOW, - authenticateWithLoginToken, - getUseridByUsername, - getServerKeyForPasswordlessRecovery, - registerPasswordlessNotification, - checkForPasswordlessNotification, - notSet -} - -class Handshake extends $pb.GeneratedMessage { - factory Handshake({ - Handshake_Register? register, - Handshake_GetAuthChallenge? getAuthChallenge, - Handshake_GetAuthToken? getAuthToken, - Handshake_Authenticate? authenticate, - Handshake_RequestPOW? requestPOW, - Handshake_AuthenticateWithLoginToken? authenticateWithLoginToken, - Handshake_GetUserIdByUsername? getUseridByUsername, - Handshake_GetServerKeyForPasswordLessRecovery? - getServerKeyForPasswordlessRecovery, - Handshake_RegisterPasswordlessNotification? - registerPasswordlessNotification, - Handshake_CheckForPasswordlessNotification? - checkForPasswordlessNotification, - }) { - final result = create(); - if (register != null) result.register = register; - if (getAuthChallenge != null) result.getAuthChallenge = getAuthChallenge; - if (getAuthToken != null) result.getAuthToken = getAuthToken; - if (authenticate != null) result.authenticate = authenticate; - if (requestPOW != null) result.requestPOW = requestPOW; - if (authenticateWithLoginToken != null) - result.authenticateWithLoginToken = authenticateWithLoginToken; - if (getUseridByUsername != null) - result.getUseridByUsername = getUseridByUsername; - if (getServerKeyForPasswordlessRecovery != null) - result.getServerKeyForPasswordlessRecovery = - getServerKeyForPasswordlessRecovery; - if (registerPasswordlessNotification != null) - result.registerPasswordlessNotification = - registerPasswordlessNotification; - if (checkForPasswordlessNotification != null) - result.checkForPasswordlessNotification = - checkForPasswordlessNotification; - return result; - } - - Handshake._(); - - factory Handshake.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Handshake.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, Handshake_Handshake> - _Handshake_HandshakeByTag = { - 1: Handshake_Handshake.register, - 2: Handshake_Handshake.getAuthChallenge, - 3: Handshake_Handshake.getAuthToken, - 4: Handshake_Handshake.authenticate, - 5: Handshake_Handshake.requestPOW, - 6: Handshake_Handshake.authenticateWithLoginToken, - 7: Handshake_Handshake.getUseridByUsername, - 8: Handshake_Handshake.getServerKeyForPasswordlessRecovery, - 9: Handshake_Handshake.registerPasswordlessNotification, - 10: Handshake_Handshake.checkForPasswordlessNotification, - 0: Handshake_Handshake.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Handshake', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - ..aOM(1, _omitFieldNames ? '' : 'register', - subBuilder: Handshake_Register.create) - ..aOM( - 2, _omitFieldNames ? '' : 'getAuthChallenge', - protoName: 'getAuthChallenge', - subBuilder: Handshake_GetAuthChallenge.create) - ..aOM(3, _omitFieldNames ? '' : 'getAuthToken', - protoName: 'getAuthToken', subBuilder: Handshake_GetAuthToken.create) - ..aOM(4, _omitFieldNames ? '' : 'authenticate', - subBuilder: Handshake_Authenticate.create) - ..aOM(5, _omitFieldNames ? '' : 'requestPOW', - protoName: 'requestPOW', subBuilder: Handshake_RequestPOW.create) - ..aOM( - 6, _omitFieldNames ? '' : 'authenticateWithLoginToken', - subBuilder: Handshake_AuthenticateWithLoginToken.create) - ..aOM( - 7, _omitFieldNames ? '' : 'getUseridByUsername', - subBuilder: Handshake_GetUserIdByUsername.create) - ..aOM( - 8, _omitFieldNames ? '' : 'getServerKeyForPasswordlessRecovery', - subBuilder: Handshake_GetServerKeyForPasswordLessRecovery.create) - ..aOM( - 9, _omitFieldNames ? '' : 'registerPasswordlessNotification', - subBuilder: Handshake_RegisterPasswordlessNotification.create) - ..aOM( - 10, _omitFieldNames ? '' : 'checkForPasswordlessNotification', - subBuilder: Handshake_CheckForPasswordlessNotification.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Handshake copyWith(void Function(Handshake) updates) => - super.copyWith((message) => updates(message as Handshake)) as Handshake; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Handshake create() => Handshake._(); - @$core.override - Handshake createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Handshake getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Handshake? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(5) - @$pb.TagNumber(6) - @$pb.TagNumber(7) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - Handshake_Handshake whichHandshake() => - _Handshake_HandshakeByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(5) - @$pb.TagNumber(6) - @$pb.TagNumber(7) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - void clearHandshake() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - Handshake_Register get register => $_getN(0); - @$pb.TagNumber(1) - set register(Handshake_Register value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasRegister() => $_has(0); - @$pb.TagNumber(1) - void clearRegister() => $_clearField(1); - @$pb.TagNumber(1) - Handshake_Register ensureRegister() => $_ensure(0); - - @$pb.TagNumber(2) - Handshake_GetAuthChallenge get getAuthChallenge => $_getN(1); - @$pb.TagNumber(2) - set getAuthChallenge(Handshake_GetAuthChallenge value) => - $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasGetAuthChallenge() => $_has(1); - @$pb.TagNumber(2) - void clearGetAuthChallenge() => $_clearField(2); - @$pb.TagNumber(2) - Handshake_GetAuthChallenge ensureGetAuthChallenge() => $_ensure(1); - - @$pb.TagNumber(3) - Handshake_GetAuthToken get getAuthToken => $_getN(2); - @$pb.TagNumber(3) - set getAuthToken(Handshake_GetAuthToken value) => $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasGetAuthToken() => $_has(2); - @$pb.TagNumber(3) - void clearGetAuthToken() => $_clearField(3); - @$pb.TagNumber(3) - Handshake_GetAuthToken ensureGetAuthToken() => $_ensure(2); - - @$pb.TagNumber(4) - Handshake_Authenticate get authenticate => $_getN(3); - @$pb.TagNumber(4) - set authenticate(Handshake_Authenticate value) => $_setField(4, value); - @$pb.TagNumber(4) - $core.bool hasAuthenticate() => $_has(3); - @$pb.TagNumber(4) - void clearAuthenticate() => $_clearField(4); - @$pb.TagNumber(4) - Handshake_Authenticate ensureAuthenticate() => $_ensure(3); - - @$pb.TagNumber(5) - Handshake_RequestPOW get requestPOW => $_getN(4); - @$pb.TagNumber(5) - set requestPOW(Handshake_RequestPOW value) => $_setField(5, value); - @$pb.TagNumber(5) - $core.bool hasRequestPOW() => $_has(4); - @$pb.TagNumber(5) - void clearRequestPOW() => $_clearField(5); - @$pb.TagNumber(5) - Handshake_RequestPOW ensureRequestPOW() => $_ensure(4); - - @$pb.TagNumber(6) - Handshake_AuthenticateWithLoginToken get authenticateWithLoginToken => - $_getN(5); - @$pb.TagNumber(6) - set authenticateWithLoginToken(Handshake_AuthenticateWithLoginToken value) => - $_setField(6, value); - @$pb.TagNumber(6) - $core.bool hasAuthenticateWithLoginToken() => $_has(5); - @$pb.TagNumber(6) - void clearAuthenticateWithLoginToken() => $_clearField(6); - @$pb.TagNumber(6) - Handshake_AuthenticateWithLoginToken ensureAuthenticateWithLoginToken() => - $_ensure(5); - - @$pb.TagNumber(7) - Handshake_GetUserIdByUsername get getUseridByUsername => $_getN(6); - @$pb.TagNumber(7) - set getUseridByUsername(Handshake_GetUserIdByUsername value) => - $_setField(7, value); - @$pb.TagNumber(7) - $core.bool hasGetUseridByUsername() => $_has(6); - @$pb.TagNumber(7) - void clearGetUseridByUsername() => $_clearField(7); - @$pb.TagNumber(7) - Handshake_GetUserIdByUsername ensureGetUseridByUsername() => $_ensure(6); - - @$pb.TagNumber(8) - Handshake_GetServerKeyForPasswordLessRecovery - get getServerKeyForPasswordlessRecovery => $_getN(7); - @$pb.TagNumber(8) - set getServerKeyForPasswordlessRecovery( - Handshake_GetServerKeyForPasswordLessRecovery value) => - $_setField(8, value); - @$pb.TagNumber(8) - $core.bool hasGetServerKeyForPasswordlessRecovery() => $_has(7); - @$pb.TagNumber(8) - void clearGetServerKeyForPasswordlessRecovery() => $_clearField(8); - @$pb.TagNumber(8) - Handshake_GetServerKeyForPasswordLessRecovery - ensureGetServerKeyForPasswordlessRecovery() => $_ensure(7); - - @$pb.TagNumber(9) - Handshake_RegisterPasswordlessNotification - get registerPasswordlessNotification => $_getN(8); - @$pb.TagNumber(9) - set registerPasswordlessNotification( - Handshake_RegisterPasswordlessNotification value) => - $_setField(9, value); - @$pb.TagNumber(9) - $core.bool hasRegisterPasswordlessNotification() => $_has(8); - @$pb.TagNumber(9) - void clearRegisterPasswordlessNotification() => $_clearField(9); - @$pb.TagNumber(9) - Handshake_RegisterPasswordlessNotification - ensureRegisterPasswordlessNotification() => $_ensure(8); - - @$pb.TagNumber(10) - Handshake_CheckForPasswordlessNotification - get checkForPasswordlessNotification => $_getN(9); - @$pb.TagNumber(10) - set checkForPasswordlessNotification( - Handshake_CheckForPasswordlessNotification value) => - $_setField(10, value); - @$pb.TagNumber(10) - $core.bool hasCheckForPasswordlessNotification() => $_has(9); - @$pb.TagNumber(10) - void clearCheckForPasswordlessNotification() => $_clearField(10); - @$pb.TagNumber(10) - Handshake_CheckForPasswordlessNotification - ensureCheckForPasswordlessNotification() => $_ensure(9); -} - -class ApplicationData_TextMessage extends $pb.GeneratedMessage { - factory ApplicationData_TextMessage({ - $fixnum.Int64? userId, - $core.List<$core.int>? body, - $core.List<$core.int>? pushData, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (body != null) result.body = body; - if (pushData != null) result.pushData = pushData; - return result; - } - - ApplicationData_TextMessage._(); - - factory ApplicationData_TextMessage.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_TextMessage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.TextMessage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'pushData', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_TextMessage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_TextMessage copyWith( - void Function(ApplicationData_TextMessage) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_TextMessage)) - as ApplicationData_TextMessage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_TextMessage create() => - ApplicationData_TextMessage._(); - @$core.override - ApplicationData_TextMessage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_TextMessage getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_TextMessage? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(3) - $core.List<$core.int> get body => $_getN(1); - @$pb.TagNumber(3) - set body($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(3) - $core.bool hasBody() => $_has(1); - @$pb.TagNumber(3) - void clearBody() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get pushData => $_getN(2); - @$pb.TagNumber(4) - set pushData($core.List<$core.int> value) => $_setBytes(2, value); - @$pb.TagNumber(4) - $core.bool hasPushData() => $_has(2); - @$pb.TagNumber(4) - void clearPushData() => $_clearField(4); -} - -class ApplicationData_GetUserByUsername extends $pb.GeneratedMessage { - factory ApplicationData_GetUserByUsername({ - $core.String? username, - }) { - final result = create(); - if (username != null) result.username = username; - return result; - } - - ApplicationData_GetUserByUsername._(); - - factory ApplicationData_GetUserByUsername.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetUserByUsername.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetUserByUsername', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'username') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetUserByUsername clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetUserByUsername copyWith( - void Function(ApplicationData_GetUserByUsername) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetUserByUsername)) - as ApplicationData_GetUserByUsername; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetUserByUsername create() => - ApplicationData_GetUserByUsername._(); - @$core.override - ApplicationData_GetUserByUsername createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetUserByUsername getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_GetUserByUsername? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get username => $_getSZ(0); - @$pb.TagNumber(1) - set username($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasUsername() => $_has(0); - @$pb.TagNumber(1) - void clearUsername() => $_clearField(1); -} - -class ApplicationData_ChangeUsername extends $pb.GeneratedMessage { - factory ApplicationData_ChangeUsername({ - $core.String? username, - }) { - final result = create(); - if (username != null) result.username = username; - return result; - } - - ApplicationData_ChangeUsername._(); - - factory ApplicationData_ChangeUsername.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_ChangeUsername.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.ChangeUsername', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'username') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ChangeUsername clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ChangeUsername copyWith( - void Function(ApplicationData_ChangeUsername) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_ChangeUsername)) - as ApplicationData_ChangeUsername; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_ChangeUsername create() => - ApplicationData_ChangeUsername._(); - @$core.override - ApplicationData_ChangeUsername createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_ChangeUsername getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_ChangeUsername? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get username => $_getSZ(0); - @$pb.TagNumber(1) - set username($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasUsername() => $_has(0); - @$pb.TagNumber(1) - void clearUsername() => $_clearField(1); -} - -class ApplicationData_UpdateGoogleFcmToken extends $pb.GeneratedMessage { - factory ApplicationData_UpdateGoogleFcmToken({ - $core.String? googleFcm, - }) { - final result = create(); - if (googleFcm != null) result.googleFcm = googleFcm; - return result; - } - - ApplicationData_UpdateGoogleFcmToken._(); - - factory ApplicationData_UpdateGoogleFcmToken.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_UpdateGoogleFcmToken.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.UpdateGoogleFcmToken', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'googleFcm') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UpdateGoogleFcmToken clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UpdateGoogleFcmToken copyWith( - void Function(ApplicationData_UpdateGoogleFcmToken) updates) => - super.copyWith((message) => - updates(message as ApplicationData_UpdateGoogleFcmToken)) - as ApplicationData_UpdateGoogleFcmToken; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_UpdateGoogleFcmToken create() => - ApplicationData_UpdateGoogleFcmToken._(); - @$core.override - ApplicationData_UpdateGoogleFcmToken createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_UpdateGoogleFcmToken getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_UpdateGoogleFcmToken>(create); - static ApplicationData_UpdateGoogleFcmToken? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get googleFcm => $_getSZ(0); - @$pb.TagNumber(1) - set googleFcm($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasGoogleFcm() => $_has(0); - @$pb.TagNumber(1) - void clearGoogleFcm() => $_clearField(1); -} - -class ApplicationData_GetUserById extends $pb.GeneratedMessage { - factory ApplicationData_GetUserById({ - $fixnum.Int64? userId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - return result; - } - - ApplicationData_GetUserById._(); - - factory ApplicationData_GetUserById.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetUserById.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetUserById', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetUserById clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetUserById copyWith( - void Function(ApplicationData_GetUserById) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetUserById)) - as ApplicationData_GetUserById; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetUserById create() => - ApplicationData_GetUserById._(); - @$core.override - ApplicationData_GetUserById createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetUserById getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_GetUserById? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); -} - -class ApplicationData_GetAvailablePlans extends $pb.GeneratedMessage { - factory ApplicationData_GetAvailablePlans() => create(); - - ApplicationData_GetAvailablePlans._(); - - factory ApplicationData_GetAvailablePlans.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetAvailablePlans.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetAvailablePlans', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetAvailablePlans clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetAvailablePlans copyWith( - void Function(ApplicationData_GetAvailablePlans) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetAvailablePlans)) - as ApplicationData_GetAvailablePlans; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetAvailablePlans create() => - ApplicationData_GetAvailablePlans._(); - @$core.override - ApplicationData_GetAvailablePlans createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetAvailablePlans getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_GetAvailablePlans? _defaultInstance; -} - -class ApplicationData_GetCurrentPlanInfos extends $pb.GeneratedMessage { - factory ApplicationData_GetCurrentPlanInfos() => create(); - - ApplicationData_GetCurrentPlanInfos._(); - - factory ApplicationData_GetCurrentPlanInfos.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetCurrentPlanInfos.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetCurrentPlanInfos', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetCurrentPlanInfos clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetCurrentPlanInfos copyWith( - void Function(ApplicationData_GetCurrentPlanInfos) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetCurrentPlanInfos)) - as ApplicationData_GetCurrentPlanInfos; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetCurrentPlanInfos create() => - ApplicationData_GetCurrentPlanInfos._(); - @$core.override - ApplicationData_GetCurrentPlanInfos createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetCurrentPlanInfos getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_GetCurrentPlanInfos>(create); - static ApplicationData_GetCurrentPlanInfos? _defaultInstance; -} - -class ApplicationData_RemoveAdditionalUser extends $pb.GeneratedMessage { - factory ApplicationData_RemoveAdditionalUser({ - $fixnum.Int64? userId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - return result; - } - - ApplicationData_RemoveAdditionalUser._(); - - factory ApplicationData_RemoveAdditionalUser.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_RemoveAdditionalUser.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.RemoveAdditionalUser', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RemoveAdditionalUser clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RemoveAdditionalUser copyWith( - void Function(ApplicationData_RemoveAdditionalUser) updates) => - super.copyWith((message) => - updates(message as ApplicationData_RemoveAdditionalUser)) - as ApplicationData_RemoveAdditionalUser; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_RemoveAdditionalUser create() => - ApplicationData_RemoveAdditionalUser._(); - @$core.override - ApplicationData_RemoveAdditionalUser createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_RemoveAdditionalUser getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_RemoveAdditionalUser>(create); - static ApplicationData_RemoveAdditionalUser? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); -} - -class ApplicationData_GetPrekeysByUserId extends $pb.GeneratedMessage { - factory ApplicationData_GetPrekeysByUserId({ - $fixnum.Int64? userId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - return result; - } - - ApplicationData_GetPrekeysByUserId._(); - - factory ApplicationData_GetPrekeysByUserId.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetPrekeysByUserId.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetPrekeysByUserId', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetPrekeysByUserId clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetPrekeysByUserId copyWith( - void Function(ApplicationData_GetPrekeysByUserId) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetPrekeysByUserId)) - as ApplicationData_GetPrekeysByUserId; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetPrekeysByUserId create() => - ApplicationData_GetPrekeysByUserId._(); - @$core.override - ApplicationData_GetPrekeysByUserId createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetPrekeysByUserId getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_GetPrekeysByUserId? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); -} - -class ApplicationData_GetSignedPreKeyByUserId extends $pb.GeneratedMessage { - factory ApplicationData_GetSignedPreKeyByUserId({ - $fixnum.Int64? userId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - return result; - } - - ApplicationData_GetSignedPreKeyByUserId._(); - - factory ApplicationData_GetSignedPreKeyByUserId.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetSignedPreKeyByUserId.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetSignedPreKeyByUserId', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetSignedPreKeyByUserId clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetSignedPreKeyByUserId copyWith( - void Function(ApplicationData_GetSignedPreKeyByUserId) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetSignedPreKeyByUserId)) - as ApplicationData_GetSignedPreKeyByUserId; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetSignedPreKeyByUserId create() => - ApplicationData_GetSignedPreKeyByUserId._(); - @$core.override - ApplicationData_GetSignedPreKeyByUserId createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetSignedPreKeyByUserId getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_GetSignedPreKeyByUserId>(create); - static ApplicationData_GetSignedPreKeyByUserId? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); -} - -class ApplicationData_UpdateSignedPreKey extends $pb.GeneratedMessage { - factory ApplicationData_UpdateSignedPreKey({ - $fixnum.Int64? signedPrekeyId, - $core.List<$core.int>? signedPrekey, - $core.List<$core.int>? signedPrekeySignature, - }) { - final result = create(); - if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId; - if (signedPrekey != null) result.signedPrekey = signedPrekey; - if (signedPrekeySignature != null) - result.signedPrekeySignature = signedPrekeySignature; - return result; - } - - ApplicationData_UpdateSignedPreKey._(); - - factory ApplicationData_UpdateSignedPreKey.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_UpdateSignedPreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.UpdateSignedPreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'signedPrekeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UpdateSignedPreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UpdateSignedPreKey copyWith( - void Function(ApplicationData_UpdateSignedPreKey) updates) => - super.copyWith((message) => - updates(message as ApplicationData_UpdateSignedPreKey)) - as ApplicationData_UpdateSignedPreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_UpdateSignedPreKey create() => - ApplicationData_UpdateSignedPreKey._(); - @$core.override - ApplicationData_UpdateSignedPreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_UpdateSignedPreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_UpdateSignedPreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get signedPrekeyId => $_getI64(0); - @$pb.TagNumber(1) - set signedPrekeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasSignedPrekeyId() => $_has(0); - @$pb.TagNumber(1) - void clearSignedPrekeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get signedPrekey => $_getN(1); - @$pb.TagNumber(2) - set signedPrekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasSignedPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearSignedPrekey() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get signedPrekeySignature => $_getN(2); - @$pb.TagNumber(3) - set signedPrekeySignature($core.List<$core.int> value) => - $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasSignedPrekeySignature() => $_has(2); - @$pb.TagNumber(3) - void clearSignedPrekeySignature() => $_clearField(3); -} - -class ApplicationData_PqcPreKey extends $pb.GeneratedMessage { - factory ApplicationData_PqcPreKey({ - $fixnum.Int64? eccPreKeyId, - $core.List<$core.int>? eccPreKey, - $fixnum.Int64? kyberPreKeyId, - $core.List<$core.int>? kyberPreKey, - $core.List<$core.int>? kyberPreKeySignature, - }) { - final result = create(); - if (eccPreKeyId != null) result.eccPreKeyId = eccPreKeyId; - if (eccPreKey != null) result.eccPreKey = eccPreKey; - if (kyberPreKeyId != null) result.kyberPreKeyId = kyberPreKeyId; - if (kyberPreKey != null) result.kyberPreKey = kyberPreKey; - if (kyberPreKeySignature != null) - result.kyberPreKeySignature = kyberPreKeySignature; - return result; - } - - ApplicationData_PqcPreKey._(); - - factory ApplicationData_PqcPreKey.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_PqcPreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.PqcPreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'eccPreKeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'eccPreKey', $pb.PbFieldType.OY) - ..aInt64(3, _omitFieldNames ? '' : 'kyberPreKeyId') - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'kyberPreKey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'kyberPreKeySignature', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_PqcPreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_PqcPreKey copyWith( - void Function(ApplicationData_PqcPreKey) updates) => - super.copyWith((message) => updates(message as ApplicationData_PqcPreKey)) - as ApplicationData_PqcPreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_PqcPreKey create() => ApplicationData_PqcPreKey._(); - @$core.override - ApplicationData_PqcPreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_PqcPreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_PqcPreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get eccPreKeyId => $_getI64(0); - @$pb.TagNumber(1) - set eccPreKeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasEccPreKeyId() => $_has(0); - @$pb.TagNumber(1) - void clearEccPreKeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get eccPreKey => $_getN(1); - @$pb.TagNumber(2) - set eccPreKey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEccPreKey() => $_has(1); - @$pb.TagNumber(2) - void clearEccPreKey() => $_clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get kyberPreKeyId => $_getI64(2); - @$pb.TagNumber(3) - set kyberPreKeyId($fixnum.Int64 value) => $_setInt64(2, value); - @$pb.TagNumber(3) - $core.bool hasKyberPreKeyId() => $_has(2); - @$pb.TagNumber(3) - void clearKyberPreKeyId() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get kyberPreKey => $_getN(3); - @$pb.TagNumber(4) - set kyberPreKey($core.List<$core.int> value) => $_setBytes(3, value); - @$pb.TagNumber(4) - $core.bool hasKyberPreKey() => $_has(3); - @$pb.TagNumber(4) - void clearKyberPreKey() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get kyberPreKeySignature => $_getN(4); - @$pb.TagNumber(5) - set kyberPreKeySignature($core.List<$core.int> value) => $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasKyberPreKeySignature() => $_has(4); - @$pb.TagNumber(5) - void clearKyberPreKeySignature() => $_clearField(5); -} - -class ApplicationData_UploadPqcPreKeys extends $pb.GeneratedMessage { - factory ApplicationData_UploadPqcPreKeys({ - $fixnum.Int64? eccSignedPrekeyId, - $core.List<$core.int>? eccSignedPrekey, - $core.List<$core.int>? eccSignedPrekeySignature, - $fixnum.Int64? kyberSignedPrekeyId, - $core.List<$core.int>? kyberSignedPrekey, - $core.List<$core.int>? kyberSignedPrekeySignature, - $core.Iterable? prekeys, - }) { - final result = create(); - if (eccSignedPrekeyId != null) result.eccSignedPrekeyId = eccSignedPrekeyId; - if (eccSignedPrekey != null) result.eccSignedPrekey = eccSignedPrekey; - if (eccSignedPrekeySignature != null) - result.eccSignedPrekeySignature = eccSignedPrekeySignature; - if (kyberSignedPrekeyId != null) - result.kyberSignedPrekeyId = kyberSignedPrekeyId; - if (kyberSignedPrekey != null) result.kyberSignedPrekey = kyberSignedPrekey; - if (kyberSignedPrekeySignature != null) - result.kyberSignedPrekeySignature = kyberSignedPrekeySignature; - if (prekeys != null) result.prekeys.addAll(prekeys); - return result; - } - - ApplicationData_UploadPqcPreKeys._(); - - factory ApplicationData_UploadPqcPreKeys.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_UploadPqcPreKeys.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.UploadPqcPreKeys', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'eccSignedPrekeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'eccSignedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(3, - _omitFieldNames ? '' : 'eccSignedPrekeySignature', $pb.PbFieldType.OY) - ..aInt64(4, _omitFieldNames ? '' : 'kyberSignedPrekeyId') - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'kyberSignedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(6, - _omitFieldNames ? '' : 'kyberSignedPrekeySignature', $pb.PbFieldType.OY) - ..pPM(7, _omitFieldNames ? '' : 'prekeys', - subBuilder: ApplicationData_PqcPreKey.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UploadPqcPreKeys clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_UploadPqcPreKeys copyWith( - void Function(ApplicationData_UploadPqcPreKeys) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_UploadPqcPreKeys)) - as ApplicationData_UploadPqcPreKeys; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_UploadPqcPreKeys create() => - ApplicationData_UploadPqcPreKeys._(); - @$core.override - ApplicationData_UploadPqcPreKeys createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_UploadPqcPreKeys getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_UploadPqcPreKeys? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get eccSignedPrekeyId => $_getI64(0); - @$pb.TagNumber(1) - set eccSignedPrekeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasEccSignedPrekeyId() => $_has(0); - @$pb.TagNumber(1) - void clearEccSignedPrekeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get eccSignedPrekey => $_getN(1); - @$pb.TagNumber(2) - set eccSignedPrekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEccSignedPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearEccSignedPrekey() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get eccSignedPrekeySignature => $_getN(2); - @$pb.TagNumber(3) - set eccSignedPrekeySignature($core.List<$core.int> value) => - $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasEccSignedPrekeySignature() => $_has(2); - @$pb.TagNumber(3) - void clearEccSignedPrekeySignature() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get kyberSignedPrekeyId => $_getI64(3); - @$pb.TagNumber(4) - set kyberSignedPrekeyId($fixnum.Int64 value) => $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasKyberSignedPrekeyId() => $_has(3); - @$pb.TagNumber(4) - void clearKyberSignedPrekeyId() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get kyberSignedPrekey => $_getN(4); - @$pb.TagNumber(5) - set kyberSignedPrekey($core.List<$core.int> value) => $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasKyberSignedPrekey() => $_has(4); - @$pb.TagNumber(5) - void clearKyberSignedPrekey() => $_clearField(5); - - @$pb.TagNumber(6) - $core.List<$core.int> get kyberSignedPrekeySignature => $_getN(5); - @$pb.TagNumber(6) - set kyberSignedPrekeySignature($core.List<$core.int> value) => - $_setBytes(5, value); - @$pb.TagNumber(6) - $core.bool hasKyberSignedPrekeySignature() => $_has(5); - @$pb.TagNumber(6) - void clearKyberSignedPrekeySignature() => $_clearField(6); - - @$pb.TagNumber(7) - $pb.PbList get prekeys => $_getList(6); -} - -class ApplicationData_DownloadDone extends $pb.GeneratedMessage { - factory ApplicationData_DownloadDone({ - $core.List<$core.int>? downloadToken, - }) { - final result = create(); - if (downloadToken != null) result.downloadToken = downloadToken; - return result; - } - - ApplicationData_DownloadDone._(); - - factory ApplicationData_DownloadDone.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_DownloadDone.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.DownloadDone', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'downloadToken', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DownloadDone clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DownloadDone copyWith( - void Function(ApplicationData_DownloadDone) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_DownloadDone)) - as ApplicationData_DownloadDone; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_DownloadDone create() => - ApplicationData_DownloadDone._(); - @$core.override - ApplicationData_DownloadDone createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_DownloadDone getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_DownloadDone? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get downloadToken => $_getN(0); - @$pb.TagNumber(1) - set downloadToken($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasDownloadToken() => $_has(0); - @$pb.TagNumber(1) - void clearDownloadToken() => $_clearField(1); -} - -class ApplicationData_ReportUser extends $pb.GeneratedMessage { - factory ApplicationData_ReportUser({ - $fixnum.Int64? reportedUserId, - $core.String? reason, - }) { - final result = create(); - if (reportedUserId != null) result.reportedUserId = reportedUserId; - if (reason != null) result.reason = reason; - return result; - } - - ApplicationData_ReportUser._(); - - factory ApplicationData_ReportUser.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_ReportUser.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.ReportUser', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'reportedUserId') - ..aOS(2, _omitFieldNames ? '' : 'reason') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ReportUser clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ReportUser copyWith( - void Function(ApplicationData_ReportUser) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_ReportUser)) - as ApplicationData_ReportUser; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_ReportUser create() => ApplicationData_ReportUser._(); - @$core.override - ApplicationData_ReportUser createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_ReportUser getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_ReportUser? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get reportedUserId => $_getI64(0); - @$pb.TagNumber(1) - set reportedUserId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasReportedUserId() => $_has(0); - @$pb.TagNumber(1) - void clearReportedUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get reason => $_getSZ(1); - @$pb.TagNumber(2) - set reason($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasReason() => $_has(1); - @$pb.TagNumber(2) - void clearReason() => $_clearField(2); -} - -class ApplicationData_IPAPurchase extends $pb.GeneratedMessage { - factory ApplicationData_IPAPurchase({ - $core.String? productId, - $core.String? source, - $core.String? verificationData, - }) { - final result = create(); - if (productId != null) result.productId = productId; - if (source != null) result.source = source; - if (verificationData != null) result.verificationData = verificationData; - return result; - } - - ApplicationData_IPAPurchase._(); - - factory ApplicationData_IPAPurchase.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_IPAPurchase.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.IPAPurchase', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'productId') - ..aOS(2, _omitFieldNames ? '' : 'source') - ..aOS(3, _omitFieldNames ? '' : 'verificationData') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IPAPurchase clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IPAPurchase copyWith( - void Function(ApplicationData_IPAPurchase) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_IPAPurchase)) - as ApplicationData_IPAPurchase; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_IPAPurchase create() => - ApplicationData_IPAPurchase._(); - @$core.override - ApplicationData_IPAPurchase createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_IPAPurchase getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_IPAPurchase? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get productId => $_getSZ(0); - @$pb.TagNumber(1) - set productId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasProductId() => $_has(0); - @$pb.TagNumber(1) - void clearProductId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get source => $_getSZ(1); - @$pb.TagNumber(2) - set source($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasSource() => $_has(1); - @$pb.TagNumber(2) - void clearSource() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get verificationData => $_getSZ(2); - @$pb.TagNumber(3) - set verificationData($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasVerificationData() => $_has(2); - @$pb.TagNumber(3) - void clearVerificationData() => $_clearField(3); -} - -class ApplicationData_IPAForceCheck extends $pb.GeneratedMessage { - factory ApplicationData_IPAForceCheck() => create(); - - ApplicationData_IPAForceCheck._(); - - factory ApplicationData_IPAForceCheck.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_IPAForceCheck.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.IPAForceCheck', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IPAForceCheck clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IPAForceCheck copyWith( - void Function(ApplicationData_IPAForceCheck) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_IPAForceCheck)) - as ApplicationData_IPAForceCheck; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_IPAForceCheck create() => - ApplicationData_IPAForceCheck._(); - @$core.override - ApplicationData_IPAForceCheck createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_IPAForceCheck getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_IPAForceCheck? _defaultInstance; -} - -class ApplicationData_DeleteAccount extends $pb.GeneratedMessage { - factory ApplicationData_DeleteAccount() => create(); - - ApplicationData_DeleteAccount._(); - - factory ApplicationData_DeleteAccount.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_DeleteAccount.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.DeleteAccount', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DeleteAccount clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DeleteAccount copyWith( - void Function(ApplicationData_DeleteAccount) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_DeleteAccount)) - as ApplicationData_DeleteAccount; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_DeleteAccount create() => - ApplicationData_DeleteAccount._(); - @$core.override - ApplicationData_DeleteAccount createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_DeleteAccount getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_DeleteAccount? _defaultInstance; -} - -class ApplicationData_AddAdditionalUser extends $pb.GeneratedMessage { - factory ApplicationData_AddAdditionalUser({ - $fixnum.Int64? userId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - return result; - } - - ApplicationData_AddAdditionalUser._(); - - factory ApplicationData_AddAdditionalUser.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_AddAdditionalUser.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.AddAdditionalUser', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_AddAdditionalUser clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_AddAdditionalUser copyWith( - void Function(ApplicationData_AddAdditionalUser) updates) => - super.copyWith((message) => - updates(message as ApplicationData_AddAdditionalUser)) - as ApplicationData_AddAdditionalUser; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_AddAdditionalUser create() => - ApplicationData_AddAdditionalUser._(); - @$core.override - ApplicationData_AddAdditionalUser createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_AddAdditionalUser getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_AddAdditionalUser? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); -} - -class ApplicationData_SetLoginToken extends $pb.GeneratedMessage { - factory ApplicationData_SetLoginToken({ - $core.List<$core.int>? loginToken, - }) { - final result = create(); - if (loginToken != null) result.loginToken = loginToken; - return result; - } - - ApplicationData_SetLoginToken._(); - - factory ApplicationData_SetLoginToken.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_SetLoginToken.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.SetLoginToken', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'loginToken', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_SetLoginToken clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_SetLoginToken copyWith( - void Function(ApplicationData_SetLoginToken) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_SetLoginToken)) - as ApplicationData_SetLoginToken; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_SetLoginToken create() => - ApplicationData_SetLoginToken._(); - @$core.override - ApplicationData_SetLoginToken createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_SetLoginToken getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_SetLoginToken? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get loginToken => $_getN(0); - @$pb.TagNumber(1) - set loginToken($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasLoginToken() => $_has(0); - @$pb.TagNumber(1) - void clearLoginToken() => $_clearField(1); -} - -class ApplicationData_RegisterPasswordLessRecovery - extends $pb.GeneratedMessage { - factory ApplicationData_RegisterPasswordLessRecovery({ - $core.List<$core.int>? encryptedServerKey, - $core.List<$core.int>? pinUnlockToken, - }) { - final result = create(); - if (encryptedServerKey != null) - result.encryptedServerKey = encryptedServerKey; - if (pinUnlockToken != null) result.pinUnlockToken = pinUnlockToken; - return result; - } - - ApplicationData_RegisterPasswordLessRecovery._(); - - factory ApplicationData_RegisterPasswordLessRecovery.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_RegisterPasswordLessRecovery.fromJson( - $core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.RegisterPasswordLessRecovery', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'encryptedServerKey', $pb.PbFieldType.OY, - protoName: 'encryptedServerKey') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'pinUnlockToken', $pb.PbFieldType.OY, - protoName: 'pinUnlockToken') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RegisterPasswordLessRecovery clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RegisterPasswordLessRecovery copyWith( - void Function(ApplicationData_RegisterPasswordLessRecovery) - updates) => - super.copyWith((message) => - updates(message as ApplicationData_RegisterPasswordLessRecovery)) - as ApplicationData_RegisterPasswordLessRecovery; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_RegisterPasswordLessRecovery create() => - ApplicationData_RegisterPasswordLessRecovery._(); - @$core.override - ApplicationData_RegisterPasswordLessRecovery createEmptyInstance() => - create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_RegisterPasswordLessRecovery getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_RegisterPasswordLessRecovery>(create); - static ApplicationData_RegisterPasswordLessRecovery? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get encryptedServerKey => $_getN(0); - @$pb.TagNumber(1) - set encryptedServerKey($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasEncryptedServerKey() => $_has(0); - @$pb.TagNumber(1) - void clearEncryptedServerKey() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get pinUnlockToken => $_getN(1); - @$pb.TagNumber(2) - set pinUnlockToken($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasPinUnlockToken() => $_has(1); - @$pb.TagNumber(2) - void clearPinUnlockToken() => $_clearField(2); -} - -class ApplicationData_PasswordlessNotification extends $pb.GeneratedMessage { - factory ApplicationData_PasswordlessNotification({ - $core.String? notificationId, - $core.List<$core.int>? encryptedMessage, - }) { - final result = create(); - if (notificationId != null) result.notificationId = notificationId; - if (encryptedMessage != null) result.encryptedMessage = encryptedMessage; - return result; - } - - ApplicationData_PasswordlessNotification._(); - - factory ApplicationData_PasswordlessNotification.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_PasswordlessNotification.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.PasswordlessNotification', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'notificationId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'encryptedMessage', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_PasswordlessNotification clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_PasswordlessNotification copyWith( - void Function(ApplicationData_PasswordlessNotification) updates) => - super.copyWith((message) => - updates(message as ApplicationData_PasswordlessNotification)) - as ApplicationData_PasswordlessNotification; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_PasswordlessNotification create() => - ApplicationData_PasswordlessNotification._(); - @$core.override - ApplicationData_PasswordlessNotification createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_PasswordlessNotification getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_PasswordlessNotification>(create); - static ApplicationData_PasswordlessNotification? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get notificationId => $_getSZ(0); - @$pb.TagNumber(1) - set notificationId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasNotificationId() => $_has(0); - @$pb.TagNumber(1) - void clearNotificationId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get encryptedMessage => $_getN(1); - @$pb.TagNumber(2) - set encryptedMessage($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEncryptedMessage() => $_has(1); - @$pb.TagNumber(2) - void clearEncryptedMessage() => $_clearField(2); -} - -class ApplicationData_RequestMemoriesUpload extends $pb.GeneratedMessage { - factory ApplicationData_RequestMemoriesUpload({ - $fixnum.Int64? size, - $fixnum.Int64? originalDate, - $core.String? mediaId, - }) { - final result = create(); - if (size != null) result.size = size; - if (originalDate != null) result.originalDate = originalDate; - if (mediaId != null) result.mediaId = mediaId; - return result; - } - - ApplicationData_RequestMemoriesUpload._(); - - factory ApplicationData_RequestMemoriesUpload.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_RequestMemoriesUpload.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.RequestMemoriesUpload', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'size') - ..aInt64(2, _omitFieldNames ? '' : 'originalDate') - ..aOS(3, _omitFieldNames ? '' : 'mediaId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RequestMemoriesUpload clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_RequestMemoriesUpload copyWith( - void Function(ApplicationData_RequestMemoriesUpload) updates) => - super.copyWith((message) => - updates(message as ApplicationData_RequestMemoriesUpload)) - as ApplicationData_RequestMemoriesUpload; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_RequestMemoriesUpload create() => - ApplicationData_RequestMemoriesUpload._(); - @$core.override - ApplicationData_RequestMemoriesUpload createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_RequestMemoriesUpload getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_RequestMemoriesUpload>(create); - static ApplicationData_RequestMemoriesUpload? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get size => $_getI64(0); - @$pb.TagNumber(1) - set size($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasSize() => $_has(0); - @$pb.TagNumber(1) - void clearSize() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get originalDate => $_getI64(1); - @$pb.TagNumber(2) - set originalDate($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasOriginalDate() => $_has(1); - @$pb.TagNumber(2) - void clearOriginalDate() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get mediaId => $_getSZ(2); - @$pb.TagNumber(3) - set mediaId($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasMediaId() => $_has(2); - @$pb.TagNumber(3) - void clearMediaId() => $_clearField(3); -} - -class ApplicationData_ConfirmMemoriesUpload extends $pb.GeneratedMessage { - factory ApplicationData_ConfirmMemoriesUpload({ - $core.String? mediaId, - }) { - final result = create(); - if (mediaId != null) result.mediaId = mediaId; - return result; - } - - ApplicationData_ConfirmMemoriesUpload._(); - - factory ApplicationData_ConfirmMemoriesUpload.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_ConfirmMemoriesUpload.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.ConfirmMemoriesUpload', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'mediaId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ConfirmMemoriesUpload clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_ConfirmMemoriesUpload copyWith( - void Function(ApplicationData_ConfirmMemoriesUpload) updates) => - super.copyWith((message) => - updates(message as ApplicationData_ConfirmMemoriesUpload)) - as ApplicationData_ConfirmMemoriesUpload; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_ConfirmMemoriesUpload create() => - ApplicationData_ConfirmMemoriesUpload._(); - @$core.override - ApplicationData_ConfirmMemoriesUpload createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_ConfirmMemoriesUpload getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_ConfirmMemoriesUpload>(create); - static ApplicationData_ConfirmMemoriesUpload? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get mediaId => $_getSZ(0); - @$pb.TagNumber(1) - set mediaId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMediaId() => $_has(0); - @$pb.TagNumber(1) - void clearMediaId() => $_clearField(1); -} - -class ApplicationData_GetMemoriesList extends $pb.GeneratedMessage { - factory ApplicationData_GetMemoriesList({ - $fixnum.Int64? offsetDate, - $fixnum.Int64? limit, - }) { - final result = create(); - if (offsetDate != null) result.offsetDate = offsetDate; - if (limit != null) result.limit = limit; - return result; - } - - ApplicationData_GetMemoriesList._(); - - factory ApplicationData_GetMemoriesList.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetMemoriesList.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetMemoriesList', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'offsetDate') - ..aInt64(2, _omitFieldNames ? '' : 'limit') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesList clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesList copyWith( - void Function(ApplicationData_GetMemoriesList) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetMemoriesList)) - as ApplicationData_GetMemoriesList; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesList create() => - ApplicationData_GetMemoriesList._(); - @$core.override - ApplicationData_GetMemoriesList createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesList getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_GetMemoriesList? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get offsetDate => $_getI64(0); - @$pb.TagNumber(1) - set offsetDate($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasOffsetDate() => $_has(0); - @$pb.TagNumber(1) - void clearOffsetDate() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get limit => $_getI64(1); - @$pb.TagNumber(2) - set limit($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasLimit() => $_has(1); - @$pb.TagNumber(2) - void clearLimit() => $_clearField(2); -} - -class ApplicationData_GetMemoriesUrl extends $pb.GeneratedMessage { - factory ApplicationData_GetMemoriesUrl({ - $core.String? mediaId, - $core.bool? thumbnail, - }) { - final result = create(); - if (mediaId != null) result.mediaId = mediaId; - if (thumbnail != null) result.thumbnail = thumbnail; - return result; - } - - ApplicationData_GetMemoriesUrl._(); - - factory ApplicationData_GetMemoriesUrl.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetMemoriesUrl.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetMemoriesUrl', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'mediaId') - ..aOB(2, _omitFieldNames ? '' : 'thumbnail') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesUrl clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesUrl copyWith( - void Function(ApplicationData_GetMemoriesUrl) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetMemoriesUrl)) - as ApplicationData_GetMemoriesUrl; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesUrl create() => - ApplicationData_GetMemoriesUrl._(); - @$core.override - ApplicationData_GetMemoriesUrl createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesUrl getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_GetMemoriesUrl? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get mediaId => $_getSZ(0); - @$pb.TagNumber(1) - set mediaId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMediaId() => $_has(0); - @$pb.TagNumber(1) - void clearMediaId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.bool get thumbnail => $_getBF(1); - @$pb.TagNumber(2) - set thumbnail($core.bool value) => $_setBool(1, value); - @$pb.TagNumber(2) - $core.bool hasThumbnail() => $_has(1); - @$pb.TagNumber(2) - void clearThumbnail() => $_clearField(2); -} - -class ApplicationData_GetMemoriesUsage extends $pb.GeneratedMessage { - factory ApplicationData_GetMemoriesUsage() => create(); - - ApplicationData_GetMemoriesUsage._(); - - factory ApplicationData_GetMemoriesUsage.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetMemoriesUsage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetMemoriesUsage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesUsage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetMemoriesUsage copyWith( - void Function(ApplicationData_GetMemoriesUsage) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_GetMemoriesUsage)) - as ApplicationData_GetMemoriesUsage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesUsage create() => - ApplicationData_GetMemoriesUsage._(); - @$core.override - ApplicationData_GetMemoriesUsage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetMemoriesUsage getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static ApplicationData_GetMemoriesUsage? _defaultInstance; -} - -class ApplicationData_DeleteMemory extends $pb.GeneratedMessage { - factory ApplicationData_DeleteMemory({ - $core.String? mediaId, - }) { - final result = create(); - if (mediaId != null) result.mediaId = mediaId; - return result; - } - - ApplicationData_DeleteMemory._(); - - factory ApplicationData_DeleteMemory.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_DeleteMemory.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.DeleteMemory', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'mediaId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DeleteMemory clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DeleteMemory copyWith( - void Function(ApplicationData_DeleteMemory) updates) => - super.copyWith( - (message) => updates(message as ApplicationData_DeleteMemory)) - as ApplicationData_DeleteMemory; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_DeleteMemory create() => - ApplicationData_DeleteMemory._(); - @$core.override - ApplicationData_DeleteMemory createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_DeleteMemory getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData_DeleteMemory? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get mediaId => $_getSZ(0); - @$pb.TagNumber(1) - set mediaId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMediaId() => $_has(0); - @$pb.TagNumber(1) - void clearMediaId() => $_clearField(1); -} - -class ApplicationData_DisableMemoriesBackup extends $pb.GeneratedMessage { - factory ApplicationData_DisableMemoriesBackup() => create(); - - ApplicationData_DisableMemoriesBackup._(); - - factory ApplicationData_DisableMemoriesBackup.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_DisableMemoriesBackup.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.DisableMemoriesBackup', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DisableMemoriesBackup clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_DisableMemoriesBackup copyWith( - void Function(ApplicationData_DisableMemoriesBackup) updates) => - super.copyWith((message) => - updates(message as ApplicationData_DisableMemoriesBackup)) - as ApplicationData_DisableMemoriesBackup; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_DisableMemoriesBackup create() => - ApplicationData_DisableMemoriesBackup._(); - @$core.override - ApplicationData_DisableMemoriesBackup createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_DisableMemoriesBackup getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_DisableMemoriesBackup>(create); - static ApplicationData_DisableMemoriesBackup? _defaultInstance; -} - -class ApplicationData_GetPrivacyPassParameters extends $pb.GeneratedMessage { - factory ApplicationData_GetPrivacyPassParameters() => create(); - - ApplicationData_GetPrivacyPassParameters._(); - - factory ApplicationData_GetPrivacyPassParameters.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_GetPrivacyPassParameters.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.GetPrivacyPassParameters', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetPrivacyPassParameters clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_GetPrivacyPassParameters copyWith( - void Function(ApplicationData_GetPrivacyPassParameters) updates) => - super.copyWith((message) => - updates(message as ApplicationData_GetPrivacyPassParameters)) - as ApplicationData_GetPrivacyPassParameters; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_GetPrivacyPassParameters create() => - ApplicationData_GetPrivacyPassParameters._(); - @$core.override - ApplicationData_GetPrivacyPassParameters createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_GetPrivacyPassParameters getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_GetPrivacyPassParameters>(create); - static ApplicationData_GetPrivacyPassParameters? _defaultInstance; -} - -class ApplicationData_IssuePrivacyPassTokens extends $pb.GeneratedMessage { - factory ApplicationData_IssuePrivacyPassTokens({ - $core.Iterable<$core.List<$core.int>>? tokenRequests, - }) { - final result = create(); - if (tokenRequests != null) result.tokenRequests.addAll(tokenRequests); - return result; - } - - ApplicationData_IssuePrivacyPassTokens._(); - - factory ApplicationData_IssuePrivacyPassTokens.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData_IssuePrivacyPassTokens.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData.IssuePrivacyPassTokens', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..p<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'tokenRequests', $pb.PbFieldType.PY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IssuePrivacyPassTokens clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData_IssuePrivacyPassTokens copyWith( - void Function(ApplicationData_IssuePrivacyPassTokens) updates) => - super.copyWith((message) => - updates(message as ApplicationData_IssuePrivacyPassTokens)) - as ApplicationData_IssuePrivacyPassTokens; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData_IssuePrivacyPassTokens create() => - ApplicationData_IssuePrivacyPassTokens._(); - @$core.override - ApplicationData_IssuePrivacyPassTokens createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData_IssuePrivacyPassTokens getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - ApplicationData_IssuePrivacyPassTokens>(create); - static ApplicationData_IssuePrivacyPassTokens? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList<$core.List<$core.int>> get tokenRequests => $_getList(0); -} - -enum ApplicationData_ApplicationData { - textMessage, - getUserByUsername, - getPrekeysByUserId, - getUserById, - updateGoogleFcmToken, - getCurrentPlanInfos, - getAvailablePlans, - removeAdditionalUser, - downloadDone, - getSignedPrekeyByUserid, - updateSignedPrekey, - deleteAccount, - reportUser, - changeUsername, - ipaPurchase, - ipaForceCheck, - addAdditionalUser, - setLoginToken, - registerPasswordlessRecovery, - passwordlessNotification, - requestMemoriesUpload, - confirmMemoriesUpload, - getMemoriesList, - getMemoriesUrl, - getMemoriesUsage, - deleteMemory, - disableMemoriesBackup, - uploadPqcPrekeys, - getPrivacyPassParameters, - issuePrivacyPassTokens, - notSet -} - -class ApplicationData extends $pb.GeneratedMessage { - factory ApplicationData({ - ApplicationData_TextMessage? textMessage, - ApplicationData_GetUserByUsername? getUserByUsername, - ApplicationData_GetPrekeysByUserId? getPrekeysByUserId, - ApplicationData_GetUserById? getUserById, - ApplicationData_UpdateGoogleFcmToken? updateGoogleFcmToken, - ApplicationData_GetCurrentPlanInfos? getCurrentPlanInfos, - ApplicationData_GetAvailablePlans? getAvailablePlans, - ApplicationData_RemoveAdditionalUser? removeAdditionalUser, - ApplicationData_DownloadDone? downloadDone, - ApplicationData_GetSignedPreKeyByUserId? getSignedPrekeyByUserid, - ApplicationData_UpdateSignedPreKey? updateSignedPrekey, - ApplicationData_DeleteAccount? deleteAccount, - ApplicationData_ReportUser? reportUser, - ApplicationData_ChangeUsername? changeUsername, - ApplicationData_IPAPurchase? ipaPurchase, - ApplicationData_IPAForceCheck? ipaForceCheck, - ApplicationData_AddAdditionalUser? addAdditionalUser, - ApplicationData_SetLoginToken? setLoginToken, - ApplicationData_RegisterPasswordLessRecovery? registerPasswordlessRecovery, - ApplicationData_PasswordlessNotification? passwordlessNotification, - ApplicationData_RequestMemoriesUpload? requestMemoriesUpload, - ApplicationData_ConfirmMemoriesUpload? confirmMemoriesUpload, - ApplicationData_GetMemoriesList? getMemoriesList, - ApplicationData_GetMemoriesUrl? getMemoriesUrl, - ApplicationData_GetMemoriesUsage? getMemoriesUsage, - ApplicationData_DeleteMemory? deleteMemory, - ApplicationData_DisableMemoriesBackup? disableMemoriesBackup, - ApplicationData_UploadPqcPreKeys? uploadPqcPrekeys, - ApplicationData_GetPrivacyPassParameters? getPrivacyPassParameters, - ApplicationData_IssuePrivacyPassTokens? issuePrivacyPassTokens, - }) { - final result = create(); - if (textMessage != null) result.textMessage = textMessage; - if (getUserByUsername != null) result.getUserByUsername = getUserByUsername; - if (getPrekeysByUserId != null) - result.getPrekeysByUserId = getPrekeysByUserId; - if (getUserById != null) result.getUserById = getUserById; - if (updateGoogleFcmToken != null) - result.updateGoogleFcmToken = updateGoogleFcmToken; - if (getCurrentPlanInfos != null) - result.getCurrentPlanInfos = getCurrentPlanInfos; - if (getAvailablePlans != null) result.getAvailablePlans = getAvailablePlans; - if (removeAdditionalUser != null) - result.removeAdditionalUser = removeAdditionalUser; - if (downloadDone != null) result.downloadDone = downloadDone; - if (getSignedPrekeyByUserid != null) - result.getSignedPrekeyByUserid = getSignedPrekeyByUserid; - if (updateSignedPrekey != null) - result.updateSignedPrekey = updateSignedPrekey; - if (deleteAccount != null) result.deleteAccount = deleteAccount; - if (reportUser != null) result.reportUser = reportUser; - if (changeUsername != null) result.changeUsername = changeUsername; - if (ipaPurchase != null) result.ipaPurchase = ipaPurchase; - if (ipaForceCheck != null) result.ipaForceCheck = ipaForceCheck; - if (addAdditionalUser != null) result.addAdditionalUser = addAdditionalUser; - if (setLoginToken != null) result.setLoginToken = setLoginToken; - if (registerPasswordlessRecovery != null) - result.registerPasswordlessRecovery = registerPasswordlessRecovery; - if (passwordlessNotification != null) - result.passwordlessNotification = passwordlessNotification; - if (requestMemoriesUpload != null) - result.requestMemoriesUpload = requestMemoriesUpload; - if (confirmMemoriesUpload != null) - result.confirmMemoriesUpload = confirmMemoriesUpload; - if (getMemoriesList != null) result.getMemoriesList = getMemoriesList; - if (getMemoriesUrl != null) result.getMemoriesUrl = getMemoriesUrl; - if (getMemoriesUsage != null) result.getMemoriesUsage = getMemoriesUsage; - if (deleteMemory != null) result.deleteMemory = deleteMemory; - if (disableMemoriesBackup != null) - result.disableMemoriesBackup = disableMemoriesBackup; - if (uploadPqcPrekeys != null) result.uploadPqcPrekeys = uploadPqcPrekeys; - if (getPrivacyPassParameters != null) - result.getPrivacyPassParameters = getPrivacyPassParameters; - if (issuePrivacyPassTokens != null) - result.issuePrivacyPassTokens = issuePrivacyPassTokens; - return result; - } - - ApplicationData._(); - - factory ApplicationData.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ApplicationData.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, ApplicationData_ApplicationData> - _ApplicationData_ApplicationDataByTag = { - 1: ApplicationData_ApplicationData.textMessage, - 2: ApplicationData_ApplicationData.getUserByUsername, - 3: ApplicationData_ApplicationData.getPrekeysByUserId, - 6: ApplicationData_ApplicationData.getUserById, - 8: ApplicationData_ApplicationData.updateGoogleFcmToken, - 10: ApplicationData_ApplicationData.getCurrentPlanInfos, - 12: ApplicationData_ApplicationData.getAvailablePlans, - 18: ApplicationData_ApplicationData.removeAdditionalUser, - 20: ApplicationData_ApplicationData.downloadDone, - 22: ApplicationData_ApplicationData.getSignedPrekeyByUserid, - 23: ApplicationData_ApplicationData.updateSignedPrekey, - 24: ApplicationData_ApplicationData.deleteAccount, - 25: ApplicationData_ApplicationData.reportUser, - 26: ApplicationData_ApplicationData.changeUsername, - 27: ApplicationData_ApplicationData.ipaPurchase, - 28: ApplicationData_ApplicationData.ipaForceCheck, - 29: ApplicationData_ApplicationData.addAdditionalUser, - 30: ApplicationData_ApplicationData.setLoginToken, - 31: ApplicationData_ApplicationData.registerPasswordlessRecovery, - 32: ApplicationData_ApplicationData.passwordlessNotification, - 33: ApplicationData_ApplicationData.requestMemoriesUpload, - 34: ApplicationData_ApplicationData.confirmMemoriesUpload, - 35: ApplicationData_ApplicationData.getMemoriesList, - 36: ApplicationData_ApplicationData.getMemoriesUrl, - 37: ApplicationData_ApplicationData.getMemoriesUsage, - 38: ApplicationData_ApplicationData.deleteMemory, - 39: ApplicationData_ApplicationData.disableMemoriesBackup, - 40: ApplicationData_ApplicationData.uploadPqcPrekeys, - 41: ApplicationData_ApplicationData.getPrivacyPassParameters, - 42: ApplicationData_ApplicationData.issuePrivacyPassTokens, - 0: ApplicationData_ApplicationData.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ApplicationData', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [ - 1, - 2, - 3, - 6, - 8, - 10, - 12, - 18, - 20, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42 - ]) - ..aOM(1, _omitFieldNames ? '' : 'textMessage', - protoName: 'textMessage', - subBuilder: ApplicationData_TextMessage.create) - ..aOM( - 2, _omitFieldNames ? '' : 'getUserByUsername', - protoName: 'getUserByUsername', - subBuilder: ApplicationData_GetUserByUsername.create) - ..aOM( - 3, _omitFieldNames ? '' : 'getPrekeysByUserId', - protoName: 'getPrekeysByUserId', - subBuilder: ApplicationData_GetPrekeysByUserId.create) - ..aOM(6, _omitFieldNames ? '' : 'getUserById', - protoName: 'getUserById', - subBuilder: ApplicationData_GetUserById.create) - ..aOM( - 8, _omitFieldNames ? '' : 'updateGoogleFcmToken', - protoName: 'updateGoogleFcmToken', - subBuilder: ApplicationData_UpdateGoogleFcmToken.create) - ..aOM( - 10, _omitFieldNames ? '' : 'getCurrentPlanInfos', - protoName: 'getCurrentPlanInfos', - subBuilder: ApplicationData_GetCurrentPlanInfos.create) - ..aOM( - 12, _omitFieldNames ? '' : 'getAvailablePlans', - protoName: 'getAvailablePlans', - subBuilder: ApplicationData_GetAvailablePlans.create) - ..aOM( - 18, _omitFieldNames ? '' : 'removeAdditionalUser', - protoName: 'removeAdditionalUser', - subBuilder: ApplicationData_RemoveAdditionalUser.create) - ..aOM( - 20, _omitFieldNames ? '' : 'downloadDone', - protoName: 'downloadDone', - subBuilder: ApplicationData_DownloadDone.create) - ..aOM( - 22, _omitFieldNames ? '' : 'getSignedPrekeyByUserid', - protoName: 'getSignedPrekeyByUserid', - subBuilder: ApplicationData_GetSignedPreKeyByUserId.create) - ..aOM( - 23, _omitFieldNames ? '' : 'updateSignedPrekey', - protoName: 'updateSignedPrekey', - subBuilder: ApplicationData_UpdateSignedPreKey.create) - ..aOM( - 24, _omitFieldNames ? '' : 'deleteAccount', - protoName: 'deleteAccount', - subBuilder: ApplicationData_DeleteAccount.create) - ..aOM(25, _omitFieldNames ? '' : 'reportUser', - protoName: 'reportUser', subBuilder: ApplicationData_ReportUser.create) - ..aOM( - 26, _omitFieldNames ? '' : 'changeUsername', - protoName: 'changeUsername', - subBuilder: ApplicationData_ChangeUsername.create) - ..aOM(27, _omitFieldNames ? '' : 'ipaPurchase', - protoName: 'ipaPurchase', - subBuilder: ApplicationData_IPAPurchase.create) - ..aOM( - 28, _omitFieldNames ? '' : 'ipaForceCheck', - protoName: 'ipaForceCheck', - subBuilder: ApplicationData_IPAForceCheck.create) - ..aOM( - 29, _omitFieldNames ? '' : 'addAdditionalUser', - protoName: 'addAdditionalUser', - subBuilder: ApplicationData_AddAdditionalUser.create) - ..aOM( - 30, _omitFieldNames ? '' : 'setLoginToken', - subBuilder: ApplicationData_SetLoginToken.create) - ..aOM( - 31, _omitFieldNames ? '' : 'registerPasswordlessRecovery', - subBuilder: ApplicationData_RegisterPasswordLessRecovery.create) - ..aOM( - 32, _omitFieldNames ? '' : 'passwordlessNotification', - subBuilder: ApplicationData_PasswordlessNotification.create) - ..aOM( - 33, _omitFieldNames ? '' : 'requestMemoriesUpload', - subBuilder: ApplicationData_RequestMemoriesUpload.create) - ..aOM( - 34, _omitFieldNames ? '' : 'confirmMemoriesUpload', - subBuilder: ApplicationData_ConfirmMemoriesUpload.create) - ..aOM( - 35, _omitFieldNames ? '' : 'getMemoriesList', - subBuilder: ApplicationData_GetMemoriesList.create) - ..aOM( - 36, _omitFieldNames ? '' : 'getMemoriesUrl', - subBuilder: ApplicationData_GetMemoriesUrl.create) - ..aOM( - 37, _omitFieldNames ? '' : 'getMemoriesUsage', - subBuilder: ApplicationData_GetMemoriesUsage.create) - ..aOM( - 38, _omitFieldNames ? '' : 'deleteMemory', - subBuilder: ApplicationData_DeleteMemory.create) - ..aOM( - 39, _omitFieldNames ? '' : 'disableMemoriesBackup', - subBuilder: ApplicationData_DisableMemoriesBackup.create) - ..aOM( - 40, _omitFieldNames ? '' : 'uploadPqcPrekeys', - subBuilder: ApplicationData_UploadPqcPreKeys.create) - ..aOM( - 41, _omitFieldNames ? '' : 'getPrivacyPassParameters', - subBuilder: ApplicationData_GetPrivacyPassParameters.create) - ..aOM( - 42, _omitFieldNames ? '' : 'issuePrivacyPassTokens', - subBuilder: ApplicationData_IssuePrivacyPassTokens.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ApplicationData copyWith(void Function(ApplicationData) updates) => - super.copyWith((message) => updates(message as ApplicationData)) - as ApplicationData; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ApplicationData create() => ApplicationData._(); - @$core.override - ApplicationData createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ApplicationData getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ApplicationData? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(6) - @$pb.TagNumber(8) - @$pb.TagNumber(10) - @$pb.TagNumber(12) - @$pb.TagNumber(18) - @$pb.TagNumber(20) - @$pb.TagNumber(22) - @$pb.TagNumber(23) - @$pb.TagNumber(24) - @$pb.TagNumber(25) - @$pb.TagNumber(26) - @$pb.TagNumber(27) - @$pb.TagNumber(28) - @$pb.TagNumber(29) - @$pb.TagNumber(30) - @$pb.TagNumber(31) - @$pb.TagNumber(32) - @$pb.TagNumber(33) - @$pb.TagNumber(34) - @$pb.TagNumber(35) - @$pb.TagNumber(36) - @$pb.TagNumber(37) - @$pb.TagNumber(38) - @$pb.TagNumber(39) - @$pb.TagNumber(40) - @$pb.TagNumber(41) - @$pb.TagNumber(42) - ApplicationData_ApplicationData whichApplicationData() => - _ApplicationData_ApplicationDataByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(6) - @$pb.TagNumber(8) - @$pb.TagNumber(10) - @$pb.TagNumber(12) - @$pb.TagNumber(18) - @$pb.TagNumber(20) - @$pb.TagNumber(22) - @$pb.TagNumber(23) - @$pb.TagNumber(24) - @$pb.TagNumber(25) - @$pb.TagNumber(26) - @$pb.TagNumber(27) - @$pb.TagNumber(28) - @$pb.TagNumber(29) - @$pb.TagNumber(30) - @$pb.TagNumber(31) - @$pb.TagNumber(32) - @$pb.TagNumber(33) - @$pb.TagNumber(34) - @$pb.TagNumber(35) - @$pb.TagNumber(36) - @$pb.TagNumber(37) - @$pb.TagNumber(38) - @$pb.TagNumber(39) - @$pb.TagNumber(40) - @$pb.TagNumber(41) - @$pb.TagNumber(42) - void clearApplicationData() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - ApplicationData_TextMessage get textMessage => $_getN(0); - @$pb.TagNumber(1) - set textMessage(ApplicationData_TextMessage value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasTextMessage() => $_has(0); - @$pb.TagNumber(1) - void clearTextMessage() => $_clearField(1); - @$pb.TagNumber(1) - ApplicationData_TextMessage ensureTextMessage() => $_ensure(0); - - @$pb.TagNumber(2) - ApplicationData_GetUserByUsername get getUserByUsername => $_getN(1); - @$pb.TagNumber(2) - set getUserByUsername(ApplicationData_GetUserByUsername value) => - $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasGetUserByUsername() => $_has(1); - @$pb.TagNumber(2) - void clearGetUserByUsername() => $_clearField(2); - @$pb.TagNumber(2) - ApplicationData_GetUserByUsername ensureGetUserByUsername() => $_ensure(1); - - @$pb.TagNumber(3) - ApplicationData_GetPrekeysByUserId get getPrekeysByUserId => $_getN(2); - @$pb.TagNumber(3) - set getPrekeysByUserId(ApplicationData_GetPrekeysByUserId value) => - $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasGetPrekeysByUserId() => $_has(2); - @$pb.TagNumber(3) - void clearGetPrekeysByUserId() => $_clearField(3); - @$pb.TagNumber(3) - ApplicationData_GetPrekeysByUserId ensureGetPrekeysByUserId() => $_ensure(2); - - @$pb.TagNumber(6) - ApplicationData_GetUserById get getUserById => $_getN(3); - @$pb.TagNumber(6) - set getUserById(ApplicationData_GetUserById value) => $_setField(6, value); - @$pb.TagNumber(6) - $core.bool hasGetUserById() => $_has(3); - @$pb.TagNumber(6) - void clearGetUserById() => $_clearField(6); - @$pb.TagNumber(6) - ApplicationData_GetUserById ensureGetUserById() => $_ensure(3); - - @$pb.TagNumber(8) - ApplicationData_UpdateGoogleFcmToken get updateGoogleFcmToken => $_getN(4); - @$pb.TagNumber(8) - set updateGoogleFcmToken(ApplicationData_UpdateGoogleFcmToken value) => - $_setField(8, value); - @$pb.TagNumber(8) - $core.bool hasUpdateGoogleFcmToken() => $_has(4); - @$pb.TagNumber(8) - void clearUpdateGoogleFcmToken() => $_clearField(8); - @$pb.TagNumber(8) - ApplicationData_UpdateGoogleFcmToken ensureUpdateGoogleFcmToken() => - $_ensure(4); - - @$pb.TagNumber(10) - ApplicationData_GetCurrentPlanInfos get getCurrentPlanInfos => $_getN(5); - @$pb.TagNumber(10) - set getCurrentPlanInfos(ApplicationData_GetCurrentPlanInfos value) => - $_setField(10, value); - @$pb.TagNumber(10) - $core.bool hasGetCurrentPlanInfos() => $_has(5); - @$pb.TagNumber(10) - void clearGetCurrentPlanInfos() => $_clearField(10); - @$pb.TagNumber(10) - ApplicationData_GetCurrentPlanInfos ensureGetCurrentPlanInfos() => - $_ensure(5); - - @$pb.TagNumber(12) - ApplicationData_GetAvailablePlans get getAvailablePlans => $_getN(6); - @$pb.TagNumber(12) - set getAvailablePlans(ApplicationData_GetAvailablePlans value) => - $_setField(12, value); - @$pb.TagNumber(12) - $core.bool hasGetAvailablePlans() => $_has(6); - @$pb.TagNumber(12) - void clearGetAvailablePlans() => $_clearField(12); - @$pb.TagNumber(12) - ApplicationData_GetAvailablePlans ensureGetAvailablePlans() => $_ensure(6); - - @$pb.TagNumber(18) - ApplicationData_RemoveAdditionalUser get removeAdditionalUser => $_getN(7); - @$pb.TagNumber(18) - set removeAdditionalUser(ApplicationData_RemoveAdditionalUser value) => - $_setField(18, value); - @$pb.TagNumber(18) - $core.bool hasRemoveAdditionalUser() => $_has(7); - @$pb.TagNumber(18) - void clearRemoveAdditionalUser() => $_clearField(18); - @$pb.TagNumber(18) - ApplicationData_RemoveAdditionalUser ensureRemoveAdditionalUser() => - $_ensure(7); - - @$pb.TagNumber(20) - ApplicationData_DownloadDone get downloadDone => $_getN(8); - @$pb.TagNumber(20) - set downloadDone(ApplicationData_DownloadDone value) => $_setField(20, value); - @$pb.TagNumber(20) - $core.bool hasDownloadDone() => $_has(8); - @$pb.TagNumber(20) - void clearDownloadDone() => $_clearField(20); - @$pb.TagNumber(20) - ApplicationData_DownloadDone ensureDownloadDone() => $_ensure(8); - - @$pb.TagNumber(22) - ApplicationData_GetSignedPreKeyByUserId get getSignedPrekeyByUserid => - $_getN(9); - @$pb.TagNumber(22) - set getSignedPrekeyByUserid(ApplicationData_GetSignedPreKeyByUserId value) => - $_setField(22, value); - @$pb.TagNumber(22) - $core.bool hasGetSignedPrekeyByUserid() => $_has(9); - @$pb.TagNumber(22) - void clearGetSignedPrekeyByUserid() => $_clearField(22); - @$pb.TagNumber(22) - ApplicationData_GetSignedPreKeyByUserId ensureGetSignedPrekeyByUserid() => - $_ensure(9); - - @$pb.TagNumber(23) - ApplicationData_UpdateSignedPreKey get updateSignedPrekey => $_getN(10); - @$pb.TagNumber(23) - set updateSignedPrekey(ApplicationData_UpdateSignedPreKey value) => - $_setField(23, value); - @$pb.TagNumber(23) - $core.bool hasUpdateSignedPrekey() => $_has(10); - @$pb.TagNumber(23) - void clearUpdateSignedPrekey() => $_clearField(23); - @$pb.TagNumber(23) - ApplicationData_UpdateSignedPreKey ensureUpdateSignedPrekey() => $_ensure(10); - - @$pb.TagNumber(24) - ApplicationData_DeleteAccount get deleteAccount => $_getN(11); - @$pb.TagNumber(24) - set deleteAccount(ApplicationData_DeleteAccount value) => - $_setField(24, value); - @$pb.TagNumber(24) - $core.bool hasDeleteAccount() => $_has(11); - @$pb.TagNumber(24) - void clearDeleteAccount() => $_clearField(24); - @$pb.TagNumber(24) - ApplicationData_DeleteAccount ensureDeleteAccount() => $_ensure(11); - - @$pb.TagNumber(25) - ApplicationData_ReportUser get reportUser => $_getN(12); - @$pb.TagNumber(25) - set reportUser(ApplicationData_ReportUser value) => $_setField(25, value); - @$pb.TagNumber(25) - $core.bool hasReportUser() => $_has(12); - @$pb.TagNumber(25) - void clearReportUser() => $_clearField(25); - @$pb.TagNumber(25) - ApplicationData_ReportUser ensureReportUser() => $_ensure(12); - - @$pb.TagNumber(26) - ApplicationData_ChangeUsername get changeUsername => $_getN(13); - @$pb.TagNumber(26) - set changeUsername(ApplicationData_ChangeUsername value) => - $_setField(26, value); - @$pb.TagNumber(26) - $core.bool hasChangeUsername() => $_has(13); - @$pb.TagNumber(26) - void clearChangeUsername() => $_clearField(26); - @$pb.TagNumber(26) - ApplicationData_ChangeUsername ensureChangeUsername() => $_ensure(13); - - @$pb.TagNumber(27) - ApplicationData_IPAPurchase get ipaPurchase => $_getN(14); - @$pb.TagNumber(27) - set ipaPurchase(ApplicationData_IPAPurchase value) => $_setField(27, value); - @$pb.TagNumber(27) - $core.bool hasIpaPurchase() => $_has(14); - @$pb.TagNumber(27) - void clearIpaPurchase() => $_clearField(27); - @$pb.TagNumber(27) - ApplicationData_IPAPurchase ensureIpaPurchase() => $_ensure(14); - - @$pb.TagNumber(28) - ApplicationData_IPAForceCheck get ipaForceCheck => $_getN(15); - @$pb.TagNumber(28) - set ipaForceCheck(ApplicationData_IPAForceCheck value) => - $_setField(28, value); - @$pb.TagNumber(28) - $core.bool hasIpaForceCheck() => $_has(15); - @$pb.TagNumber(28) - void clearIpaForceCheck() => $_clearField(28); - @$pb.TagNumber(28) - ApplicationData_IPAForceCheck ensureIpaForceCheck() => $_ensure(15); - - @$pb.TagNumber(29) - ApplicationData_AddAdditionalUser get addAdditionalUser => $_getN(16); - @$pb.TagNumber(29) - set addAdditionalUser(ApplicationData_AddAdditionalUser value) => - $_setField(29, value); - @$pb.TagNumber(29) - $core.bool hasAddAdditionalUser() => $_has(16); - @$pb.TagNumber(29) - void clearAddAdditionalUser() => $_clearField(29); - @$pb.TagNumber(29) - ApplicationData_AddAdditionalUser ensureAddAdditionalUser() => $_ensure(16); - - @$pb.TagNumber(30) - ApplicationData_SetLoginToken get setLoginToken => $_getN(17); - @$pb.TagNumber(30) - set setLoginToken(ApplicationData_SetLoginToken value) => - $_setField(30, value); - @$pb.TagNumber(30) - $core.bool hasSetLoginToken() => $_has(17); - @$pb.TagNumber(30) - void clearSetLoginToken() => $_clearField(30); - @$pb.TagNumber(30) - ApplicationData_SetLoginToken ensureSetLoginToken() => $_ensure(17); - - @$pb.TagNumber(31) - ApplicationData_RegisterPasswordLessRecovery - get registerPasswordlessRecovery => $_getN(18); - @$pb.TagNumber(31) - set registerPasswordlessRecovery( - ApplicationData_RegisterPasswordLessRecovery value) => - $_setField(31, value); - @$pb.TagNumber(31) - $core.bool hasRegisterPasswordlessRecovery() => $_has(18); - @$pb.TagNumber(31) - void clearRegisterPasswordlessRecovery() => $_clearField(31); - @$pb.TagNumber(31) - ApplicationData_RegisterPasswordLessRecovery - ensureRegisterPasswordlessRecovery() => $_ensure(18); - - @$pb.TagNumber(32) - ApplicationData_PasswordlessNotification get passwordlessNotification => - $_getN(19); - @$pb.TagNumber(32) - set passwordlessNotification( - ApplicationData_PasswordlessNotification value) => - $_setField(32, value); - @$pb.TagNumber(32) - $core.bool hasPasswordlessNotification() => $_has(19); - @$pb.TagNumber(32) - void clearPasswordlessNotification() => $_clearField(32); - @$pb.TagNumber(32) - ApplicationData_PasswordlessNotification ensurePasswordlessNotification() => - $_ensure(19); - - @$pb.TagNumber(33) - ApplicationData_RequestMemoriesUpload get requestMemoriesUpload => $_getN(20); - @$pb.TagNumber(33) - set requestMemoriesUpload(ApplicationData_RequestMemoriesUpload value) => - $_setField(33, value); - @$pb.TagNumber(33) - $core.bool hasRequestMemoriesUpload() => $_has(20); - @$pb.TagNumber(33) - void clearRequestMemoriesUpload() => $_clearField(33); - @$pb.TagNumber(33) - ApplicationData_RequestMemoriesUpload ensureRequestMemoriesUpload() => - $_ensure(20); - - @$pb.TagNumber(34) - ApplicationData_ConfirmMemoriesUpload get confirmMemoriesUpload => $_getN(21); - @$pb.TagNumber(34) - set confirmMemoriesUpload(ApplicationData_ConfirmMemoriesUpload value) => - $_setField(34, value); - @$pb.TagNumber(34) - $core.bool hasConfirmMemoriesUpload() => $_has(21); - @$pb.TagNumber(34) - void clearConfirmMemoriesUpload() => $_clearField(34); - @$pb.TagNumber(34) - ApplicationData_ConfirmMemoriesUpload ensureConfirmMemoriesUpload() => - $_ensure(21); - - @$pb.TagNumber(35) - ApplicationData_GetMemoriesList get getMemoriesList => $_getN(22); - @$pb.TagNumber(35) - set getMemoriesList(ApplicationData_GetMemoriesList value) => - $_setField(35, value); - @$pb.TagNumber(35) - $core.bool hasGetMemoriesList() => $_has(22); - @$pb.TagNumber(35) - void clearGetMemoriesList() => $_clearField(35); - @$pb.TagNumber(35) - ApplicationData_GetMemoriesList ensureGetMemoriesList() => $_ensure(22); - - @$pb.TagNumber(36) - ApplicationData_GetMemoriesUrl get getMemoriesUrl => $_getN(23); - @$pb.TagNumber(36) - set getMemoriesUrl(ApplicationData_GetMemoriesUrl value) => - $_setField(36, value); - @$pb.TagNumber(36) - $core.bool hasGetMemoriesUrl() => $_has(23); - @$pb.TagNumber(36) - void clearGetMemoriesUrl() => $_clearField(36); - @$pb.TagNumber(36) - ApplicationData_GetMemoriesUrl ensureGetMemoriesUrl() => $_ensure(23); - - @$pb.TagNumber(37) - ApplicationData_GetMemoriesUsage get getMemoriesUsage => $_getN(24); - @$pb.TagNumber(37) - set getMemoriesUsage(ApplicationData_GetMemoriesUsage value) => - $_setField(37, value); - @$pb.TagNumber(37) - $core.bool hasGetMemoriesUsage() => $_has(24); - @$pb.TagNumber(37) - void clearGetMemoriesUsage() => $_clearField(37); - @$pb.TagNumber(37) - ApplicationData_GetMemoriesUsage ensureGetMemoriesUsage() => $_ensure(24); - - @$pb.TagNumber(38) - ApplicationData_DeleteMemory get deleteMemory => $_getN(25); - @$pb.TagNumber(38) - set deleteMemory(ApplicationData_DeleteMemory value) => $_setField(38, value); - @$pb.TagNumber(38) - $core.bool hasDeleteMemory() => $_has(25); - @$pb.TagNumber(38) - void clearDeleteMemory() => $_clearField(38); - @$pb.TagNumber(38) - ApplicationData_DeleteMemory ensureDeleteMemory() => $_ensure(25); - - @$pb.TagNumber(39) - ApplicationData_DisableMemoriesBackup get disableMemoriesBackup => $_getN(26); - @$pb.TagNumber(39) - set disableMemoriesBackup(ApplicationData_DisableMemoriesBackup value) => - $_setField(39, value); - @$pb.TagNumber(39) - $core.bool hasDisableMemoriesBackup() => $_has(26); - @$pb.TagNumber(39) - void clearDisableMemoriesBackup() => $_clearField(39); - @$pb.TagNumber(39) - ApplicationData_DisableMemoriesBackup ensureDisableMemoriesBackup() => - $_ensure(26); - - @$pb.TagNumber(40) - ApplicationData_UploadPqcPreKeys get uploadPqcPrekeys => $_getN(27); - @$pb.TagNumber(40) - set uploadPqcPrekeys(ApplicationData_UploadPqcPreKeys value) => - $_setField(40, value); - @$pb.TagNumber(40) - $core.bool hasUploadPqcPrekeys() => $_has(27); - @$pb.TagNumber(40) - void clearUploadPqcPrekeys() => $_clearField(40); - @$pb.TagNumber(40) - ApplicationData_UploadPqcPreKeys ensureUploadPqcPrekeys() => $_ensure(27); - - @$pb.TagNumber(41) - ApplicationData_GetPrivacyPassParameters get getPrivacyPassParameters => - $_getN(28); - @$pb.TagNumber(41) - set getPrivacyPassParameters( - ApplicationData_GetPrivacyPassParameters value) => - $_setField(41, value); - @$pb.TagNumber(41) - $core.bool hasGetPrivacyPassParameters() => $_has(28); - @$pb.TagNumber(41) - void clearGetPrivacyPassParameters() => $_clearField(41); - @$pb.TagNumber(41) - ApplicationData_GetPrivacyPassParameters ensureGetPrivacyPassParameters() => - $_ensure(28); - - @$pb.TagNumber(42) - ApplicationData_IssuePrivacyPassTokens get issuePrivacyPassTokens => - $_getN(29); - @$pb.TagNumber(42) - set issuePrivacyPassTokens(ApplicationData_IssuePrivacyPassTokens value) => - $_setField(42, value); - @$pb.TagNumber(42) - $core.bool hasIssuePrivacyPassTokens() => $_has(29); - @$pb.TagNumber(42) - void clearIssuePrivacyPassTokens() => $_clearField(42); - @$pb.TagNumber(42) - ApplicationData_IssuePrivacyPassTokens ensureIssuePrivacyPassTokens() => - $_ensure(29); -} - -class Response_PreKey extends $pb.GeneratedMessage { - factory Response_PreKey({ - $fixnum.Int64? id, - $core.List<$core.int>? prekey, - }) { - final result = create(); - if (id != null) result.id = id; - if (prekey != null) result.prekey = prekey; - return result; - } - - Response_PreKey._(); - - factory Response_PreKey.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'id') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'prekey', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PreKey copyWith(void Function(Response_PreKey) updates) => - super.copyWith((message) => updates(message as Response_PreKey)) - as Response_PreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PreKey create() => Response_PreKey._(); - @$core.override - Response_PreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get id => $_getI64(0); - @$pb.TagNumber(1) - set id($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get prekey => $_getN(1); - @$pb.TagNumber(2) - set prekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearPrekey() => $_clearField(2); -} - -class Response_Prekeys extends $pb.GeneratedMessage { - factory Response_Prekeys({ - $core.Iterable? prekeys, - }) { - final result = create(); - if (prekeys != null) result.prekeys.addAll(prekeys); - return result; - } - - Response_Prekeys._(); - - factory Response_Prekeys.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Prekeys.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Prekeys', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'prekeys', - subBuilder: Response_PreKey.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Prekeys clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Prekeys copyWith(void Function(Response_Prekeys) updates) => - super.copyWith((message) => updates(message as Response_Prekeys)) - as Response_Prekeys; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Prekeys create() => Response_Prekeys._(); - @$core.override - Response_Prekeys createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Prekeys getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Prekeys? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get prekeys => $_getList(0); -} - -class Response_PqcPrekeys extends $pb.GeneratedMessage { - factory Response_PqcPrekeys({ - $core.Iterable? prekeys, - }) { - final result = create(); - if (prekeys != null) result.prekeys.addAll(prekeys); - return result; - } - - Response_PqcPrekeys._(); - - factory Response_PqcPrekeys.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PqcPrekeys.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PqcPrekeys', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'prekeys', - subBuilder: ApplicationData_PqcPreKey.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcPrekeys clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcPrekeys copyWith(void Function(Response_PqcPrekeys) updates) => - super.copyWith((message) => updates(message as Response_PqcPrekeys)) - as Response_PqcPrekeys; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PqcPrekeys create() => Response_PqcPrekeys._(); - @$core.override - Response_PqcPrekeys createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PqcPrekeys getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PqcPrekeys? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get prekeys => $_getList(0); -} - -enum Response_Ok_Ok { none, prekeys, prekeysPqc, notSet } - -class Response_Ok extends $pb.GeneratedMessage { - factory Response_Ok({ - $core.bool? none, - Response_Prekeys? prekeys, - Response_PqcPrekeys? prekeysPqc, - }) { - final result = create(); - if (none != null) result.none = none; - if (prekeys != null) result.prekeys = prekeys; - if (prekeysPqc != null) result.prekeysPqc = prekeysPqc; - return result; - } - - Response_Ok._(); - - factory Response_Ok.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Ok.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, Response_Ok_Ok> _Response_Ok_OkByTag = { - 1: Response_Ok_Ok.none, - 2: Response_Ok_Ok.prekeys, - 3: Response_Ok_Ok.prekeysPqc, - 0: Response_Ok_Ok.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Ok', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [1, 2, 3]) - ..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None') - ..aOM(2, _omitFieldNames ? '' : 'prekeys', - subBuilder: Response_Prekeys.create) - ..aOM(3, _omitFieldNames ? '' : 'prekeysPqc', - subBuilder: Response_PqcPrekeys.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Ok clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Ok copyWith(void Function(Response_Ok) updates) => - super.copyWith((message) => updates(message as Response_Ok)) - as Response_Ok; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Ok create() => Response_Ok._(); - @$core.override - Response_Ok createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Ok getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Ok? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - void clearOk() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $core.bool get none => $_getBF(0); - @$pb.TagNumber(1) - set none($core.bool value) => $_setBool(0, value); - @$pb.TagNumber(1) - $core.bool hasNone() => $_has(0); - @$pb.TagNumber(1) - void clearNone() => $_clearField(1); - - @$pb.TagNumber(2) - Response_Prekeys get prekeys => $_getN(1); - @$pb.TagNumber(2) - set prekeys(Response_Prekeys value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasPrekeys() => $_has(1); - @$pb.TagNumber(2) - void clearPrekeys() => $_clearField(2); - @$pb.TagNumber(2) - Response_Prekeys ensurePrekeys() => $_ensure(1); - - @$pb.TagNumber(3) - Response_PqcPrekeys get prekeysPqc => $_getN(2); - @$pb.TagNumber(3) - set prekeysPqc(Response_PqcPrekeys value) => $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasPrekeysPqc() => $_has(2); - @$pb.TagNumber(3) - void clearPrekeysPqc() => $_clearField(3); - @$pb.TagNumber(3) - Response_PqcPrekeys ensurePrekeysPqc() => $_ensure(2); -} - -enum Response_Response { ok, error, notSet } - -class Response extends $pb.GeneratedMessage { - factory Response({ - Response_Ok? ok, - $0.ErrorCode? error, - }) { - final result = create(); - if (ok != null) result.ok = ok; - if (error != null) result.error = error; - return result; - } - - Response._(); - - factory Response.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, Response_Response> _Response_ResponseByTag = - { - 1: Response_Response.ok, - 2: Response_Response.error, - 0: Response_Response.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'client_to_server'), - createEmptyInstance: create) - ..oo(0, [1, 2]) - ..aOM(1, _omitFieldNames ? '' : 'ok', - subBuilder: Response_Ok.create) - ..aE<$0.ErrorCode>(2, _omitFieldNames ? '' : 'error', - enumValues: $0.ErrorCode.values) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response copyWith(void Function(Response) updates) => - super.copyWith((message) => updates(message as Response)) as Response; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response create() => Response._(); - @$core.override - Response createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Response? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - Response_Response whichResponse() => - _Response_ResponseByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - void clearResponse() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - Response_Ok get ok => $_getN(0); - @$pb.TagNumber(1) - set ok(Response_Ok value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasOk() => $_has(0); - @$pb.TagNumber(1) - void clearOk() => $_clearField(1); - @$pb.TagNumber(1) - Response_Ok ensureOk() => $_ensure(0); - - @$pb.TagNumber(2) - $0.ErrorCode get error => $_getN(1); - @$pb.TagNumber(2) - set error($0.ErrorCode value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasError() => $_has(1); - @$pb.TagNumber(2) - void clearError() => $_clearField(2); -} - -const $core.bool _omitFieldNames = - $core.bool.fromEnvironment('protobuf.omit_field_names'); -const $core.bool _omitMessageNames = - $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pbenum.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pbenum.dart deleted file mode 100644 index 72ce89f0..00000000 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pbenum.dart +++ /dev/null @@ -1,11 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/client_to_server.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart deleted file mode 100644 index 8e106b8f..00000000 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pbjson.dart +++ /dev/null @@ -1,1359 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/client_to_server.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports -// ignore_for_file: unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use clientToServerDescriptor instead') -const ClientToServer$json = { - '1': 'ClientToServer', - '2': [ - { - '1': 'V0', - '3': 1, - '4': 1, - '5': 11, - '6': '.client_to_server.V0', - '9': 0, - '10': 'V0' - }, - ], - '8': [ - {'1': 'v'}, - ], -}; - -/// Descriptor for `ClientToServer`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List clientToServerDescriptor = $convert.base64Decode( - 'Cg5DbGllbnRUb1NlcnZlchImCgJWMBgBIAEoCzIULmNsaWVudF90b19zZXJ2ZXIuVjBIAFICVj' - 'BCAwoBdg=='); - -@$core.Deprecated('Use v0Descriptor instead') -const V0$json = { - '1': 'V0', - '2': [ - {'1': 'seq', '3': 1, '4': 1, '5': 4, '10': 'seq'}, - { - '1': 'handshake', - '3': 2, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake', - '9': 0, - '10': 'handshake' - }, - { - '1': 'applicationdata', - '3': 3, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData', - '9': 0, - '10': 'applicationdata' - }, - { - '1': 'response', - '3': 4, - '4': 1, - '5': 11, - '6': '.client_to_server.Response', - '9': 0, - '10': 'response' - }, - ], - '8': [ - {'1': 'Kind'}, - ], -}; - -/// Descriptor for `V0`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List v0Descriptor = $convert.base64Decode( - 'CgJWMBIQCgNzZXEYASABKARSA3NlcRI7CgloYW5kc2hha2UYAiABKAsyGy5jbGllbnRfdG9fc2' - 'VydmVyLkhhbmRzaGFrZUgAUgloYW5kc2hha2USTQoPYXBwbGljYXRpb25kYXRhGAMgASgLMiEu' - 'Y2xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGFIAFIPYXBwbGljYXRpb25kYXRhEjgKCH' - 'Jlc3BvbnNlGAQgASgLMhouY2xpZW50X3RvX3NlcnZlci5SZXNwb25zZUgAUghyZXNwb25zZUIG' - 'CgRLaW5k'); - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake$json = { - '1': 'Handshake', - '2': [ - { - '1': 'register', - '3': 1, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.Register', - '9': 0, - '10': 'register' - }, - { - '1': 'getAuthChallenge', - '3': 2, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.GetAuthChallenge', - '9': 0, - '10': 'getAuthChallenge' - }, - { - '1': 'getAuthToken', - '3': 3, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.GetAuthToken', - '9': 0, - '10': 'getAuthToken' - }, - { - '1': 'authenticate', - '3': 4, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.Authenticate', - '9': 0, - '10': 'authenticate' - }, - { - '1': 'requestPOW', - '3': 5, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.RequestPOW', - '9': 0, - '10': 'requestPOW' - }, - { - '1': 'authenticate_with_login_token', - '3': 6, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.AuthenticateWithLoginToken', - '9': 0, - '10': 'authenticateWithLoginToken' - }, - { - '1': 'get_userid_by_username', - '3': 7, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.GetUserIdByUsername', - '9': 0, - '10': 'getUseridByUsername' - }, - { - '1': 'get_server_key_for_passwordless_recovery', - '3': 8, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.GetServerKeyForPasswordLessRecovery', - '9': 0, - '10': 'getServerKeyForPasswordlessRecovery' - }, - { - '1': 'register_passwordless_notification', - '3': 9, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.RegisterPasswordlessNotification', - '9': 0, - '10': 'registerPasswordlessNotification' - }, - { - '1': 'check_for_passwordless_notification', - '3': 10, - '4': 1, - '5': 11, - '6': '.client_to_server.Handshake.CheckForPasswordlessNotification', - '9': 0, - '10': 'checkForPasswordlessNotification' - }, - ], - '3': [ - Handshake_RequestPOW$json, - Handshake_Register$json, - Handshake_GetAuthChallenge$json, - Handshake_GetUserIdByUsername$json, - Handshake_GetAuthToken$json, - Handshake_Authenticate$json, - Handshake_AuthenticateWithLoginToken$json, - Handshake_GetServerKeyForPasswordLessRecovery$json, - Handshake_RegisterPasswordlessNotification$json, - Handshake_CheckForPasswordlessNotification$json - ], - '8': [ - {'1': 'Handshake'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_RequestPOW$json = { - '1': 'RequestPOW', -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_Register$json = { - '1': 'Register', - '2': [ - {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, - { - '1': 'invite_code', - '3': 2, - '4': 1, - '5': 9, - '9': 0, - '10': 'inviteCode', - '17': true - }, - { - '1': 'public_identity_key', - '3': 3, - '4': 1, - '5': 12, - '10': 'publicIdentityKey' - }, - {'1': 'signed_prekey', '3': 4, '4': 1, '5': 12, '10': 'signedPrekey'}, - { - '1': 'signed_prekey_signature', - '3': 5, - '4': 1, - '5': 12, - '10': 'signedPrekeySignature' - }, - {'1': 'signed_prekey_id', '3': 6, '4': 1, '5': 3, '10': 'signedPrekeyId'}, - {'1': 'registration_id', '3': 7, '4': 1, '5': 3, '10': 'registrationId'}, - {'1': 'is_ios', '3': 8, '4': 1, '5': 8, '10': 'isIos'}, - {'1': 'lang_code', '3': 9, '4': 1, '5': 9, '10': 'langCode'}, - {'1': 'proof_of_work', '3': 10, '4': 1, '5': 3, '10': 'proofOfWork'}, - { - '1': 'login_token', - '3': 11, - '4': 1, - '5': 12, - '9': 1, - '10': 'loginToken', - '17': true - }, - ], - '8': [ - {'1': '_invite_code'}, - {'1': '_login_token'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_GetAuthChallenge$json = { - '1': 'GetAuthChallenge', -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_GetUserIdByUsername$json = { - '1': 'GetUserIdByUsername', - '2': [ - {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_GetAuthToken$json = { - '1': 'GetAuthToken', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - {'1': 'response', '3': 2, '4': 1, '5': 12, '10': 'response'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_Authenticate$json = { - '1': 'Authenticate', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - {'1': 'auth_token', '3': 2, '4': 1, '5': 12, '10': 'authToken'}, - { - '1': 'app_version', - '3': 3, - '4': 1, - '5': 9, - '9': 0, - '10': 'appVersion', - '17': true - }, - { - '1': 'device_id', - '3': 4, - '4': 1, - '5': 3, - '9': 1, - '10': 'deviceId', - '17': true - }, - { - '1': 'in_background', - '3': 5, - '4': 1, - '5': 8, - '9': 2, - '10': 'inBackground', - '17': true - }, - ], - '8': [ - {'1': '_app_version'}, - {'1': '_device_id'}, - {'1': '_in_background'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_AuthenticateWithLoginToken$json = { - '1': 'AuthenticateWithLoginToken', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - { - '1': 'secret_login_token', - '3': 2, - '4': 1, - '5': 12, - '10': 'secretLoginToken' - }, - {'1': 'app_version', '3': 3, '4': 1, '5': 9, '10': 'appVersion'}, - {'1': 'device_id', '3': 4, '4': 1, '5': 3, '10': 'deviceId'}, - {'1': 'in_background', '3': 5, '4': 1, '5': 8, '10': 'inBackground'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_GetServerKeyForPasswordLessRecovery$json = { - '1': 'GetServerKeyForPasswordLessRecovery', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - { - '1': 'server_key_protection', - '3': 2, - '4': 1, - '5': 12, - '10': 'serverKeyProtection' - }, - { - '1': 'pin_unlock_token', - '3': 3, - '4': 1, - '5': 12, - '9': 0, - '10': 'pinUnlockToken', - '17': true - }, - { - '1': 'pin_protection_key', - '3': 4, - '4': 1, - '5': 12, - '9': 1, - '10': 'pinProtectionKey', - '17': true - }, - {'1': 'email', '3': 5, '4': 1, '5': 9, '9': 2, '10': 'email', '17': true}, - ], - '8': [ - {'1': '_pin_unlock_token'}, - {'1': '_pin_protection_key'}, - {'1': '_email'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_RegisterPasswordlessNotification$json = { - '1': 'RegisterPasswordlessNotification', - '2': [ - {'1': 'notification_id', '3': 1, '4': 1, '5': 9, '10': 'notificationId'}, - { - '1': 'download_auth_token', - '3': 2, - '4': 1, - '5': 12, - '10': 'downloadAuthToken' - }, - {'1': 'lang_code', '3': 3, '4': 1, '5': 9, '10': 'langCode'}, - { - '1': 'google_fcm', - '3': 4, - '4': 1, - '5': 9, - '9': 0, - '10': 'googleFcm', - '17': true - }, - ], - '8': [ - {'1': '_google_fcm'}, - ], -}; - -@$core.Deprecated('Use handshakeDescriptor instead') -const Handshake_CheckForPasswordlessNotification$json = { - '1': 'CheckForPasswordlessNotification', - '2': [ - {'1': 'notification_id', '3': 1, '4': 1, '5': 9, '10': 'notificationId'}, - { - '1': 'download_auth_token', - '3': 2, - '4': 1, - '5': 12, - '10': 'downloadAuthToken' - }, - { - '1': 'already_received_message_ids', - '3': 3, - '4': 3, - '5': 3, - '10': 'alreadyReceivedMessageIds' - }, - ], -}; - -/// Descriptor for `Handshake`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List handshakeDescriptor = $convert.base64Decode( - 'CglIYW5kc2hha2USQgoIcmVnaXN0ZXIYASABKAsyJC5jbGllbnRfdG9fc2VydmVyLkhhbmRzaG' - 'FrZS5SZWdpc3RlckgAUghyZWdpc3RlchJaChBnZXRBdXRoQ2hhbGxlbmdlGAIgASgLMiwuY2xp' - 'ZW50X3RvX3NlcnZlci5IYW5kc2hha2UuR2V0QXV0aENoYWxsZW5nZUgAUhBnZXRBdXRoQ2hhbG' - 'xlbmdlEk4KDGdldEF1dGhUb2tlbhgDIAEoCzIoLmNsaWVudF90b19zZXJ2ZXIuSGFuZHNoYWtl' - 'LkdldEF1dGhUb2tlbkgAUgxnZXRBdXRoVG9rZW4STgoMYXV0aGVudGljYXRlGAQgASgLMiguY2' - 'xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuQXV0aGVudGljYXRlSABSDGF1dGhlbnRpY2F0ZRJI' - 'CgpyZXF1ZXN0UE9XGAUgASgLMiYuY2xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuUmVxdWVzdF' - 'BPV0gAUgpyZXF1ZXN0UE9XEnsKHWF1dGhlbnRpY2F0ZV93aXRoX2xvZ2luX3Rva2VuGAYgASgL' - 'MjYuY2xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuQXV0aGVudGljYXRlV2l0aExvZ2luVG9rZW' - '5IAFIaYXV0aGVudGljYXRlV2l0aExvZ2luVG9rZW4SZgoWZ2V0X3VzZXJpZF9ieV91c2VybmFt' - 'ZRgHIAEoCzIvLmNsaWVudF90b19zZXJ2ZXIuSGFuZHNoYWtlLkdldFVzZXJJZEJ5VXNlcm5hbW' - 'VIAFITZ2V0VXNlcmlkQnlVc2VybmFtZRKYAQooZ2V0X3NlcnZlcl9rZXlfZm9yX3Bhc3N3b3Jk' - 'bGVzc19yZWNvdmVyeRgIIAEoCzI/LmNsaWVudF90b19zZXJ2ZXIuSGFuZHNoYWtlLkdldFNlcn' - 'ZlcktleUZvclBhc3N3b3JkTGVzc1JlY292ZXJ5SABSI2dldFNlcnZlcktleUZvclBhc3N3b3Jk' - 'bGVzc1JlY292ZXJ5EowBCiJyZWdpc3Rlcl9wYXNzd29yZGxlc3Nfbm90aWZpY2F0aW9uGAkgAS' - 'gLMjwuY2xpZW50X3RvX3NlcnZlci5IYW5kc2hha2UuUmVnaXN0ZXJQYXNzd29yZGxlc3NOb3Rp' - 'ZmljYXRpb25IAFIgcmVnaXN0ZXJQYXNzd29yZGxlc3NOb3RpZmljYXRpb24SjQEKI2NoZWNrX2' - 'Zvcl9wYXNzd29yZGxlc3Nfbm90aWZpY2F0aW9uGAogASgLMjwuY2xpZW50X3RvX3NlcnZlci5I' - 'YW5kc2hha2UuQ2hlY2tGb3JQYXNzd29yZGxlc3NOb3RpZmljYXRpb25IAFIgY2hlY2tGb3JQYX' - 'Nzd29yZGxlc3NOb3RpZmljYXRpb24aDAoKUmVxdWVzdFBPVxrKAwoIUmVnaXN0ZXISGgoIdXNl' - 'cm5hbWUYASABKAlSCHVzZXJuYW1lEiQKC2ludml0ZV9jb2RlGAIgASgJSABSCmludml0ZUNvZG' - 'WIAQESLgoTcHVibGljX2lkZW50aXR5X2tleRgDIAEoDFIRcHVibGljSWRlbnRpdHlLZXkSIwoN' - 'c2lnbmVkX3ByZWtleRgEIAEoDFIMc2lnbmVkUHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbm' - 'F0dXJlGAUgASgMUhVzaWduZWRQcmVrZXlTaWduYXR1cmUSKAoQc2lnbmVkX3ByZWtleV9pZBgG' - 'IAEoA1IOc2lnbmVkUHJla2V5SWQSJwoPcmVnaXN0cmF0aW9uX2lkGAcgASgDUg5yZWdpc3RyYX' - 'Rpb25JZBIVCgZpc19pb3MYCCABKAhSBWlzSW9zEhsKCWxhbmdfY29kZRgJIAEoCVIIbGFuZ0Nv' - 'ZGUSIgoNcHJvb2Zfb2Zfd29yaxgKIAEoA1ILcHJvb2ZPZldvcmsSJAoLbG9naW5fdG9rZW4YCy' - 'ABKAxIAVIKbG9naW5Ub2tlbogBAUIOCgxfaW52aXRlX2NvZGVCDgoMX2xvZ2luX3Rva2VuGhIK' - 'EEdldEF1dGhDaGFsbGVuZ2UaMQoTR2V0VXNlcklkQnlVc2VybmFtZRIaCgh1c2VybmFtZRgBIA' - 'EoCVIIdXNlcm5hbWUaQwoMR2V0QXV0aFRva2VuEhcKB3VzZXJfaWQYASABKANSBnVzZXJJZBIa' - 'CghyZXNwb25zZRgCIAEoDFIIcmVzcG9uc2Ua6AEKDEF1dGhlbnRpY2F0ZRIXCgd1c2VyX2lkGA' - 'EgASgDUgZ1c2VySWQSHQoKYXV0aF90b2tlbhgCIAEoDFIJYXV0aFRva2VuEiQKC2FwcF92ZXJz' - 'aW9uGAMgASgJSABSCmFwcFZlcnNpb26IAQESIAoJZGV2aWNlX2lkGAQgASgDSAFSCGRldmljZU' - 'lkiAEBEigKDWluX2JhY2tncm91bmQYBSABKAhIAlIMaW5CYWNrZ3JvdW5kiAEBQg4KDF9hcHBf' - 'dmVyc2lvbkIMCgpfZGV2aWNlX2lkQhAKDl9pbl9iYWNrZ3JvdW5kGsYBChpBdXRoZW50aWNhdG' - 'VXaXRoTG9naW5Ub2tlbhIXCgd1c2VyX2lkGAEgASgDUgZ1c2VySWQSLAoSc2VjcmV0X2xvZ2lu' - 'X3Rva2VuGAIgASgMUhBzZWNyZXRMb2dpblRva2VuEh8KC2FwcF92ZXJzaW9uGAMgASgJUgphcH' - 'BWZXJzaW9uEhsKCWRldmljZV9pZBgEIAEoA1IIZGV2aWNlSWQSIwoNaW5fYmFja2dyb3VuZBgF' - 'IAEoCFIMaW5CYWNrZ3JvdW5kGqUCCiNHZXRTZXJ2ZXJLZXlGb3JQYXNzd29yZExlc3NSZWNvdm' - 'VyeRIXCgd1c2VyX2lkGAEgASgDUgZ1c2VySWQSMgoVc2VydmVyX2tleV9wcm90ZWN0aW9uGAIg' - 'ASgMUhNzZXJ2ZXJLZXlQcm90ZWN0aW9uEi0KEHBpbl91bmxvY2tfdG9rZW4YAyABKAxIAFIOcG' - 'luVW5sb2NrVG9rZW6IAQESMQoScGluX3Byb3RlY3Rpb25fa2V5GAQgASgMSAFSEHBpblByb3Rl' - 'Y3Rpb25LZXmIAQESGQoFZW1haWwYBSABKAlIAlIFZW1haWyIAQFCEwoRX3Bpbl91bmxvY2tfdG' - '9rZW5CFQoTX3Bpbl9wcm90ZWN0aW9uX2tleUIICgZfZW1haWwaywEKIFJlZ2lzdGVyUGFzc3dv' - 'cmRsZXNzTm90aWZpY2F0aW9uEicKD25vdGlmaWNhdGlvbl9pZBgBIAEoCVIObm90aWZpY2F0aW' - '9uSWQSLgoTZG93bmxvYWRfYXV0aF90b2tlbhgCIAEoDFIRZG93bmxvYWRBdXRoVG9rZW4SGwoJ' - 'bGFuZ19jb2RlGAMgASgJUghsYW5nQ29kZRIiCgpnb29nbGVfZmNtGAQgASgJSABSCWdvb2dsZU' - 'ZjbYgBAUINCgtfZ29vZ2xlX2ZjbRq8AQogQ2hlY2tGb3JQYXNzd29yZGxlc3NOb3RpZmljYXRp' - 'b24SJwoPbm90aWZpY2F0aW9uX2lkGAEgASgJUg5ub3RpZmljYXRpb25JZBIuChNkb3dubG9hZF' - '9hdXRoX3Rva2VuGAIgASgMUhFkb3dubG9hZEF1dGhUb2tlbhI/ChxhbHJlYWR5X3JlY2VpdmVk' - 'X21lc3NhZ2VfaWRzGAMgAygDUhlhbHJlYWR5UmVjZWl2ZWRNZXNzYWdlSWRzQgsKCUhhbmRzaG' - 'FrZQ=='); - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData$json = { - '1': 'ApplicationData', - '2': [ - { - '1': 'textMessage', - '3': 1, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.TextMessage', - '9': 0, - '10': 'textMessage' - }, - { - '1': 'getUserByUsername', - '3': 2, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetUserByUsername', - '9': 0, - '10': 'getUserByUsername' - }, - { - '1': 'getPrekeysByUserId', - '3': 3, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetPrekeysByUserId', - '9': 0, - '10': 'getPrekeysByUserId' - }, - { - '1': 'getUserById', - '3': 6, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetUserById', - '9': 0, - '10': 'getUserById' - }, - { - '1': 'updateGoogleFcmToken', - '3': 8, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.UpdateGoogleFcmToken', - '9': 0, - '10': 'updateGoogleFcmToken' - }, - { - '1': 'getCurrentPlanInfos', - '3': 10, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetCurrentPlanInfos', - '9': 0, - '10': 'getCurrentPlanInfos' - }, - { - '1': 'getAvailablePlans', - '3': 12, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetAvailablePlans', - '9': 0, - '10': 'getAvailablePlans' - }, - { - '1': 'downloadDone', - '3': 20, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.DownloadDone', - '9': 0, - '10': 'downloadDone' - }, - { - '1': 'getSignedPrekeyByUserid', - '3': 22, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetSignedPreKeyByUserId', - '9': 0, - '10': 'getSignedPrekeyByUserid' - }, - { - '1': 'updateSignedPrekey', - '3': 23, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.UpdateSignedPreKey', - '9': 0, - '10': 'updateSignedPrekey' - }, - { - '1': 'deleteAccount', - '3': 24, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.DeleteAccount', - '9': 0, - '10': 'deleteAccount' - }, - { - '1': 'reportUser', - '3': 25, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.ReportUser', - '9': 0, - '10': 'reportUser' - }, - { - '1': 'changeUsername', - '3': 26, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.ChangeUsername', - '9': 0, - '10': 'changeUsername' - }, - { - '1': 'ipaPurchase', - '3': 27, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.IPAPurchase', - '9': 0, - '10': 'ipaPurchase' - }, - { - '1': 'ipaForceCheck', - '3': 28, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.IPAForceCheck', - '9': 0, - '10': 'ipaForceCheck' - }, - { - '1': 'removeAdditionalUser', - '3': 18, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.RemoveAdditionalUser', - '9': 0, - '10': 'removeAdditionalUser' - }, - { - '1': 'addAdditionalUser', - '3': 29, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.AddAdditionalUser', - '9': 0, - '10': 'addAdditionalUser' - }, - { - '1': 'set_login_token', - '3': 30, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.SetLoginToken', - '9': 0, - '10': 'setLoginToken' - }, - { - '1': 'register_passwordless_recovery', - '3': 31, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.RegisterPasswordLessRecovery', - '9': 0, - '10': 'registerPasswordlessRecovery' - }, - { - '1': 'passwordless_notification', - '3': 32, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.PasswordlessNotification', - '9': 0, - '10': 'passwordlessNotification' - }, - { - '1': 'request_memories_upload', - '3': 33, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.RequestMemoriesUpload', - '9': 0, - '10': 'requestMemoriesUpload' - }, - { - '1': 'confirm_memories_upload', - '3': 34, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.ConfirmMemoriesUpload', - '9': 0, - '10': 'confirmMemoriesUpload' - }, - { - '1': 'get_memories_list', - '3': 35, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetMemoriesList', - '9': 0, - '10': 'getMemoriesList' - }, - { - '1': 'get_memories_url', - '3': 36, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetMemoriesUrl', - '9': 0, - '10': 'getMemoriesUrl' - }, - { - '1': 'get_memories_usage', - '3': 37, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetMemoriesUsage', - '9': 0, - '10': 'getMemoriesUsage' - }, - { - '1': 'delete_memory', - '3': 38, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.DeleteMemory', - '9': 0, - '10': 'deleteMemory' - }, - { - '1': 'disable_memories_backup', - '3': 39, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.DisableMemoriesBackup', - '9': 0, - '10': 'disableMemoriesBackup' - }, - { - '1': 'upload_pqc_prekeys', - '3': 40, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.UploadPqcPreKeys', - '9': 0, - '10': 'uploadPqcPrekeys' - }, - { - '1': 'get_privacy_pass_parameters', - '3': 41, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.GetPrivacyPassParameters', - '9': 0, - '10': 'getPrivacyPassParameters' - }, - { - '1': 'issue_privacy_pass_tokens', - '3': 42, - '4': 1, - '5': 11, - '6': '.client_to_server.ApplicationData.IssuePrivacyPassTokens', - '9': 0, - '10': 'issuePrivacyPassTokens' - }, - ], - '3': [ - ApplicationData_TextMessage$json, - ApplicationData_GetUserByUsername$json, - ApplicationData_ChangeUsername$json, - ApplicationData_UpdateGoogleFcmToken$json, - ApplicationData_GetUserById$json, - ApplicationData_GetAvailablePlans$json, - ApplicationData_GetCurrentPlanInfos$json, - ApplicationData_RemoveAdditionalUser$json, - ApplicationData_GetPrekeysByUserId$json, - ApplicationData_GetSignedPreKeyByUserId$json, - ApplicationData_UpdateSignedPreKey$json, - ApplicationData_PqcPreKey$json, - ApplicationData_UploadPqcPreKeys$json, - ApplicationData_DownloadDone$json, - ApplicationData_ReportUser$json, - ApplicationData_IPAPurchase$json, - ApplicationData_IPAForceCheck$json, - ApplicationData_DeleteAccount$json, - ApplicationData_AddAdditionalUser$json, - ApplicationData_SetLoginToken$json, - ApplicationData_RegisterPasswordLessRecovery$json, - ApplicationData_PasswordlessNotification$json, - ApplicationData_RequestMemoriesUpload$json, - ApplicationData_ConfirmMemoriesUpload$json, - ApplicationData_GetMemoriesList$json, - ApplicationData_GetMemoriesUrl$json, - ApplicationData_GetMemoriesUsage$json, - ApplicationData_DeleteMemory$json, - ApplicationData_DisableMemoriesBackup$json, - ApplicationData_GetPrivacyPassParameters$json, - ApplicationData_IssuePrivacyPassTokens$json - ], - '8': [ - {'1': 'ApplicationData'}, - ], - '9': [ - {'1': 9, '2': 10}, - {'1': 11, '2': 12}, - {'1': 13, '2': 18}, - {'1': 19, '2': 20}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_TextMessage$json = { - '1': 'TextMessage', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - {'1': 'body', '3': 3, '4': 1, '5': 12, '10': 'body'}, - { - '1': 'push_data', - '3': 4, - '4': 1, - '5': 12, - '9': 0, - '10': 'pushData', - '17': true - }, - ], - '8': [ - {'1': '_push_data'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetUserByUsername$json = { - '1': 'GetUserByUsername', - '2': [ - {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_ChangeUsername$json = { - '1': 'ChangeUsername', - '2': [ - {'1': 'username', '3': 1, '4': 1, '5': 9, '10': 'username'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_UpdateGoogleFcmToken$json = { - '1': 'UpdateGoogleFcmToken', - '2': [ - {'1': 'google_fcm', '3': 1, '4': 1, '5': 9, '10': 'googleFcm'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetUserById$json = { - '1': 'GetUserById', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetAvailablePlans$json = { - '1': 'GetAvailablePlans', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetCurrentPlanInfos$json = { - '1': 'GetCurrentPlanInfos', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_RemoveAdditionalUser$json = { - '1': 'RemoveAdditionalUser', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetPrekeysByUserId$json = { - '1': 'GetPrekeysByUserId', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetSignedPreKeyByUserId$json = { - '1': 'GetSignedPreKeyByUserId', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_UpdateSignedPreKey$json = { - '1': 'UpdateSignedPreKey', - '2': [ - {'1': 'signed_prekey_id', '3': 1, '4': 1, '5': 3, '10': 'signedPrekeyId'}, - {'1': 'signed_prekey', '3': 2, '4': 1, '5': 12, '10': 'signedPrekey'}, - { - '1': 'signed_prekey_signature', - '3': 3, - '4': 1, - '5': 12, - '10': 'signedPrekeySignature' - }, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_PqcPreKey$json = { - '1': 'PqcPreKey', - '2': [ - {'1': 'ecc_pre_key_id', '3': 1, '4': 1, '5': 3, '10': 'eccPreKeyId'}, - {'1': 'ecc_pre_key', '3': 2, '4': 1, '5': 12, '10': 'eccPreKey'}, - {'1': 'kyber_pre_key_id', '3': 3, '4': 1, '5': 3, '10': 'kyberPreKeyId'}, - {'1': 'kyber_pre_key', '3': 4, '4': 1, '5': 12, '10': 'kyberPreKey'}, - { - '1': 'kyber_pre_key_signature', - '3': 5, - '4': 1, - '5': 12, - '10': 'kyberPreKeySignature' - }, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_UploadPqcPreKeys$json = { - '1': 'UploadPqcPreKeys', - '2': [ - { - '1': 'ecc_signed_prekey_id', - '3': 1, - '4': 1, - '5': 3, - '10': 'eccSignedPrekeyId' - }, - { - '1': 'ecc_signed_prekey', - '3': 2, - '4': 1, - '5': 12, - '10': 'eccSignedPrekey' - }, - { - '1': 'ecc_signed_prekey_signature', - '3': 3, - '4': 1, - '5': 12, - '10': 'eccSignedPrekeySignature' - }, - { - '1': 'kyber_signed_prekey_id', - '3': 4, - '4': 1, - '5': 3, - '10': 'kyberSignedPrekeyId' - }, - { - '1': 'kyber_signed_prekey', - '3': 5, - '4': 1, - '5': 12, - '10': 'kyberSignedPrekey' - }, - { - '1': 'kyber_signed_prekey_signature', - '3': 6, - '4': 1, - '5': 12, - '10': 'kyberSignedPrekeySignature' - }, - { - '1': 'prekeys', - '3': 7, - '4': 3, - '5': 11, - '6': '.client_to_server.ApplicationData.PqcPreKey', - '10': 'prekeys' - }, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_DownloadDone$json = { - '1': 'DownloadDone', - '2': [ - {'1': 'download_token', '3': 1, '4': 1, '5': 12, '10': 'downloadToken'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_ReportUser$json = { - '1': 'ReportUser', - '2': [ - {'1': 'reported_user_id', '3': 1, '4': 1, '5': 3, '10': 'reportedUserId'}, - {'1': 'reason', '3': 2, '4': 1, '5': 9, '10': 'reason'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_IPAPurchase$json = { - '1': 'IPAPurchase', - '2': [ - {'1': 'product_id', '3': 1, '4': 1, '5': 9, '10': 'productId'}, - {'1': 'source', '3': 2, '4': 1, '5': 9, '10': 'source'}, - { - '1': 'verification_data', - '3': 3, - '4': 1, - '5': 9, - '10': 'verificationData' - }, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_IPAForceCheck$json = { - '1': 'IPAForceCheck', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_DeleteAccount$json = { - '1': 'DeleteAccount', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_AddAdditionalUser$json = { - '1': 'AddAdditionalUser', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_SetLoginToken$json = { - '1': 'SetLoginToken', - '2': [ - {'1': 'login_token', '3': 1, '4': 1, '5': 12, '10': 'loginToken'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_RegisterPasswordLessRecovery$json = { - '1': 'RegisterPasswordLessRecovery', - '2': [ - { - '1': 'encryptedServerKey', - '3': 1, - '4': 1, - '5': 12, - '10': 'encryptedServerKey' - }, - { - '1': 'pinUnlockToken', - '3': 2, - '4': 1, - '5': 12, - '9': 0, - '10': 'pinUnlockToken', - '17': true - }, - ], - '8': [ - {'1': '_pinUnlockToken'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_PasswordlessNotification$json = { - '1': 'PasswordlessNotification', - '2': [ - {'1': 'notification_id', '3': 1, '4': 1, '5': 9, '10': 'notificationId'}, - { - '1': 'encrypted_message', - '3': 2, - '4': 1, - '5': 12, - '10': 'encryptedMessage' - }, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_RequestMemoriesUpload$json = { - '1': 'RequestMemoriesUpload', - '2': [ - {'1': 'size', '3': 1, '4': 1, '5': 3, '10': 'size'}, - {'1': 'original_date', '3': 2, '4': 1, '5': 3, '10': 'originalDate'}, - {'1': 'media_id', '3': 3, '4': 1, '5': 9, '10': 'mediaId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_ConfirmMemoriesUpload$json = { - '1': 'ConfirmMemoriesUpload', - '2': [ - {'1': 'media_id', '3': 1, '4': 1, '5': 9, '10': 'mediaId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetMemoriesList$json = { - '1': 'GetMemoriesList', - '2': [ - {'1': 'offset_date', '3': 1, '4': 1, '5': 3, '10': 'offsetDate'}, - {'1': 'limit', '3': 2, '4': 1, '5': 3, '10': 'limit'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetMemoriesUrl$json = { - '1': 'GetMemoriesUrl', - '2': [ - {'1': 'media_id', '3': 1, '4': 1, '5': 9, '10': 'mediaId'}, - {'1': 'thumbnail', '3': 2, '4': 1, '5': 8, '10': 'thumbnail'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetMemoriesUsage$json = { - '1': 'GetMemoriesUsage', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_DeleteMemory$json = { - '1': 'DeleteMemory', - '2': [ - {'1': 'media_id', '3': 1, '4': 1, '5': 9, '10': 'mediaId'}, - ], -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_DisableMemoriesBackup$json = { - '1': 'DisableMemoriesBackup', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_GetPrivacyPassParameters$json = { - '1': 'GetPrivacyPassParameters', -}; - -@$core.Deprecated('Use applicationDataDescriptor instead') -const ApplicationData_IssuePrivacyPassTokens$json = { - '1': 'IssuePrivacyPassTokens', - '2': [ - {'1': 'token_requests', '3': 1, '4': 3, '5': 12, '10': 'tokenRequests'}, - ], -}; - -/// Descriptor for `ApplicationData`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List applicationDataDescriptor = $convert.base64Decode( - 'Cg9BcHBsaWNhdGlvbkRhdGESUQoLdGV4dE1lc3NhZ2UYASABKAsyLS5jbGllbnRfdG9fc2Vydm' - 'VyLkFwcGxpY2F0aW9uRGF0YS5UZXh0TWVzc2FnZUgAUgt0ZXh0TWVzc2FnZRJjChFnZXRVc2Vy' - 'QnlVc2VybmFtZRgCIAEoCzIzLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkdldF' - 'VzZXJCeVVzZXJuYW1lSABSEWdldFVzZXJCeVVzZXJuYW1lEmYKEmdldFByZWtleXNCeVVzZXJJ' - 'ZBgDIAEoCzI0LmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkdldFByZWtleXNCeV' - 'VzZXJJZEgAUhJnZXRQcmVrZXlzQnlVc2VySWQSUQoLZ2V0VXNlckJ5SWQYBiABKAsyLS5jbGll' - 'bnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRVc2VyQnlJZEgAUgtnZXRVc2VyQnlJZB' - 'JsChR1cGRhdGVHb29nbGVGY21Ub2tlbhgIIAEoCzI2LmNsaWVudF90b19zZXJ2ZXIuQXBwbGlj' - 'YXRpb25EYXRhLlVwZGF0ZUdvb2dsZUZjbVRva2VuSABSFHVwZGF0ZUdvb2dsZUZjbVRva2VuEm' - 'kKE2dldEN1cnJlbnRQbGFuSW5mb3MYCiABKAsyNS5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0' - 'aW9uRGF0YS5HZXRDdXJyZW50UGxhbkluZm9zSABSE2dldEN1cnJlbnRQbGFuSW5mb3MSYwoRZ2' - 'V0QXZhaWxhYmxlUGxhbnMYDCABKAsyMy5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0' - 'YS5HZXRBdmFpbGFibGVQbGFuc0gAUhFnZXRBdmFpbGFibGVQbGFucxJUCgxkb3dubG9hZERvbm' - 'UYFCABKAsyLi5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5Eb3dubG9hZERvbmVI' - 'AFIMZG93bmxvYWREb25lEnUKF2dldFNpZ25lZFByZWtleUJ5VXNlcmlkGBYgASgLMjkuY2xpZW' - '50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGEuR2V0U2lnbmVkUHJlS2V5QnlVc2VySWRIAFIX' - 'Z2V0U2lnbmVkUHJla2V5QnlVc2VyaWQSZgoSdXBkYXRlU2lnbmVkUHJla2V5GBcgASgLMjQuY2' - 'xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGEuVXBkYXRlU2lnbmVkUHJlS2V5SABSEnVw' - 'ZGF0ZVNpZ25lZFByZWtleRJXCg1kZWxldGVBY2NvdW50GBggASgLMi8uY2xpZW50X3RvX3Nlcn' - 'Zlci5BcHBsaWNhdGlvbkRhdGEuRGVsZXRlQWNjb3VudEgAUg1kZWxldGVBY2NvdW50Ek4KCnJl' - 'cG9ydFVzZXIYGSABKAsyLC5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5SZXBvcn' - 'RVc2VySABSCnJlcG9ydFVzZXISWgoOY2hhbmdlVXNlcm5hbWUYGiABKAsyMC5jbGllbnRfdG9f' - 'c2VydmVyLkFwcGxpY2F0aW9uRGF0YS5DaGFuZ2VVc2VybmFtZUgAUg5jaGFuZ2VVc2VybmFtZR' - 'JRCgtpcGFQdXJjaGFzZRgbIAEoCzItLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRh' - 'LklQQVB1cmNoYXNlSABSC2lwYVB1cmNoYXNlElcKDWlwYUZvcmNlQ2hlY2sYHCABKAsyLy5jbG' - 'llbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5JUEFGb3JjZUNoZWNrSABSDWlwYUZvcmNl' - 'Q2hlY2sSbAoUcmVtb3ZlQWRkaXRpb25hbFVzZXIYEiABKAsyNi5jbGllbnRfdG9fc2VydmVyLk' - 'FwcGxpY2F0aW9uRGF0YS5SZW1vdmVBZGRpdGlvbmFsVXNlckgAUhRyZW1vdmVBZGRpdGlvbmFs' - 'VXNlchJjChFhZGRBZGRpdGlvbmFsVXNlchgdIAEoCzIzLmNsaWVudF90b19zZXJ2ZXIuQXBwbG' - 'ljYXRpb25EYXRhLkFkZEFkZGl0aW9uYWxVc2VySABSEWFkZEFkZGl0aW9uYWxVc2VyElkKD3Nl' - 'dF9sb2dpbl90b2tlbhgeIAEoCzIvLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLl' - 'NldExvZ2luVG9rZW5IAFINc2V0TG9naW5Ub2tlbhKGAQoecmVnaXN0ZXJfcGFzc3dvcmRsZXNz' - 'X3JlY292ZXJ5GB8gASgLMj4uY2xpZW50X3RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGEuUmVnaX' - 'N0ZXJQYXNzd29yZExlc3NSZWNvdmVyeUgAUhxyZWdpc3RlclBhc3N3b3JkbGVzc1JlY292ZXJ5' - 'EnkKGXBhc3N3b3JkbGVzc19ub3RpZmljYXRpb24YICABKAsyOi5jbGllbnRfdG9fc2VydmVyLk' - 'FwcGxpY2F0aW9uRGF0YS5QYXNzd29yZGxlc3NOb3RpZmljYXRpb25IAFIYcGFzc3dvcmRsZXNz' - 'Tm90aWZpY2F0aW9uEnEKF3JlcXVlc3RfbWVtb3JpZXNfdXBsb2FkGCEgASgLMjcuY2xpZW50X3' - 'RvX3NlcnZlci5BcHBsaWNhdGlvbkRhdGEuUmVxdWVzdE1lbW9yaWVzVXBsb2FkSABSFXJlcXVl' - 'c3RNZW1vcmllc1VwbG9hZBJxChdjb25maXJtX21lbW9yaWVzX3VwbG9hZBgiIAEoCzI3LmNsaW' - 'VudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkNvbmZpcm1NZW1vcmllc1VwbG9hZEgAUhVj' - 'b25maXJtTWVtb3JpZXNVcGxvYWQSXwoRZ2V0X21lbW9yaWVzX2xpc3QYIyABKAsyMS5jbGllbn' - 'RfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRNZW1vcmllc0xpc3RIAFIPZ2V0TWVtb3Jp' - 'ZXNMaXN0ElwKEGdldF9tZW1vcmllc191cmwYJCABKAsyMC5jbGllbnRfdG9fc2VydmVyLkFwcG' - 'xpY2F0aW9uRGF0YS5HZXRNZW1vcmllc1VybEgAUg5nZXRNZW1vcmllc1VybBJiChJnZXRfbWVt' - 'b3JpZXNfdXNhZ2UYJSABKAsyMi5jbGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5HZX' - 'RNZW1vcmllc1VzYWdlSABSEGdldE1lbW9yaWVzVXNhZ2USVQoNZGVsZXRlX21lbW9yeRgmIAEo' - 'CzIuLmNsaWVudF90b19zZXJ2ZXIuQXBwbGljYXRpb25EYXRhLkRlbGV0ZU1lbW9yeUgAUgxkZW' - 'xldGVNZW1vcnkScQoXZGlzYWJsZV9tZW1vcmllc19iYWNrdXAYJyABKAsyNy5jbGllbnRfdG9f' - 'c2VydmVyLkFwcGxpY2F0aW9uRGF0YS5EaXNhYmxlTWVtb3JpZXNCYWNrdXBIAFIVZGlzYWJsZU' - '1lbW9yaWVzQmFja3VwEmIKEnVwbG9hZF9wcWNfcHJla2V5cxgoIAEoCzIyLmNsaWVudF90b19z' - 'ZXJ2ZXIuQXBwbGljYXRpb25EYXRhLlVwbG9hZFBxY1ByZUtleXNIAFIQdXBsb2FkUHFjUHJla2' - 'V5cxJ7ChtnZXRfcHJpdmFjeV9wYXNzX3BhcmFtZXRlcnMYKSABKAsyOi5jbGllbnRfdG9fc2Vy' - 'dmVyLkFwcGxpY2F0aW9uRGF0YS5HZXRQcml2YWN5UGFzc1BhcmFtZXRlcnNIAFIYZ2V0UHJpdm' - 'FjeVBhc3NQYXJhbWV0ZXJzEnUKGWlzc3VlX3ByaXZhY3lfcGFzc190b2tlbnMYKiABKAsyOC5j' - 'bGllbnRfdG9fc2VydmVyLkFwcGxpY2F0aW9uRGF0YS5Jc3N1ZVByaXZhY3lQYXNzVG9rZW5zSA' - 'BSFmlzc3VlUHJpdmFjeVBhc3NUb2tlbnMaagoLVGV4dE1lc3NhZ2USFwoHdXNlcl9pZBgBIAEo' - 'A1IGdXNlcklkEhIKBGJvZHkYAyABKAxSBGJvZHkSIAoJcHVzaF9kYXRhGAQgASgMSABSCHB1c2' - 'hEYXRhiAEBQgwKCl9wdXNoX2RhdGEaLwoRR2V0VXNlckJ5VXNlcm5hbWUSGgoIdXNlcm5hbWUY' - 'ASABKAlSCHVzZXJuYW1lGiwKDkNoYW5nZVVzZXJuYW1lEhoKCHVzZXJuYW1lGAEgASgJUgh1c2' - 'VybmFtZRo1ChRVcGRhdGVHb29nbGVGY21Ub2tlbhIdCgpnb29nbGVfZmNtGAEgASgJUglnb29n' - 'bGVGY20aJgoLR2V0VXNlckJ5SWQSFwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGhMKEUdldEF2YW' - 'lsYWJsZVBsYW5zGhUKE0dldEN1cnJlbnRQbGFuSW5mb3MaLwoUUmVtb3ZlQWRkaXRpb25hbFVz' - 'ZXISFwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGi0KEkdldFByZWtleXNCeVVzZXJJZBIXCgd1c2' - 'VyX2lkGAEgASgDUgZ1c2VySWQaMgoXR2V0U2lnbmVkUHJlS2V5QnlVc2VySWQSFwoHdXNlcl9p' - 'ZBgBIAEoA1IGdXNlcklkGpsBChJVcGRhdGVTaWduZWRQcmVLZXkSKAoQc2lnbmVkX3ByZWtleV' - '9pZBgBIAEoA1IOc2lnbmVkUHJla2V5SWQSIwoNc2lnbmVkX3ByZWtleRgCIAEoDFIMc2lnbmVk' - 'UHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMgASgMUhVzaWduZWRQcmVrZXlTaW' - 'duYXR1cmUa1AEKCVBxY1ByZUtleRIjCg5lY2NfcHJlX2tleV9pZBgBIAEoA1ILZWNjUHJlS2V5' - 'SWQSHgoLZWNjX3ByZV9rZXkYAiABKAxSCWVjY1ByZUtleRInChBreWJlcl9wcmVfa2V5X2lkGA' - 'MgASgDUg1reWJlclByZUtleUlkEiIKDWt5YmVyX3ByZV9rZXkYBCABKAxSC2t5YmVyUHJlS2V5' - 'EjUKF2t5YmVyX3ByZV9rZXlfc2lnbmF0dXJlGAUgASgMUhRreWJlclByZUtleVNpZ25hdHVyZR' - 'qdAwoQVXBsb2FkUHFjUHJlS2V5cxIvChRlY2Nfc2lnbmVkX3ByZWtleV9pZBgBIAEoA1IRZWNj' - 'U2lnbmVkUHJla2V5SWQSKgoRZWNjX3NpZ25lZF9wcmVrZXkYAiABKAxSD2VjY1NpZ25lZFByZW' - 'tleRI9ChtlY2Nfc2lnbmVkX3ByZWtleV9zaWduYXR1cmUYAyABKAxSGGVjY1NpZ25lZFByZWtl' - 'eVNpZ25hdHVyZRIzChZreWJlcl9zaWduZWRfcHJla2V5X2lkGAQgASgDUhNreWJlclNpZ25lZF' - 'ByZWtleUlkEi4KE2t5YmVyX3NpZ25lZF9wcmVrZXkYBSABKAxSEWt5YmVyU2lnbmVkUHJla2V5' - 'EkEKHWt5YmVyX3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAYgASgMUhpreWJlclNpZ25lZFByZW' - 'tleVNpZ25hdHVyZRJFCgdwcmVrZXlzGAcgAygLMisuY2xpZW50X3RvX3NlcnZlci5BcHBsaWNh' - 'dGlvbkRhdGEuUHFjUHJlS2V5UgdwcmVrZXlzGjUKDERvd25sb2FkRG9uZRIlCg5kb3dubG9hZF' - '90b2tlbhgBIAEoDFINZG93bmxvYWRUb2tlbhpOCgpSZXBvcnRVc2VyEigKEHJlcG9ydGVkX3Vz' - 'ZXJfaWQYASABKANSDnJlcG9ydGVkVXNlcklkEhYKBnJlYXNvbhgCIAEoCVIGcmVhc29uGnEKC0' - 'lQQVB1cmNoYXNlEh0KCnByb2R1Y3RfaWQYASABKAlSCXByb2R1Y3RJZBIWCgZzb3VyY2UYAiAB' - 'KAlSBnNvdXJjZRIrChF2ZXJpZmljYXRpb25fZGF0YRgDIAEoCVIQdmVyaWZpY2F0aW9uRGF0YR' - 'oPCg1JUEFGb3JjZUNoZWNrGg8KDURlbGV0ZUFjY291bnQaLAoRQWRkQWRkaXRpb25hbFVzZXIS' - 'FwoHdXNlcl9pZBgBIAEoA1IGdXNlcklkGjAKDVNldExvZ2luVG9rZW4SHwoLbG9naW5fdG9rZW' - '4YASABKAxSCmxvZ2luVG9rZW4ajgEKHFJlZ2lzdGVyUGFzc3dvcmRMZXNzUmVjb3ZlcnkSLgoS' - 'ZW5jcnlwdGVkU2VydmVyS2V5GAEgASgMUhJlbmNyeXB0ZWRTZXJ2ZXJLZXkSKwoOcGluVW5sb2' - 'NrVG9rZW4YAiABKAxIAFIOcGluVW5sb2NrVG9rZW6IAQFCEQoPX3BpblVubG9ja1Rva2VuGnAK' - 'GFBhc3N3b3JkbGVzc05vdGlmaWNhdGlvbhInCg9ub3RpZmljYXRpb25faWQYASABKAlSDm5vdG' - 'lmaWNhdGlvbklkEisKEWVuY3J5cHRlZF9tZXNzYWdlGAIgASgMUhBlbmNyeXB0ZWRNZXNzYWdl' - 'GmsKFVJlcXVlc3RNZW1vcmllc1VwbG9hZBISCgRzaXplGAEgASgDUgRzaXplEiMKDW9yaWdpbm' - 'FsX2RhdGUYAiABKANSDG9yaWdpbmFsRGF0ZRIZCghtZWRpYV9pZBgDIAEoCVIHbWVkaWFJZBoy' - 'ChVDb25maXJtTWVtb3JpZXNVcGxvYWQSGQoIbWVkaWFfaWQYASABKAlSB21lZGlhSWQaSAoPR2' - 'V0TWVtb3JpZXNMaXN0Eh8KC29mZnNldF9kYXRlGAEgASgDUgpvZmZzZXREYXRlEhQKBWxpbWl0' - 'GAIgASgDUgVsaW1pdBpJCg5HZXRNZW1vcmllc1VybBIZCghtZWRpYV9pZBgBIAEoCVIHbWVkaW' - 'FJZBIcCgl0aHVtYm5haWwYAiABKAhSCXRodW1ibmFpbBoSChBHZXRNZW1vcmllc1VzYWdlGikK' - 'DERlbGV0ZU1lbW9yeRIZCghtZWRpYV9pZBgBIAEoCVIHbWVkaWFJZBoXChVEaXNhYmxlTWVtb3' - 'JpZXNCYWNrdXAaGgoYR2V0UHJpdmFjeVBhc3NQYXJhbWV0ZXJzGj8KFklzc3VlUHJpdmFjeVBh' - 'c3NUb2tlbnMSJQoOdG9rZW5fcmVxdWVzdHMYASADKAxSDXRva2VuUmVxdWVzdHNCEQoPQXBwbG' - 'ljYXRpb25EYXRhSgQICRAKSgQICxAMSgQIDRASSgQIExAU'); - -@$core.Deprecated('Use responseDescriptor instead') -const Response$json = { - '1': 'Response', - '2': [ - { - '1': 'ok', - '3': 1, - '4': 1, - '5': 11, - '6': '.client_to_server.Response.Ok', - '9': 0, - '10': 'ok' - }, - { - '1': 'error', - '3': 2, - '4': 1, - '5': 14, - '6': '.error.ErrorCode', - '9': 0, - '10': 'error' - }, - ], - '3': [ - Response_PreKey$json, - Response_Prekeys$json, - Response_PqcPrekeys$json, - Response_Ok$json - ], - '8': [ - {'1': 'Response'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PreKey$json = { - '1': 'PreKey', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'}, - {'1': 'prekey', '3': 2, '4': 1, '5': 12, '10': 'prekey'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Prekeys$json = { - '1': 'Prekeys', - '2': [ - { - '1': 'prekeys', - '3': 1, - '4': 3, - '5': 11, - '6': '.client_to_server.Response.PreKey', - '10': 'prekeys' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PqcPrekeys$json = { - '1': 'PqcPrekeys', - '2': [ - { - '1': 'prekeys', - '3': 1, - '4': 3, - '5': 11, - '6': '.client_to_server.ApplicationData.PqcPreKey', - '10': 'prekeys' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Ok$json = { - '1': 'Ok', - '2': [ - {'1': 'None', '3': 1, '4': 1, '5': 8, '9': 0, '10': 'None'}, - { - '1': 'prekeys', - '3': 2, - '4': 1, - '5': 11, - '6': '.client_to_server.Response.Prekeys', - '9': 0, - '10': 'prekeys' - }, - { - '1': 'prekeys_pqc', - '3': 3, - '4': 1, - '5': 11, - '6': '.client_to_server.Response.PqcPrekeys', - '9': 0, - '10': 'prekeysPqc' - }, - ], - '8': [ - {'1': 'Ok'}, - ], -}; - -/// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( - 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLmNsaWVudF90b19zZXJ2ZXIuUmVzcG9uc2UuT2tIAF' - 'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3IaMAoGUHJlS2V5' - 'Eg4KAmlkGAEgASgDUgJpZBIWCgZwcmVrZXkYAiABKAxSBnByZWtleRpGCgdQcmVrZXlzEjsKB3' - 'ByZWtleXMYASADKAsyIS5jbGllbnRfdG9fc2VydmVyLlJlc3BvbnNlLlByZUtleVIHcHJla2V5' - 'cxpTCgpQcWNQcmVrZXlzEkUKB3ByZWtleXMYASADKAsyKy5jbGllbnRfdG9fc2VydmVyLkFwcG' - 'xpY2F0aW9uRGF0YS5QcWNQcmVLZXlSB3ByZWtleXMaqgEKAk9rEhQKBE5vbmUYASABKAhIAFIE' - 'Tm9uZRI+CgdwcmVrZXlzGAIgASgLMiIuY2xpZW50X3RvX3NlcnZlci5SZXNwb25zZS5QcmVrZX' - 'lzSABSB3ByZWtleXMSSAoLcHJla2V5c19wcWMYAyABKAsyJS5jbGllbnRfdG9fc2VydmVyLlJl' - 'c3BvbnNlLlBxY1ByZWtleXNIAFIKcHJla2V5c1BxY0IECgJPa0IKCghSZXNwb25zZQ=='); diff --git a/lib/src/model/protobuf/api/websocket/client_to_server.pbserver.dart b/lib/src/model/protobuf/api/websocket/client_to_server.pbserver.dart deleted file mode 100644 index 60eb1138..00000000 --- a/lib/src/model/protobuf/api/websocket/client_to_server.pbserver.dart +++ /dev/null @@ -1,13 +0,0 @@ -// -// Generated code. Do not modify. -// source: api/websocket/client_to_server.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'client_to_server.pb.dart'; diff --git a/lib/src/model/protobuf/api/websocket/error.pb.dart b/lib/src/model/protobuf/api/websocket/error.pb.dart deleted file mode 100644 index 9986e70c..00000000 --- a/lib/src/model/protobuf/api/websocket/error.pb.dart +++ /dev/null @@ -1,17 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/error.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports - -import 'dart:core' as $core; - -export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - -export 'error.pbenum.dart'; diff --git a/lib/src/model/protobuf/api/websocket/error.pbenum.dart b/lib/src/model/protobuf/api/websocket/error.pbenum.dart deleted file mode 100644 index 29107e9d..00000000 --- a/lib/src/model/protobuf/api/websocket/error.pbenum.dart +++ /dev/null @@ -1,153 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/error.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports - -import 'dart:core' as $core; - -import 'package:protobuf/protobuf.dart' as $pb; - -class ErrorCode extends $pb.ProtobufEnum { - static const ErrorCode Unknown = - ErrorCode._(0, _omitEnumNames ? '' : 'Unknown'); - static const ErrorCode BadRequest = - ErrorCode._(400, _omitEnumNames ? '' : 'BadRequest'); - static const ErrorCode TooManyRequests = - ErrorCode._(429, _omitEnumNames ? '' : 'TooManyRequests'); - static const ErrorCode InternalError = - ErrorCode._(500, _omitEnumNames ? '' : 'InternalError'); - static const ErrorCode InvalidInvitationCode = - ErrorCode._(1002, _omitEnumNames ? '' : 'InvalidInvitationCode'); - static const ErrorCode UsernameAlreadyTaken = - ErrorCode._(1003, _omitEnumNames ? '' : 'UsernameAlreadyTaken'); - static const ErrorCode SignatureNotValid = - ErrorCode._(1004, _omitEnumNames ? '' : 'SignatureNotValid'); - static const ErrorCode UsernameNotFound = - ErrorCode._(1005, _omitEnumNames ? '' : 'UsernameNotFound'); - static const ErrorCode UsernameNotValid = - ErrorCode._(1006, _omitEnumNames ? '' : 'UsernameNotValid'); - static const ErrorCode InvalidPublicKey = - ErrorCode._(1007, _omitEnumNames ? '' : 'InvalidPublicKey'); - static const ErrorCode SessionAlreadyAuthenticated = - ErrorCode._(1008, _omitEnumNames ? '' : 'SessionAlreadyAuthenticated'); - static const ErrorCode SessionNotAuthenticated = - ErrorCode._(1009, _omitEnumNames ? '' : 'SessionNotAuthenticated'); - static const ErrorCode OnlyOneSessionAllowed = - ErrorCode._(1010, _omitEnumNames ? '' : 'OnlyOneSessionAllowed'); - static const ErrorCode UploadLimitReached = - ErrorCode._(1011, _omitEnumNames ? '' : 'UploadLimitReached'); - static const ErrorCode InvalidUpdateToken = - ErrorCode._(1012, _omitEnumNames ? '' : 'InvalidUpdateToken'); - static const ErrorCode InvalidOffset = - ErrorCode._(1013, _omitEnumNames ? '' : 'InvalidOffset'); - static const ErrorCode InvalidGoogleFcmToken = - ErrorCode._(1014, _omitEnumNames ? '' : 'InvalidGoogleFcmToken'); - static const ErrorCode UploadTokenIsBlocked = - ErrorCode._(1015, _omitEnumNames ? '' : 'UploadTokenIsBlocked'); - static const ErrorCode UploadChecksumInvalid = - ErrorCode._(1016, _omitEnumNames ? '' : 'UploadChecksumInvalid'); - static const ErrorCode InvalidDownloadToken = - ErrorCode._(1017, _omitEnumNames ? '' : 'InvalidDownloadToken'); - static const ErrorCode ApiEndpointNotFound = - ErrorCode._(1018, _omitEnumNames ? '' : 'ApiEndpointNotFound'); - static const ErrorCode AuthTokenNotValid = - ErrorCode._(1019, _omitEnumNames ? '' : 'AuthTokenNotValid'); - static const ErrorCode InvalidPreKeys = - ErrorCode._(1020, _omitEnumNames ? '' : 'InvalidPreKeys'); - static const ErrorCode VoucherInValid = - ErrorCode._(1021, _omitEnumNames ? '' : 'VoucherInValid'); - static const ErrorCode PlanNotAllowed = - ErrorCode._(1022, _omitEnumNames ? '' : 'PlanNotAllowed'); - static const ErrorCode PlanLimitReached = - ErrorCode._(1023, _omitEnumNames ? '' : 'PlanLimitReached'); - static const ErrorCode NotEnoughCredit = - ErrorCode._(1024, _omitEnumNames ? '' : 'NotEnoughCredit'); - static const ErrorCode PlanDowngrade = - ErrorCode._(1025, _omitEnumNames ? '' : 'PlanDowngrade'); - static const ErrorCode PlanUpgradeNotYearly = - ErrorCode._(1026, _omitEnumNames ? '' : 'PlanUpgradeNotYearly'); - static const ErrorCode InvalidSignedPreKey = - ErrorCode._(1027, _omitEnumNames ? '' : 'InvalidSignedPreKey'); - static const ErrorCode UserIdNotFound = - ErrorCode._(1028, _omitEnumNames ? '' : 'UserIdNotFound'); - static const ErrorCode UserIdAlreadyTaken = - ErrorCode._(1029, _omitEnumNames ? '' : 'UserIdAlreadyTaken'); - static const ErrorCode AppVersionOutdated = - ErrorCode._(1030, _omitEnumNames ? '' : 'AppVersionOutdated'); - static const ErrorCode NewDeviceRegistered = - ErrorCode._(1031, _omitEnumNames ? '' : 'NewDeviceRegistered'); - static const ErrorCode InvalidProofOfWork = - ErrorCode._(1032, _omitEnumNames ? '' : 'InvalidProofOfWork'); - static const ErrorCode RegistrationDisabled = - ErrorCode._(1033, _omitEnumNames ? '' : 'RegistrationDisabled'); - static const ErrorCode IPAPaymentExpired = - ErrorCode._(1034, _omitEnumNames ? '' : 'IPAPaymentExpired'); - static const ErrorCode UserIsNotInFreePlan = - ErrorCode._(1035, _omitEnumNames ? '' : 'UserIsNotInFreePlan'); - static const ErrorCode ForegroundSessionConnected = - ErrorCode._(1036, _omitEnumNames ? '' : 'ForegroundSessionConnected'); - static const ErrorCode NoRecoveryData = - ErrorCode._(1037, _omitEnumNames ? '' : 'NoRecoveryData'); - static const ErrorCode InvalidRecoveryData = - ErrorCode._(1038, _omitEnumNames ? '' : 'InvalidRecoveryData'); - - static const $core.List values = [ - Unknown, - BadRequest, - TooManyRequests, - InternalError, - InvalidInvitationCode, - UsernameAlreadyTaken, - SignatureNotValid, - UsernameNotFound, - UsernameNotValid, - InvalidPublicKey, - SessionAlreadyAuthenticated, - SessionNotAuthenticated, - OnlyOneSessionAllowed, - UploadLimitReached, - InvalidUpdateToken, - InvalidOffset, - InvalidGoogleFcmToken, - UploadTokenIsBlocked, - UploadChecksumInvalid, - InvalidDownloadToken, - ApiEndpointNotFound, - AuthTokenNotValid, - InvalidPreKeys, - VoucherInValid, - PlanNotAllowed, - PlanLimitReached, - NotEnoughCredit, - PlanDowngrade, - PlanUpgradeNotYearly, - InvalidSignedPreKey, - UserIdNotFound, - UserIdAlreadyTaken, - AppVersionOutdated, - NewDeviceRegistered, - InvalidProofOfWork, - RegistrationDisabled, - IPAPaymentExpired, - UserIsNotInFreePlan, - ForegroundSessionConnected, - NoRecoveryData, - InvalidRecoveryData, - ]; - - static final $core.Map<$core.int, ErrorCode> _byValue = - $pb.ProtobufEnum.initByValue(values); - static ErrorCode? valueOf($core.int value) => _byValue[value]; - - const ErrorCode._(super.value, super.name); -} - -const $core.bool _omitEnumNames = - $core.bool.fromEnvironment('protobuf.omit_enum_names'); diff --git a/lib/src/model/protobuf/api/websocket/error.pbjson.dart b/lib/src/model/protobuf/api/websocket/error.pbjson.dart deleted file mode 100644 index f1b421ab..00000000 --- a/lib/src/model/protobuf/api/websocket/error.pbjson.dart +++ /dev/null @@ -1,86 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/error.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports -// ignore_for_file: unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use errorCodeDescriptor instead') -const ErrorCode$json = { - '1': 'ErrorCode', - '2': [ - {'1': 'Unknown', '2': 0}, - {'1': 'BadRequest', '2': 400}, - {'1': 'TooManyRequests', '2': 429}, - {'1': 'InternalError', '2': 500}, - {'1': 'InvalidInvitationCode', '2': 1002}, - {'1': 'UsernameAlreadyTaken', '2': 1003}, - {'1': 'SignatureNotValid', '2': 1004}, - {'1': 'UsernameNotFound', '2': 1005}, - {'1': 'UsernameNotValid', '2': 1006}, - {'1': 'InvalidPublicKey', '2': 1007}, - {'1': 'SessionAlreadyAuthenticated', '2': 1008}, - {'1': 'SessionNotAuthenticated', '2': 1009}, - {'1': 'OnlyOneSessionAllowed', '2': 1010}, - {'1': 'UploadLimitReached', '2': 1011}, - {'1': 'InvalidUpdateToken', '2': 1012}, - {'1': 'InvalidOffset', '2': 1013}, - {'1': 'InvalidGoogleFcmToken', '2': 1014}, - {'1': 'UploadTokenIsBlocked', '2': 1015}, - {'1': 'UploadChecksumInvalid', '2': 1016}, - {'1': 'InvalidDownloadToken', '2': 1017}, - {'1': 'ApiEndpointNotFound', '2': 1018}, - {'1': 'AuthTokenNotValid', '2': 1019}, - {'1': 'InvalidPreKeys', '2': 1020}, - {'1': 'VoucherInValid', '2': 1021}, - {'1': 'PlanNotAllowed', '2': 1022}, - {'1': 'PlanLimitReached', '2': 1023}, - {'1': 'NotEnoughCredit', '2': 1024}, - {'1': 'PlanDowngrade', '2': 1025}, - {'1': 'PlanUpgradeNotYearly', '2': 1026}, - {'1': 'InvalidSignedPreKey', '2': 1027}, - {'1': 'UserIdNotFound', '2': 1028}, - {'1': 'UserIdAlreadyTaken', '2': 1029}, - {'1': 'AppVersionOutdated', '2': 1030}, - {'1': 'NewDeviceRegistered', '2': 1031}, - {'1': 'InvalidProofOfWork', '2': 1032}, - {'1': 'RegistrationDisabled', '2': 1033}, - {'1': 'IPAPaymentExpired', '2': 1034}, - {'1': 'UserIsNotInFreePlan', '2': 1035}, - {'1': 'ForegroundSessionConnected', '2': 1036}, - {'1': 'NoRecoveryData', '2': 1037}, - {'1': 'InvalidRecoveryData', '2': 1038}, - ], -}; - -/// Descriptor for `ErrorCode`. Decode as a `google.protobuf.EnumDescriptorProto`. -final $typed_data.Uint8List errorCodeDescriptor = $convert.base64Decode( - 'CglFcnJvckNvZGUSCwoHVW5rbm93bhAAEg8KCkJhZFJlcXVlc3QQkAMSFAoPVG9vTWFueVJlcX' - 'Vlc3RzEK0DEhIKDUludGVybmFsRXJyb3IQ9AMSGgoVSW52YWxpZEludml0YXRpb25Db2RlEOoH' - 'EhkKFFVzZXJuYW1lQWxyZWFkeVRha2VuEOsHEhYKEVNpZ25hdHVyZU5vdFZhbGlkEOwHEhUKEF' - 'VzZXJuYW1lTm90Rm91bmQQ7QcSFQoQVXNlcm5hbWVOb3RWYWxpZBDuBxIVChBJbnZhbGlkUHVi' - 'bGljS2V5EO8HEiAKG1Nlc3Npb25BbHJlYWR5QXV0aGVudGljYXRlZBDwBxIcChdTZXNzaW9uTm' - '90QXV0aGVudGljYXRlZBDxBxIaChVPbmx5T25lU2Vzc2lvbkFsbG93ZWQQ8gcSFwoSVXBsb2Fk' - 'TGltaXRSZWFjaGVkEPMHEhcKEkludmFsaWRVcGRhdGVUb2tlbhD0BxISCg1JbnZhbGlkT2Zmc2' - 'V0EPUHEhoKFUludmFsaWRHb29nbGVGY21Ub2tlbhD2BxIZChRVcGxvYWRUb2tlbklzQmxvY2tl' - 'ZBD3BxIaChVVcGxvYWRDaGVja3N1bUludmFsaWQQ+AcSGQoUSW52YWxpZERvd25sb2FkVG9rZW' - '4Q+QcSGAoTQXBpRW5kcG9pbnROb3RGb3VuZBD6BxIWChFBdXRoVG9rZW5Ob3RWYWxpZBD7BxIT' - 'Cg5JbnZhbGlkUHJlS2V5cxD8BxITCg5Wb3VjaGVySW5WYWxpZBD9BxITCg5QbGFuTm90QWxsb3' - 'dlZBD+BxIVChBQbGFuTGltaXRSZWFjaGVkEP8HEhQKD05vdEVub3VnaENyZWRpdBCACBISCg1Q' - 'bGFuRG93bmdyYWRlEIEIEhkKFFBsYW5VcGdyYWRlTm90WWVhcmx5EIIIEhgKE0ludmFsaWRTaW' - 'duZWRQcmVLZXkQgwgSEwoOVXNlcklkTm90Rm91bmQQhAgSFwoSVXNlcklkQWxyZWFkeVRha2Vu' - 'EIUIEhcKEkFwcFZlcnNpb25PdXRkYXRlZBCGCBIYChNOZXdEZXZpY2VSZWdpc3RlcmVkEIcIEh' - 'cKEkludmFsaWRQcm9vZk9mV29yaxCICBIZChRSZWdpc3RyYXRpb25EaXNhYmxlZBCJCBIWChFJ' - 'UEFQYXltZW50RXhwaXJlZBCKCBIYChNVc2VySXNOb3RJbkZyZWVQbGFuEIsIEh8KGkZvcmVncm' - '91bmRTZXNzaW9uQ29ubmVjdGVkEIwIEhMKDk5vUmVjb3ZlcnlEYXRhEI0IEhgKE0ludmFsaWRS' - 'ZWNvdmVyeURhdGEQjgg='); diff --git a/lib/src/model/protobuf/api/websocket/error.pbserver.dart b/lib/src/model/protobuf/api/websocket/error.pbserver.dart deleted file mode 100644 index a35b42e6..00000000 --- a/lib/src/model/protobuf/api/websocket/error.pbserver.dart +++ /dev/null @@ -1,13 +0,0 @@ -// -// Generated code. Do not modify. -// source: api/websocket/error.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'error.pb.dart'; diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart deleted file mode 100644 index 0cf531dd..00000000 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pb.dart +++ /dev/null @@ -1,3229 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/server_to_client.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports - -import 'dart:core' as $core; - -import 'package:fixnum/fixnum.dart' as $fixnum; -import 'package:protobuf/protobuf.dart' as $pb; - -import 'error.pbenum.dart' as $0; - -export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions; - -enum ServerToClient_V { v0, notSet } - -class ServerToClient extends $pb.GeneratedMessage { - factory ServerToClient({ - V0? v0, - }) { - final result = create(); - if (v0 != null) result.v0 = v0; - return result; - } - - ServerToClient._(); - - factory ServerToClient.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory ServerToClient.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, ServerToClient_V> _ServerToClient_VByTag = { - 1: ServerToClient_V.v0, - 0: ServerToClient_V.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'ServerToClient', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..oo(0, [1]) - ..aOM(1, _omitFieldNames ? '' : 'V0', - protoName: 'V0', subBuilder: V0.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ServerToClient clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - ServerToClient copyWith(void Function(ServerToClient) updates) => - super.copyWith((message) => updates(message as ServerToClient)) - as ServerToClient; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static ServerToClient create() => ServerToClient._(); - @$core.override - ServerToClient createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static ServerToClient getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static ServerToClient? _defaultInstance; - - @$pb.TagNumber(1) - ServerToClient_V whichV() => _ServerToClient_VByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - void clearV() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - V0 get v0 => $_getN(0); - @$pb.TagNumber(1) - set v0(V0 value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasV0() => $_has(0); - @$pb.TagNumber(1) - void clearV0() => $_clearField(1); - @$pb.TagNumber(1) - V0 ensureV0() => $_ensure(0); -} - -enum V0_Kind { - response, - newMessage, - requestNewPreKeys, - error, - newMessages, - requestNewPqcPreKeys, - sealedSenderMessage, - sealedSenderMessages, - notSet -} - -class V0 extends $pb.GeneratedMessage { - factory V0({ - $fixnum.Int64? seq, - Response? response, - NewMessage? newMessage, - $core.bool? requestNewPreKeys, - $0.ErrorCode? error, - NewMessages? newMessages, - $core.bool? requestNewPqcPreKeys, - SealedSenderMessage? sealedSenderMessage, - SealedSenderMessages? sealedSenderMessages, - }) { - final result = create(); - if (seq != null) result.seq = seq; - if (response != null) result.response = response; - if (newMessage != null) result.newMessage = newMessage; - if (requestNewPreKeys != null) result.requestNewPreKeys = requestNewPreKeys; - if (error != null) result.error = error; - if (newMessages != null) result.newMessages = newMessages; - if (requestNewPqcPreKeys != null) - result.requestNewPqcPreKeys = requestNewPqcPreKeys; - if (sealedSenderMessage != null) - result.sealedSenderMessage = sealedSenderMessage; - if (sealedSenderMessages != null) - result.sealedSenderMessages = sealedSenderMessages; - return result; - } - - V0._(); - - factory V0.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory V0.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, V0_Kind> _V0_KindByTag = { - 2: V0_Kind.response, - 3: V0_Kind.newMessage, - 4: V0_Kind.requestNewPreKeys, - 6: V0_Kind.error, - 7: V0_Kind.newMessages, - 8: V0_Kind.requestNewPqcPreKeys, - 9: V0_Kind.sealedSenderMessage, - 10: V0_Kind.sealedSenderMessages, - 0: V0_Kind.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'V0', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..oo(0, [2, 3, 4, 6, 7, 8, 9, 10]) - ..a<$fixnum.Int64>(1, _omitFieldNames ? '' : 'seq', $pb.PbFieldType.OU6, - defaultOrMaker: $fixnum.Int64.ZERO) - ..aOM(2, _omitFieldNames ? '' : 'response', - subBuilder: Response.create) - ..aOM(3, _omitFieldNames ? '' : 'newMessage', - protoName: 'newMessage', subBuilder: NewMessage.create) - ..aOB(4, _omitFieldNames ? '' : 'RequestNewPreKeys', - protoName: 'RequestNewPreKeys') - ..aE<$0.ErrorCode>(6, _omitFieldNames ? '' : 'error', - enumValues: $0.ErrorCode.values) - ..aOM(7, _omitFieldNames ? '' : 'newMessages', - protoName: 'newMessages', subBuilder: NewMessages.create) - ..aOB(8, _omitFieldNames ? '' : 'RequestNewPqcPreKeys', - protoName: 'RequestNewPqcPreKeys') - ..aOM(9, _omitFieldNames ? '' : 'sealedSenderMessage', - protoName: 'sealedSenderMessage', - subBuilder: SealedSenderMessage.create) - ..aOM( - 10, _omitFieldNames ? '' : 'sealedSenderMessages', - protoName: 'sealedSenderMessages', - subBuilder: SealedSenderMessages.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - V0 clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - V0 copyWith(void Function(V0) updates) => - super.copyWith((message) => updates(message as V0)) as V0; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static V0 create() => V0._(); - @$core.override - V0 createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static V0 getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static V0? _defaultInstance; - - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(6) - @$pb.TagNumber(7) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - V0_Kind whichKind() => _V0_KindByTag[$_whichOneof(0)]!; - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(6) - @$pb.TagNumber(7) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - void clearKind() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $fixnum.Int64 get seq => $_getI64(0); - @$pb.TagNumber(1) - set seq($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasSeq() => $_has(0); - @$pb.TagNumber(1) - void clearSeq() => $_clearField(1); - - @$pb.TagNumber(2) - Response get response => $_getN(1); - @$pb.TagNumber(2) - set response(Response value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasResponse() => $_has(1); - @$pb.TagNumber(2) - void clearResponse() => $_clearField(2); - @$pb.TagNumber(2) - Response ensureResponse() => $_ensure(1); - - @$pb.TagNumber(3) - NewMessage get newMessage => $_getN(2); - @$pb.TagNumber(3) - set newMessage(NewMessage value) => $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasNewMessage() => $_has(2); - @$pb.TagNumber(3) - void clearNewMessage() => $_clearField(3); - @$pb.TagNumber(3) - NewMessage ensureNewMessage() => $_ensure(2); - - @$pb.TagNumber(4) - $core.bool get requestNewPreKeys => $_getBF(3); - @$pb.TagNumber(4) - set requestNewPreKeys($core.bool value) => $_setBool(3, value); - @$pb.TagNumber(4) - $core.bool hasRequestNewPreKeys() => $_has(3); - @$pb.TagNumber(4) - void clearRequestNewPreKeys() => $_clearField(4); - - @$pb.TagNumber(6) - $0.ErrorCode get error => $_getN(4); - @$pb.TagNumber(6) - set error($0.ErrorCode value) => $_setField(6, value); - @$pb.TagNumber(6) - $core.bool hasError() => $_has(4); - @$pb.TagNumber(6) - void clearError() => $_clearField(6); - - @$pb.TagNumber(7) - NewMessages get newMessages => $_getN(5); - @$pb.TagNumber(7) - set newMessages(NewMessages value) => $_setField(7, value); - @$pb.TagNumber(7) - $core.bool hasNewMessages() => $_has(5); - @$pb.TagNumber(7) - void clearNewMessages() => $_clearField(7); - @$pb.TagNumber(7) - NewMessages ensureNewMessages() => $_ensure(5); - - @$pb.TagNumber(8) - $core.bool get requestNewPqcPreKeys => $_getBF(6); - @$pb.TagNumber(8) - set requestNewPqcPreKeys($core.bool value) => $_setBool(6, value); - @$pb.TagNumber(8) - $core.bool hasRequestNewPqcPreKeys() => $_has(6); - @$pb.TagNumber(8) - void clearRequestNewPqcPreKeys() => $_clearField(8); - - @$pb.TagNumber(9) - SealedSenderMessage get sealedSenderMessage => $_getN(7); - @$pb.TagNumber(9) - set sealedSenderMessage(SealedSenderMessage value) => $_setField(9, value); - @$pb.TagNumber(9) - $core.bool hasSealedSenderMessage() => $_has(7); - @$pb.TagNumber(9) - void clearSealedSenderMessage() => $_clearField(9); - @$pb.TagNumber(9) - SealedSenderMessage ensureSealedSenderMessage() => $_ensure(7); - - @$pb.TagNumber(10) - SealedSenderMessages get sealedSenderMessages => $_getN(8); - @$pb.TagNumber(10) - set sealedSenderMessages(SealedSenderMessages value) => $_setField(10, value); - @$pb.TagNumber(10) - $core.bool hasSealedSenderMessages() => $_has(8); - @$pb.TagNumber(10) - void clearSealedSenderMessages() => $_clearField(10); - @$pb.TagNumber(10) - SealedSenderMessages ensureSealedSenderMessages() => $_ensure(8); -} - -class NewMessage extends $pb.GeneratedMessage { - factory NewMessage({ - $core.List<$core.int>? body, - $fixnum.Int64? fromUserId, - }) { - final result = create(); - if (body != null) result.body = body; - if (fromUserId != null) result.fromUserId = fromUserId; - return result; - } - - NewMessage._(); - - factory NewMessage.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory NewMessage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'NewMessage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) - ..aInt64(2, _omitFieldNames ? '' : 'fromUserId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - NewMessage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - NewMessage copyWith(void Function(NewMessage) updates) => - super.copyWith((message) => updates(message as NewMessage)) as NewMessage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static NewMessage create() => NewMessage._(); - @$core.override - NewMessage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static NewMessage getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static NewMessage? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get body => $_getN(0); - @$pb.TagNumber(1) - set body($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasBody() => $_has(0); - @$pb.TagNumber(1) - void clearBody() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get fromUserId => $_getI64(1); - @$pb.TagNumber(2) - set fromUserId($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasFromUserId() => $_has(1); - @$pb.TagNumber(2) - void clearFromUserId() => $_clearField(2); -} - -class NewMessages extends $pb.GeneratedMessage { - factory NewMessages({ - $core.Iterable? newMessages, - }) { - final result = create(); - if (newMessages != null) result.newMessages.addAll(newMessages); - return result; - } - - NewMessages._(); - - factory NewMessages.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory NewMessages.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'NewMessages', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'newMessages', - protoName: 'newMessages', subBuilder: NewMessage.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - NewMessages clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - NewMessages copyWith(void Function(NewMessages) updates) => - super.copyWith((message) => updates(message as NewMessages)) - as NewMessages; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static NewMessages create() => NewMessages._(); - @$core.override - NewMessages createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static NewMessages getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static NewMessages? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get newMessages => $_getList(0); -} - -class SealedSenderMessage extends $pb.GeneratedMessage { - factory SealedSenderMessage({ - $core.String? messageId, - $core.List<$core.int>? body, - }) { - final result = create(); - if (messageId != null) result.messageId = messageId; - if (body != null) result.body = body; - return result; - } - - SealedSenderMessage._(); - - factory SealedSenderMessage.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory SealedSenderMessage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'SealedSenderMessage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'messageId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'body', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - SealedSenderMessage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - SealedSenderMessage copyWith(void Function(SealedSenderMessage) updates) => - super.copyWith((message) => updates(message as SealedSenderMessage)) - as SealedSenderMessage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static SealedSenderMessage create() => SealedSenderMessage._(); - @$core.override - SealedSenderMessage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static SealedSenderMessage getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static SealedSenderMessage? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get messageId => $_getSZ(0); - @$pb.TagNumber(1) - set messageId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMessageId() => $_has(0); - @$pb.TagNumber(1) - void clearMessageId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get body => $_getN(1); - @$pb.TagNumber(2) - set body($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasBody() => $_has(1); - @$pb.TagNumber(2) - void clearBody() => $_clearField(2); -} - -class SealedSenderMessages extends $pb.GeneratedMessage { - factory SealedSenderMessages({ - $core.Iterable? messages, - }) { - final result = create(); - if (messages != null) result.messages.addAll(messages); - return result; - } - - SealedSenderMessages._(); - - factory SealedSenderMessages.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory SealedSenderMessages.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'SealedSenderMessages', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'messages', - subBuilder: SealedSenderMessage.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - SealedSenderMessages clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - SealedSenderMessages copyWith(void Function(SealedSenderMessages) updates) => - super.copyWith((message) => updates(message as SealedSenderMessages)) - as SealedSenderMessages; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static SealedSenderMessages create() => SealedSenderMessages._(); - @$core.override - SealedSenderMessages createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static SealedSenderMessages getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static SealedSenderMessages? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get messages => $_getList(0); -} - -class Response_Authenticated extends $pb.GeneratedMessage { - factory Response_Authenticated({ - $core.String? plan, - }) { - final result = create(); - if (plan != null) result.plan = plan; - return result; - } - - Response_Authenticated._(); - - factory Response_Authenticated.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Authenticated.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Authenticated', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'plan') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Authenticated clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Authenticated copyWith( - void Function(Response_Authenticated) updates) => - super.copyWith((message) => updates(message as Response_Authenticated)) - as Response_Authenticated; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Authenticated create() => Response_Authenticated._(); - @$core.override - Response_Authenticated createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Authenticated getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Authenticated? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get plan => $_getSZ(0); - @$pb.TagNumber(1) - set plan($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasPlan() => $_has(0); - @$pb.TagNumber(1) - void clearPlan() => $_clearField(1); -} - -class Response_Plan extends $pb.GeneratedMessage { - factory Response_Plan({ - $core.String? planId, - $fixnum.Int64? uploadSizeLimit, - $fixnum.Int64? dailyMediaUploadLimit, - $fixnum.Int64? maximalUploadSizeOfSingleMediaSize, - $fixnum.Int64? additionalPlusAccounts, - $fixnum.Int64? monthlyCostsCent, - $fixnum.Int64? yearlyCostsCent, - $core.bool? allowedToSendTextMessages, - $core.bool? isAdditionalAccount, - $fixnum.Int64? memoriesSizeLimit, - }) { - final result = create(); - if (planId != null) result.planId = planId; - if (uploadSizeLimit != null) result.uploadSizeLimit = uploadSizeLimit; - if (dailyMediaUploadLimit != null) - result.dailyMediaUploadLimit = dailyMediaUploadLimit; - if (maximalUploadSizeOfSingleMediaSize != null) - result.maximalUploadSizeOfSingleMediaSize = - maximalUploadSizeOfSingleMediaSize; - if (additionalPlusAccounts != null) - result.additionalPlusAccounts = additionalPlusAccounts; - if (monthlyCostsCent != null) result.monthlyCostsCent = monthlyCostsCent; - if (yearlyCostsCent != null) result.yearlyCostsCent = yearlyCostsCent; - if (allowedToSendTextMessages != null) - result.allowedToSendTextMessages = allowedToSendTextMessages; - if (isAdditionalAccount != null) - result.isAdditionalAccount = isAdditionalAccount; - if (memoriesSizeLimit != null) result.memoriesSizeLimit = memoriesSizeLimit; - return result; - } - - Response_Plan._(); - - factory Response_Plan.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Plan.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Plan', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'planId') - ..aInt64(2, _omitFieldNames ? '' : 'uploadSizeLimit') - ..aInt64(3, _omitFieldNames ? '' : 'dailyMediaUploadLimit') - ..aInt64(4, _omitFieldNames ? '' : 'maximalUploadSizeOfSingleMediaSize') - ..aInt64(5, _omitFieldNames ? '' : 'additionalPlusAccounts') - ..aInt64(7, _omitFieldNames ? '' : 'monthlyCostsCent') - ..aInt64(8, _omitFieldNames ? '' : 'yearlyCostsCent') - ..aOB(9, _omitFieldNames ? '' : 'allowedToSendTextMessages') - ..aOB(10, _omitFieldNames ? '' : 'isAdditionalAccount') - ..aInt64(11, _omitFieldNames ? '' : 'memoriesSizeLimit') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Plan clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Plan copyWith(void Function(Response_Plan) updates) => - super.copyWith((message) => updates(message as Response_Plan)) - as Response_Plan; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Plan create() => Response_Plan._(); - @$core.override - Response_Plan createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Plan getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Plan? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get planId => $_getSZ(0); - @$pb.TagNumber(1) - set planId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasPlanId() => $_has(0); - @$pb.TagNumber(1) - void clearPlanId() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get uploadSizeLimit => $_getI64(1); - @$pb.TagNumber(2) - set uploadSizeLimit($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasUploadSizeLimit() => $_has(1); - @$pb.TagNumber(2) - void clearUploadSizeLimit() => $_clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get dailyMediaUploadLimit => $_getI64(2); - @$pb.TagNumber(3) - set dailyMediaUploadLimit($fixnum.Int64 value) => $_setInt64(2, value); - @$pb.TagNumber(3) - $core.bool hasDailyMediaUploadLimit() => $_has(2); - @$pb.TagNumber(3) - void clearDailyMediaUploadLimit() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get maximalUploadSizeOfSingleMediaSize => $_getI64(3); - @$pb.TagNumber(4) - set maximalUploadSizeOfSingleMediaSize($fixnum.Int64 value) => - $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasMaximalUploadSizeOfSingleMediaSize() => $_has(3); - @$pb.TagNumber(4) - void clearMaximalUploadSizeOfSingleMediaSize() => $_clearField(4); - - @$pb.TagNumber(5) - $fixnum.Int64 get additionalPlusAccounts => $_getI64(4); - @$pb.TagNumber(5) - set additionalPlusAccounts($fixnum.Int64 value) => $_setInt64(4, value); - @$pb.TagNumber(5) - $core.bool hasAdditionalPlusAccounts() => $_has(4); - @$pb.TagNumber(5) - void clearAdditionalPlusAccounts() => $_clearField(5); - - @$pb.TagNumber(7) - $fixnum.Int64 get monthlyCostsCent => $_getI64(5); - @$pb.TagNumber(7) - set monthlyCostsCent($fixnum.Int64 value) => $_setInt64(5, value); - @$pb.TagNumber(7) - $core.bool hasMonthlyCostsCent() => $_has(5); - @$pb.TagNumber(7) - void clearMonthlyCostsCent() => $_clearField(7); - - @$pb.TagNumber(8) - $fixnum.Int64 get yearlyCostsCent => $_getI64(6); - @$pb.TagNumber(8) - set yearlyCostsCent($fixnum.Int64 value) => $_setInt64(6, value); - @$pb.TagNumber(8) - $core.bool hasYearlyCostsCent() => $_has(6); - @$pb.TagNumber(8) - void clearYearlyCostsCent() => $_clearField(8); - - @$pb.TagNumber(9) - $core.bool get allowedToSendTextMessages => $_getBF(7); - @$pb.TagNumber(9) - set allowedToSendTextMessages($core.bool value) => $_setBool(7, value); - @$pb.TagNumber(9) - $core.bool hasAllowedToSendTextMessages() => $_has(7); - @$pb.TagNumber(9) - void clearAllowedToSendTextMessages() => $_clearField(9); - - @$pb.TagNumber(10) - $core.bool get isAdditionalAccount => $_getBF(8); - @$pb.TagNumber(10) - set isAdditionalAccount($core.bool value) => $_setBool(8, value); - @$pb.TagNumber(10) - $core.bool hasIsAdditionalAccount() => $_has(8); - @$pb.TagNumber(10) - void clearIsAdditionalAccount() => $_clearField(10); - - @$pb.TagNumber(11) - $fixnum.Int64 get memoriesSizeLimit => $_getI64(9); - @$pb.TagNumber(11) - set memoriesSizeLimit($fixnum.Int64 value) => $_setInt64(9, value); - @$pb.TagNumber(11) - $core.bool hasMemoriesSizeLimit() => $_has(9); - @$pb.TagNumber(11) - void clearMemoriesSizeLimit() => $_clearField(11); -} - -class Response_Plans extends $pb.GeneratedMessage { - factory Response_Plans({ - $core.Iterable? plans, - }) { - final result = create(); - if (plans != null) result.plans.addAll(plans); - return result; - } - - Response_Plans._(); - - factory Response_Plans.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Plans.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Plans', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'plans', - subBuilder: Response_Plan.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Plans clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Plans copyWith(void Function(Response_Plans) updates) => - super.copyWith((message) => updates(message as Response_Plans)) - as Response_Plans; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Plans create() => Response_Plans._(); - @$core.override - Response_Plans createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Plans getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Plans? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get plans => $_getList(0); -} - -class Response_AddAccountsInvite extends $pb.GeneratedMessage { - factory Response_AddAccountsInvite({ - $core.String? planId, - $core.String? inviteCode, - }) { - final result = create(); - if (planId != null) result.planId = planId; - if (inviteCode != null) result.inviteCode = inviteCode; - return result; - } - - Response_AddAccountsInvite._(); - - factory Response_AddAccountsInvite.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_AddAccountsInvite.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.AddAccountsInvite', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'planId') - ..aOS(2, _omitFieldNames ? '' : 'inviteCode') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AddAccountsInvite clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AddAccountsInvite copyWith( - void Function(Response_AddAccountsInvite) updates) => - super.copyWith( - (message) => updates(message as Response_AddAccountsInvite)) - as Response_AddAccountsInvite; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_AddAccountsInvite create() => Response_AddAccountsInvite._(); - @$core.override - Response_AddAccountsInvite createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_AddAccountsInvite getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_AddAccountsInvite? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get planId => $_getSZ(0); - @$pb.TagNumber(1) - set planId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasPlanId() => $_has(0); - @$pb.TagNumber(1) - void clearPlanId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.String get inviteCode => $_getSZ(1); - @$pb.TagNumber(2) - set inviteCode($core.String value) => $_setString(1, value); - @$pb.TagNumber(2) - $core.bool hasInviteCode() => $_has(1); - @$pb.TagNumber(2) - void clearInviteCode() => $_clearField(2); -} - -class Response_AddAccountsInvites extends $pb.GeneratedMessage { - factory Response_AddAccountsInvites({ - $core.Iterable? invites, - }) { - final result = create(); - if (invites != null) result.invites.addAll(invites); - return result; - } - - Response_AddAccountsInvites._(); - - factory Response_AddAccountsInvites.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_AddAccountsInvites.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.AddAccountsInvites', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'invites', - subBuilder: Response_AddAccountsInvite.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AddAccountsInvites clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AddAccountsInvites copyWith( - void Function(Response_AddAccountsInvites) updates) => - super.copyWith( - (message) => updates(message as Response_AddAccountsInvites)) - as Response_AddAccountsInvites; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_AddAccountsInvites create() => - Response_AddAccountsInvites._(); - @$core.override - Response_AddAccountsInvites createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_AddAccountsInvites getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_AddAccountsInvites? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get invites => $_getList(0); -} - -class Response_AdditionalAccount extends $pb.GeneratedMessage { - factory Response_AdditionalAccount({ - $fixnum.Int64? userId, - $core.String? planId, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (planId != null) result.planId = planId; - return result; - } - - Response_AdditionalAccount._(); - - factory Response_AdditionalAccount.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_AdditionalAccount.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.AdditionalAccount', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..aOS(3, _omitFieldNames ? '' : 'planId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AdditionalAccount clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_AdditionalAccount copyWith( - void Function(Response_AdditionalAccount) updates) => - super.copyWith( - (message) => updates(message as Response_AdditionalAccount)) - as Response_AdditionalAccount; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_AdditionalAccount create() => Response_AdditionalAccount._(); - @$core.override - Response_AdditionalAccount createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_AdditionalAccount getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_AdditionalAccount? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(3) - $core.String get planId => $_getSZ(1); - @$pb.TagNumber(3) - set planId($core.String value) => $_setString(1, value); - @$pb.TagNumber(3) - $core.bool hasPlanId() => $_has(1); - @$pb.TagNumber(3) - void clearPlanId() => $_clearField(3); -} - -class Response_Transaction extends $pb.GeneratedMessage { - factory Response_Transaction() => create(); - - Response_Transaction._(); - - factory Response_Transaction.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Transaction.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Transaction', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Transaction clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Transaction copyWith(void Function(Response_Transaction) updates) => - super.copyWith((message) => updates(message as Response_Transaction)) - as Response_Transaction; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Transaction create() => Response_Transaction._(); - @$core.override - Response_Transaction createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Transaction getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Transaction? _defaultInstance; -} - -class Response_PlanBallance extends $pb.GeneratedMessage { - factory Response_PlanBallance({ - $fixnum.Int64? usedDailyMediaUploadLimit, - $fixnum.Int64? usedUploadMediaSizeLimit, - $fixnum.Int64? paymentPeriodDays, - $fixnum.Int64? lastPaymentDoneUnixTimestamp, - $core.Iterable? transactions, - $core.Iterable? additionalAccounts, - $core.bool? autoRenewal, - $fixnum.Int64? additionalAccountOwnerId, - }) { - final result = create(); - if (usedDailyMediaUploadLimit != null) - result.usedDailyMediaUploadLimit = usedDailyMediaUploadLimit; - if (usedUploadMediaSizeLimit != null) - result.usedUploadMediaSizeLimit = usedUploadMediaSizeLimit; - if (paymentPeriodDays != null) result.paymentPeriodDays = paymentPeriodDays; - if (lastPaymentDoneUnixTimestamp != null) - result.lastPaymentDoneUnixTimestamp = lastPaymentDoneUnixTimestamp; - if (transactions != null) result.transactions.addAll(transactions); - if (additionalAccounts != null) - result.additionalAccounts.addAll(additionalAccounts); - if (autoRenewal != null) result.autoRenewal = autoRenewal; - if (additionalAccountOwnerId != null) - result.additionalAccountOwnerId = additionalAccountOwnerId; - return result; - } - - Response_PlanBallance._(); - - factory Response_PlanBallance.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PlanBallance.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PlanBallance', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'usedDailyMediaUploadLimit') - ..aInt64(2, _omitFieldNames ? '' : 'usedUploadMediaSizeLimit') - ..aInt64(3, _omitFieldNames ? '' : 'paymentPeriodDays') - ..aInt64(4, _omitFieldNames ? '' : 'lastPaymentDoneUnixTimestamp') - ..pPM(5, _omitFieldNames ? '' : 'transactions', - subBuilder: Response_Transaction.create) - ..pPM( - 6, _omitFieldNames ? '' : 'additionalAccounts', - subBuilder: Response_AdditionalAccount.create) - ..aOB(7, _omitFieldNames ? '' : 'autoRenewal') - ..aInt64(8, _omitFieldNames ? '' : 'additionalAccountOwnerId') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PlanBallance clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PlanBallance copyWith( - void Function(Response_PlanBallance) updates) => - super.copyWith((message) => updates(message as Response_PlanBallance)) - as Response_PlanBallance; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PlanBallance create() => Response_PlanBallance._(); - @$core.override - Response_PlanBallance createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PlanBallance getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PlanBallance? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get usedDailyMediaUploadLimit => $_getI64(0); - @$pb.TagNumber(1) - set usedDailyMediaUploadLimit($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUsedDailyMediaUploadLimit() => $_has(0); - @$pb.TagNumber(1) - void clearUsedDailyMediaUploadLimit() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get usedUploadMediaSizeLimit => $_getI64(1); - @$pb.TagNumber(2) - set usedUploadMediaSizeLimit($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasUsedUploadMediaSizeLimit() => $_has(1); - @$pb.TagNumber(2) - void clearUsedUploadMediaSizeLimit() => $_clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get paymentPeriodDays => $_getI64(2); - @$pb.TagNumber(3) - set paymentPeriodDays($fixnum.Int64 value) => $_setInt64(2, value); - @$pb.TagNumber(3) - $core.bool hasPaymentPeriodDays() => $_has(2); - @$pb.TagNumber(3) - void clearPaymentPeriodDays() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get lastPaymentDoneUnixTimestamp => $_getI64(3); - @$pb.TagNumber(4) - set lastPaymentDoneUnixTimestamp($fixnum.Int64 value) => $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasLastPaymentDoneUnixTimestamp() => $_has(3); - @$pb.TagNumber(4) - void clearLastPaymentDoneUnixTimestamp() => $_clearField(4); - - @$pb.TagNumber(5) - $pb.PbList get transactions => $_getList(4); - - @$pb.TagNumber(6) - $pb.PbList get additionalAccounts => $_getList(5); - - @$pb.TagNumber(7) - $core.bool get autoRenewal => $_getBF(6); - @$pb.TagNumber(7) - set autoRenewal($core.bool value) => $_setBool(6, value); - @$pb.TagNumber(7) - $core.bool hasAutoRenewal() => $_has(6); - @$pb.TagNumber(7) - void clearAutoRenewal() => $_clearField(7); - - @$pb.TagNumber(8) - $fixnum.Int64 get additionalAccountOwnerId => $_getI64(7); - @$pb.TagNumber(8) - set additionalAccountOwnerId($fixnum.Int64 value) => $_setInt64(7, value); - @$pb.TagNumber(8) - $core.bool hasAdditionalAccountOwnerId() => $_has(7); - @$pb.TagNumber(8) - void clearAdditionalAccountOwnerId() => $_clearField(8); -} - -class Response_PreKey extends $pb.GeneratedMessage { - factory Response_PreKey({ - $fixnum.Int64? id, - $core.List<$core.int>? prekey, - }) { - final result = create(); - if (id != null) result.id = id; - if (prekey != null) result.prekey = prekey; - return result; - } - - Response_PreKey._(); - - factory Response_PreKey.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'id') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'prekey', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PreKey copyWith(void Function(Response_PreKey) updates) => - super.copyWith((message) => updates(message as Response_PreKey)) - as Response_PreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PreKey create() => Response_PreKey._(); - @$core.override - Response_PreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get id => $_getI64(0); - @$pb.TagNumber(1) - set id($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get prekey => $_getN(1); - @$pb.TagNumber(2) - set prekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearPrekey() => $_clearField(2); -} - -class Response_SignedPreKey extends $pb.GeneratedMessage { - factory Response_SignedPreKey({ - $fixnum.Int64? signedPrekeyId, - $core.List<$core.int>? signedPrekey, - $core.List<$core.int>? signedPrekeySignature, - }) { - final result = create(); - if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId; - if (signedPrekey != null) result.signedPrekey = signedPrekey; - if (signedPrekeySignature != null) - result.signedPrekeySignature = signedPrekeySignature; - return result; - } - - Response_SignedPreKey._(); - - factory Response_SignedPreKey.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_SignedPreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.SignedPreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'signedPrekeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_SignedPreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_SignedPreKey copyWith( - void Function(Response_SignedPreKey) updates) => - super.copyWith((message) => updates(message as Response_SignedPreKey)) - as Response_SignedPreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_SignedPreKey create() => Response_SignedPreKey._(); - @$core.override - Response_SignedPreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_SignedPreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_SignedPreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get signedPrekeyId => $_getI64(0); - @$pb.TagNumber(1) - set signedPrekeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasSignedPrekeyId() => $_has(0); - @$pb.TagNumber(1) - void clearSignedPrekeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get signedPrekey => $_getN(1); - @$pb.TagNumber(2) - set signedPrekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasSignedPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearSignedPrekey() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get signedPrekeySignature => $_getN(2); - @$pb.TagNumber(3) - set signedPrekeySignature($core.List<$core.int> value) => - $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasSignedPrekeySignature() => $_has(2); - @$pb.TagNumber(3) - void clearSignedPrekeySignature() => $_clearField(3); -} - -class Response_PqcPreKey extends $pb.GeneratedMessage { - factory Response_PqcPreKey({ - $fixnum.Int64? eccPreKeyId, - $core.List<$core.int>? eccPreKey, - $fixnum.Int64? kyberPreKeyId, - $core.List<$core.int>? kyberPreKey, - $core.List<$core.int>? kyberPreKeySignature, - }) { - final result = create(); - if (eccPreKeyId != null) result.eccPreKeyId = eccPreKeyId; - if (eccPreKey != null) result.eccPreKey = eccPreKey; - if (kyberPreKeyId != null) result.kyberPreKeyId = kyberPreKeyId; - if (kyberPreKey != null) result.kyberPreKey = kyberPreKey; - if (kyberPreKeySignature != null) - result.kyberPreKeySignature = kyberPreKeySignature; - return result; - } - - Response_PqcPreKey._(); - - factory Response_PqcPreKey.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PqcPreKey.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PqcPreKey', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'eccPreKeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'eccPreKey', $pb.PbFieldType.OY) - ..aInt64(3, _omitFieldNames ? '' : 'kyberPreKeyId') - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'kyberPreKey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'kyberPreKeySignature', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcPreKey clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcPreKey copyWith(void Function(Response_PqcPreKey) updates) => - super.copyWith((message) => updates(message as Response_PqcPreKey)) - as Response_PqcPreKey; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PqcPreKey create() => Response_PqcPreKey._(); - @$core.override - Response_PqcPreKey createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PqcPreKey getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PqcPreKey? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get eccPreKeyId => $_getI64(0); - @$pb.TagNumber(1) - set eccPreKeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasEccPreKeyId() => $_has(0); - @$pb.TagNumber(1) - void clearEccPreKeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get eccPreKey => $_getN(1); - @$pb.TagNumber(2) - set eccPreKey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEccPreKey() => $_has(1); - @$pb.TagNumber(2) - void clearEccPreKey() => $_clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get kyberPreKeyId => $_getI64(2); - @$pb.TagNumber(3) - set kyberPreKeyId($fixnum.Int64 value) => $_setInt64(2, value); - @$pb.TagNumber(3) - $core.bool hasKyberPreKeyId() => $_has(2); - @$pb.TagNumber(3) - void clearKyberPreKeyId() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get kyberPreKey => $_getN(3); - @$pb.TagNumber(4) - set kyberPreKey($core.List<$core.int> value) => $_setBytes(3, value); - @$pb.TagNumber(4) - $core.bool hasKyberPreKey() => $_has(3); - @$pb.TagNumber(4) - void clearKyberPreKey() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get kyberPreKeySignature => $_getN(4); - @$pb.TagNumber(5) - set kyberPreKeySignature($core.List<$core.int> value) => $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasKyberPreKeySignature() => $_has(4); - @$pb.TagNumber(5) - void clearKyberPreKeySignature() => $_clearField(5); -} - -class Response_PqcBundle extends $pb.GeneratedMessage { - factory Response_PqcBundle({ - $fixnum.Int64? eccSignedPrekeyId, - $core.List<$core.int>? eccSignedPrekey, - $core.List<$core.int>? eccSignedPrekeySignature, - $fixnum.Int64? kyberSignedPrekeyId, - $core.List<$core.int>? kyberSignedPrekey, - $core.List<$core.int>? kyberSignedPrekeySignature, - Response_PqcPreKey? prekey, - }) { - final result = create(); - if (eccSignedPrekeyId != null) result.eccSignedPrekeyId = eccSignedPrekeyId; - if (eccSignedPrekey != null) result.eccSignedPrekey = eccSignedPrekey; - if (eccSignedPrekeySignature != null) - result.eccSignedPrekeySignature = eccSignedPrekeySignature; - if (kyberSignedPrekeyId != null) - result.kyberSignedPrekeyId = kyberSignedPrekeyId; - if (kyberSignedPrekey != null) result.kyberSignedPrekey = kyberSignedPrekey; - if (kyberSignedPrekeySignature != null) - result.kyberSignedPrekeySignature = kyberSignedPrekeySignature; - if (prekey != null) result.prekey = prekey; - return result; - } - - Response_PqcBundle._(); - - factory Response_PqcBundle.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PqcBundle.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PqcBundle', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'eccSignedPrekeyId') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'eccSignedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(3, - _omitFieldNames ? '' : 'eccSignedPrekeySignature', $pb.PbFieldType.OY) - ..aInt64(4, _omitFieldNames ? '' : 'kyberSignedPrekeyId') - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'kyberSignedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>(6, - _omitFieldNames ? '' : 'kyberSignedPrekeySignature', $pb.PbFieldType.OY) - ..aOM(7, _omitFieldNames ? '' : 'prekey', - subBuilder: Response_PqcPreKey.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcBundle clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PqcBundle copyWith(void Function(Response_PqcBundle) updates) => - super.copyWith((message) => updates(message as Response_PqcBundle)) - as Response_PqcBundle; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PqcBundle create() => Response_PqcBundle._(); - @$core.override - Response_PqcBundle createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PqcBundle getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PqcBundle? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get eccSignedPrekeyId => $_getI64(0); - @$pb.TagNumber(1) - set eccSignedPrekeyId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasEccSignedPrekeyId() => $_has(0); - @$pb.TagNumber(1) - void clearEccSignedPrekeyId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get eccSignedPrekey => $_getN(1); - @$pb.TagNumber(2) - set eccSignedPrekey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEccSignedPrekey() => $_has(1); - @$pb.TagNumber(2) - void clearEccSignedPrekey() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get eccSignedPrekeySignature => $_getN(2); - @$pb.TagNumber(3) - set eccSignedPrekeySignature($core.List<$core.int> value) => - $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasEccSignedPrekeySignature() => $_has(2); - @$pb.TagNumber(3) - void clearEccSignedPrekeySignature() => $_clearField(3); - - @$pb.TagNumber(4) - $fixnum.Int64 get kyberSignedPrekeyId => $_getI64(3); - @$pb.TagNumber(4) - set kyberSignedPrekeyId($fixnum.Int64 value) => $_setInt64(3, value); - @$pb.TagNumber(4) - $core.bool hasKyberSignedPrekeyId() => $_has(3); - @$pb.TagNumber(4) - void clearKyberSignedPrekeyId() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get kyberSignedPrekey => $_getN(4); - @$pb.TagNumber(5) - set kyberSignedPrekey($core.List<$core.int> value) => $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasKyberSignedPrekey() => $_has(4); - @$pb.TagNumber(5) - void clearKyberSignedPrekey() => $_clearField(5); - - @$pb.TagNumber(6) - $core.List<$core.int> get kyberSignedPrekeySignature => $_getN(5); - @$pb.TagNumber(6) - set kyberSignedPrekeySignature($core.List<$core.int> value) => - $_setBytes(5, value); - @$pb.TagNumber(6) - $core.bool hasKyberSignedPrekeySignature() => $_has(5); - @$pb.TagNumber(6) - void clearKyberSignedPrekeySignature() => $_clearField(6); - - @$pb.TagNumber(7) - Response_PqcPreKey get prekey => $_getN(6); - @$pb.TagNumber(7) - set prekey(Response_PqcPreKey value) => $_setField(7, value); - @$pb.TagNumber(7) - $core.bool hasPrekey() => $_has(6); - @$pb.TagNumber(7) - void clearPrekey() => $_clearField(7); - @$pb.TagNumber(7) - Response_PqcPreKey ensurePrekey() => $_ensure(6); -} - -class Response_UserData extends $pb.GeneratedMessage { - factory Response_UserData({ - $fixnum.Int64? userId, - $core.Iterable? prekeys, - $core.List<$core.int>? publicIdentityKey, - $core.List<$core.int>? signedPrekey, - $core.List<$core.int>? signedPrekeySignature, - $fixnum.Int64? signedPrekeyId, - $core.List<$core.int>? username, - $fixnum.Int64? registrationId, - Response_PqcBundle? pqcBundle, - }) { - final result = create(); - if (userId != null) result.userId = userId; - if (prekeys != null) result.prekeys.addAll(prekeys); - if (publicIdentityKey != null) result.publicIdentityKey = publicIdentityKey; - if (signedPrekey != null) result.signedPrekey = signedPrekey; - if (signedPrekeySignature != null) - result.signedPrekeySignature = signedPrekeySignature; - if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId; - if (username != null) result.username = username; - if (registrationId != null) result.registrationId = registrationId; - if (pqcBundle != null) result.pqcBundle = pqcBundle; - return result; - } - - Response_UserData._(); - - factory Response_UserData.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_UserData.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.UserConfig', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'userId') - ..pPM(2, _omitFieldNames ? '' : 'prekeys', - subBuilder: Response_PreKey.create) - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'publicIdentityKey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 4, _omitFieldNames ? '' : 'signedPrekey', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 5, _omitFieldNames ? '' : 'signedPrekeySignature', $pb.PbFieldType.OY) - ..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId') - ..a<$core.List<$core.int>>( - 7, _omitFieldNames ? '' : 'username', $pb.PbFieldType.OY) - ..aInt64(8, _omitFieldNames ? '' : 'registrationId') - ..aOM(9, _omitFieldNames ? '' : 'pqcBundle', - subBuilder: Response_PqcBundle.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_UserData clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_UserData copyWith(void Function(Response_UserData) updates) => - super.copyWith((message) => updates(message as Response_UserData)) - as Response_UserData; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_UserData create() => Response_UserData._(); - @$core.override - Response_UserData createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_UserData getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_UserData? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get userId => $_getI64(0); - @$pb.TagNumber(1) - set userId($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasUserId() => $_has(0); - @$pb.TagNumber(1) - void clearUserId() => $_clearField(1); - - @$pb.TagNumber(2) - $pb.PbList get prekeys => $_getList(1); - - @$pb.TagNumber(3) - $core.List<$core.int> get publicIdentityKey => $_getN(2); - @$pb.TagNumber(3) - set publicIdentityKey($core.List<$core.int> value) => $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasPublicIdentityKey() => $_has(2); - @$pb.TagNumber(3) - void clearPublicIdentityKey() => $_clearField(3); - - @$pb.TagNumber(4) - $core.List<$core.int> get signedPrekey => $_getN(3); - @$pb.TagNumber(4) - set signedPrekey($core.List<$core.int> value) => $_setBytes(3, value); - @$pb.TagNumber(4) - $core.bool hasSignedPrekey() => $_has(3); - @$pb.TagNumber(4) - void clearSignedPrekey() => $_clearField(4); - - @$pb.TagNumber(5) - $core.List<$core.int> get signedPrekeySignature => $_getN(4); - @$pb.TagNumber(5) - set signedPrekeySignature($core.List<$core.int> value) => - $_setBytes(4, value); - @$pb.TagNumber(5) - $core.bool hasSignedPrekeySignature() => $_has(4); - @$pb.TagNumber(5) - void clearSignedPrekeySignature() => $_clearField(5); - - @$pb.TagNumber(6) - $fixnum.Int64 get signedPrekeyId => $_getI64(5); - @$pb.TagNumber(6) - set signedPrekeyId($fixnum.Int64 value) => $_setInt64(5, value); - @$pb.TagNumber(6) - $core.bool hasSignedPrekeyId() => $_has(5); - @$pb.TagNumber(6) - void clearSignedPrekeyId() => $_clearField(6); - - @$pb.TagNumber(7) - $core.List<$core.int> get username => $_getN(6); - @$pb.TagNumber(7) - set username($core.List<$core.int> value) => $_setBytes(6, value); - @$pb.TagNumber(7) - $core.bool hasUsername() => $_has(6); - @$pb.TagNumber(7) - void clearUsername() => $_clearField(7); - - @$pb.TagNumber(8) - $fixnum.Int64 get registrationId => $_getI64(7); - @$pb.TagNumber(8) - set registrationId($fixnum.Int64 value) => $_setInt64(7, value); - @$pb.TagNumber(8) - $core.bool hasRegistrationId() => $_has(7); - @$pb.TagNumber(8) - void clearRegistrationId() => $_clearField(8); - - @$pb.TagNumber(9) - Response_PqcBundle get pqcBundle => $_getN(8); - @$pb.TagNumber(9) - set pqcBundle(Response_PqcBundle value) => $_setField(9, value); - @$pb.TagNumber(9) - $core.bool hasPqcBundle() => $_has(8); - @$pb.TagNumber(9) - void clearPqcBundle() => $_clearField(9); - @$pb.TagNumber(9) - Response_PqcBundle ensurePqcBundle() => $_ensure(8); -} - -class Response_UploadToken extends $pb.GeneratedMessage { - factory Response_UploadToken({ - $core.List<$core.int>? uploadToken, - $core.Iterable<$core.List<$core.int>>? downloadTokens, - }) { - final result = create(); - if (uploadToken != null) result.uploadToken = uploadToken; - if (downloadTokens != null) result.downloadTokens.addAll(downloadTokens); - return result; - } - - Response_UploadToken._(); - - factory Response_UploadToken.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_UploadToken.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.UploadToken', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'uploadToken', $pb.PbFieldType.OY) - ..p<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'downloadTokens', $pb.PbFieldType.PY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_UploadToken clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_UploadToken copyWith(void Function(Response_UploadToken) updates) => - super.copyWith((message) => updates(message as Response_UploadToken)) - as Response_UploadToken; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_UploadToken create() => Response_UploadToken._(); - @$core.override - Response_UploadToken createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_UploadToken getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_UploadToken? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get uploadToken => $_getN(0); - @$pb.TagNumber(1) - set uploadToken($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasUploadToken() => $_has(0); - @$pb.TagNumber(1) - void clearUploadToken() => $_clearField(1); - - @$pb.TagNumber(2) - $pb.PbList<$core.List<$core.int>> get downloadTokens => $_getList(1); -} - -class Response_DownloadTokens extends $pb.GeneratedMessage { - factory Response_DownloadTokens({ - $core.Iterable<$core.List<$core.int>>? downloadTokens, - }) { - final result = create(); - if (downloadTokens != null) result.downloadTokens.addAll(downloadTokens); - return result; - } - - Response_DownloadTokens._(); - - factory Response_DownloadTokens.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_DownloadTokens.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.DownloadTokens', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..p<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'downloadTokens', $pb.PbFieldType.PY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_DownloadTokens clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_DownloadTokens copyWith( - void Function(Response_DownloadTokens) updates) => - super.copyWith((message) => updates(message as Response_DownloadTokens)) - as Response_DownloadTokens; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_DownloadTokens create() => Response_DownloadTokens._(); - @$core.override - Response_DownloadTokens createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_DownloadTokens getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_DownloadTokens? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList<$core.List<$core.int>> get downloadTokens => $_getList(0); -} - -class Response_ProofOfWork extends $pb.GeneratedMessage { - factory Response_ProofOfWork({ - $core.String? prefix, - $fixnum.Int64? difficulty, - }) { - final result = create(); - if (prefix != null) result.prefix = prefix; - if (difficulty != null) result.difficulty = difficulty; - return result; - } - - Response_ProofOfWork._(); - - factory Response_ProofOfWork.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_ProofOfWork.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.ProofOfWork', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'prefix') - ..aInt64(2, _omitFieldNames ? '' : 'difficulty') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_ProofOfWork clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_ProofOfWork copyWith(void Function(Response_ProofOfWork) updates) => - super.copyWith((message) => updates(message as Response_ProofOfWork)) - as Response_ProofOfWork; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_ProofOfWork create() => Response_ProofOfWork._(); - @$core.override - Response_ProofOfWork createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_ProofOfWork getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_ProofOfWork? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get prefix => $_getSZ(0); - @$pb.TagNumber(1) - set prefix($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasPrefix() => $_has(0); - @$pb.TagNumber(1) - void clearPrefix() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get difficulty => $_getI64(1); - @$pb.TagNumber(2) - set difficulty($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasDifficulty() => $_has(1); - @$pb.TagNumber(2) - void clearDifficulty() => $_clearField(2); -} - -class Response_PasswordlessNotificationMessage extends $pb.GeneratedMessage { - factory Response_PasswordlessNotificationMessage({ - $fixnum.Int64? id, - $core.List<$core.int>? encryptedMessage, - }) { - final result = create(); - if (id != null) result.id = id; - if (encryptedMessage != null) result.encryptedMessage = encryptedMessage; - return result; - } - - Response_PasswordlessNotificationMessage._(); - - factory Response_PasswordlessNotificationMessage.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PasswordlessNotificationMessage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PasswordlessNotificationMessage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'id') - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'encryptedMessage', $pb.PbFieldType.OY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PasswordlessNotificationMessage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PasswordlessNotificationMessage copyWith( - void Function(Response_PasswordlessNotificationMessage) updates) => - super.copyWith((message) => - updates(message as Response_PasswordlessNotificationMessage)) - as Response_PasswordlessNotificationMessage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PasswordlessNotificationMessage create() => - Response_PasswordlessNotificationMessage._(); - @$core.override - Response_PasswordlessNotificationMessage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PasswordlessNotificationMessage getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Response_PasswordlessNotificationMessage>(create); - static Response_PasswordlessNotificationMessage? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get id => $_getI64(0); - @$pb.TagNumber(1) - set id($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasId() => $_has(0); - @$pb.TagNumber(1) - void clearId() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get encryptedMessage => $_getN(1); - @$pb.TagNumber(2) - set encryptedMessage($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasEncryptedMessage() => $_has(1); - @$pb.TagNumber(2) - void clearEncryptedMessage() => $_clearField(2); -} - -class Response_PasswordlessNotificationMessages extends $pb.GeneratedMessage { - factory Response_PasswordlessNotificationMessages({ - $core.Iterable? messages, - }) { - final result = create(); - if (messages != null) result.messages.addAll(messages); - return result; - } - - Response_PasswordlessNotificationMessages._(); - - factory Response_PasswordlessNotificationMessages.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PasswordlessNotificationMessages.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PasswordlessNotificationMessages', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM( - 1, _omitFieldNames ? '' : 'messages', - subBuilder: Response_PasswordlessNotificationMessage.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PasswordlessNotificationMessages clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PasswordlessNotificationMessages copyWith( - void Function(Response_PasswordlessNotificationMessages) updates) => - super.copyWith((message) => - updates(message as Response_PasswordlessNotificationMessages)) - as Response_PasswordlessNotificationMessages; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PasswordlessNotificationMessages create() => - Response_PasswordlessNotificationMessages._(); - @$core.override - Response_PasswordlessNotificationMessages createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PasswordlessNotificationMessages getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor< - Response_PasswordlessNotificationMessages>(create); - static Response_PasswordlessNotificationMessages? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get messages => - $_getList(0); -} - -class Response_PresignedPost extends $pb.GeneratedMessage { - factory Response_PresignedPost({ - $core.String? url, - $core.Iterable<$core.MapEntry<$core.String, $core.String>>? fields, - }) { - final result = create(); - if (url != null) result.url = url; - if (fields != null) result.fields.addEntries(fields); - return result; - } - - Response_PresignedPost._(); - - factory Response_PresignedPost.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PresignedPost.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PresignedPost', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'url') - ..m<$core.String, $core.String>(2, _omitFieldNames ? '' : 'fields', - entryClassName: 'Response.PresignedPost.FieldsEntry', - keyFieldType: $pb.PbFieldType.OS, - valueFieldType: $pb.PbFieldType.OS, - packageName: const $pb.PackageName('server_to_client')) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PresignedPost clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PresignedPost copyWith( - void Function(Response_PresignedPost) updates) => - super.copyWith((message) => updates(message as Response_PresignedPost)) - as Response_PresignedPost; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PresignedPost create() => Response_PresignedPost._(); - @$core.override - Response_PresignedPost createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PresignedPost getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PresignedPost? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get url => $_getSZ(0); - @$pb.TagNumber(1) - set url($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasUrl() => $_has(0); - @$pb.TagNumber(1) - void clearUrl() => $_clearField(1); - - @$pb.TagNumber(2) - $pb.PbMap<$core.String, $core.String> get fields => $_getMap(1); -} - -class Response_MemoriesUploadUrls extends $pb.GeneratedMessage { - factory Response_MemoriesUploadUrls({ - $core.String? mediaId, - Response_PresignedPost? thumbnailUpload, - Response_PresignedPost? fullUpload, - }) { - final result = create(); - if (mediaId != null) result.mediaId = mediaId; - if (thumbnailUpload != null) result.thumbnailUpload = thumbnailUpload; - if (fullUpload != null) result.fullUpload = fullUpload; - return result; - } - - Response_MemoriesUploadUrls._(); - - factory Response_MemoriesUploadUrls.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_MemoriesUploadUrls.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.MemoriesUploadUrls', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'mediaId') - ..aOM(2, _omitFieldNames ? '' : 'thumbnailUpload', - subBuilder: Response_PresignedPost.create) - ..aOM(3, _omitFieldNames ? '' : 'fullUpload', - subBuilder: Response_PresignedPost.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUploadUrls clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUploadUrls copyWith( - void Function(Response_MemoriesUploadUrls) updates) => - super.copyWith( - (message) => updates(message as Response_MemoriesUploadUrls)) - as Response_MemoriesUploadUrls; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_MemoriesUploadUrls create() => - Response_MemoriesUploadUrls._(); - @$core.override - Response_MemoriesUploadUrls createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_MemoriesUploadUrls getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_MemoriesUploadUrls? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get mediaId => $_getSZ(0); - @$pb.TagNumber(1) - set mediaId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMediaId() => $_has(0); - @$pb.TagNumber(1) - void clearMediaId() => $_clearField(1); - - @$pb.TagNumber(2) - Response_PresignedPost get thumbnailUpload => $_getN(1); - @$pb.TagNumber(2) - set thumbnailUpload(Response_PresignedPost value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasThumbnailUpload() => $_has(1); - @$pb.TagNumber(2) - void clearThumbnailUpload() => $_clearField(2); - @$pb.TagNumber(2) - Response_PresignedPost ensureThumbnailUpload() => $_ensure(1); - - @$pb.TagNumber(3) - Response_PresignedPost get fullUpload => $_getN(2); - @$pb.TagNumber(3) - set fullUpload(Response_PresignedPost value) => $_setField(3, value); - @$pb.TagNumber(3) - $core.bool hasFullUpload() => $_has(2); - @$pb.TagNumber(3) - void clearFullUpload() => $_clearField(3); - @$pb.TagNumber(3) - Response_PresignedPost ensureFullUpload() => $_ensure(2); -} - -class Response_MediaItem extends $pb.GeneratedMessage { - factory Response_MediaItem({ - $core.String? mediaId, - $fixnum.Int64? originalDate, - $core.String? thumbnailDownloadUrl, - }) { - final result = create(); - if (mediaId != null) result.mediaId = mediaId; - if (originalDate != null) result.originalDate = originalDate; - if (thumbnailDownloadUrl != null) - result.thumbnailDownloadUrl = thumbnailDownloadUrl; - return result; - } - - Response_MediaItem._(); - - factory Response_MediaItem.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_MediaItem.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.MediaItem', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'mediaId') - ..aInt64(2, _omitFieldNames ? '' : 'originalDate') - ..aOS(3, _omitFieldNames ? '' : 'thumbnailDownloadUrl') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MediaItem clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MediaItem copyWith(void Function(Response_MediaItem) updates) => - super.copyWith((message) => updates(message as Response_MediaItem)) - as Response_MediaItem; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_MediaItem create() => Response_MediaItem._(); - @$core.override - Response_MediaItem createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_MediaItem getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_MediaItem? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get mediaId => $_getSZ(0); - @$pb.TagNumber(1) - set mediaId($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasMediaId() => $_has(0); - @$pb.TagNumber(1) - void clearMediaId() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get originalDate => $_getI64(1); - @$pb.TagNumber(2) - set originalDate($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasOriginalDate() => $_has(1); - @$pb.TagNumber(2) - void clearOriginalDate() => $_clearField(2); - - @$pb.TagNumber(3) - $core.String get thumbnailDownloadUrl => $_getSZ(2); - @$pb.TagNumber(3) - set thumbnailDownloadUrl($core.String value) => $_setString(2, value); - @$pb.TagNumber(3) - $core.bool hasThumbnailDownloadUrl() => $_has(2); - @$pb.TagNumber(3) - void clearThumbnailDownloadUrl() => $_clearField(3); -} - -class Response_MemoriesList extends $pb.GeneratedMessage { - factory Response_MemoriesList({ - $core.Iterable? items, - }) { - final result = create(); - if (items != null) result.items.addAll(items); - return result; - } - - Response_MemoriesList._(); - - factory Response_MemoriesList.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_MemoriesList.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.MemoriesList', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..pPM(1, _omitFieldNames ? '' : 'items', - subBuilder: Response_MediaItem.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesList clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesList copyWith( - void Function(Response_MemoriesList) updates) => - super.copyWith((message) => updates(message as Response_MemoriesList)) - as Response_MemoriesList; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_MemoriesList create() => Response_MemoriesList._(); - @$core.override - Response_MemoriesList createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_MemoriesList getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_MemoriesList? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList get items => $_getList(0); -} - -class Response_MemoriesUrl extends $pb.GeneratedMessage { - factory Response_MemoriesUrl({ - $core.String? fullDownloadUrl, - }) { - final result = create(); - if (fullDownloadUrl != null) result.fullDownloadUrl = fullDownloadUrl; - return result; - } - - Response_MemoriesUrl._(); - - factory Response_MemoriesUrl.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_MemoriesUrl.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.MemoriesUrl', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aOS(1, _omitFieldNames ? '' : 'fullDownloadUrl') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUrl clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUrl copyWith(void Function(Response_MemoriesUrl) updates) => - super.copyWith((message) => updates(message as Response_MemoriesUrl)) - as Response_MemoriesUrl; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_MemoriesUrl create() => Response_MemoriesUrl._(); - @$core.override - Response_MemoriesUrl createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_MemoriesUrl getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_MemoriesUrl? _defaultInstance; - - @$pb.TagNumber(1) - $core.String get fullDownloadUrl => $_getSZ(0); - @$pb.TagNumber(1) - set fullDownloadUrl($core.String value) => $_setString(0, value); - @$pb.TagNumber(1) - $core.bool hasFullDownloadUrl() => $_has(0); - @$pb.TagNumber(1) - void clearFullDownloadUrl() => $_clearField(1); -} - -class Response_MemoriesUsage extends $pb.GeneratedMessage { - factory Response_MemoriesUsage({ - $fixnum.Int64? maxBytes, - $fixnum.Int64? currentBytes, - $fixnum.Int64? count, - }) { - final result = create(); - if (maxBytes != null) result.maxBytes = maxBytes; - if (currentBytes != null) result.currentBytes = currentBytes; - if (count != null) result.count = count; - return result; - } - - Response_MemoriesUsage._(); - - factory Response_MemoriesUsage.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_MemoriesUsage.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.MemoriesUsage', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..aInt64(1, _omitFieldNames ? '' : 'maxBytes') - ..aInt64(2, _omitFieldNames ? '' : 'currentBytes') - ..aInt64(3, _omitFieldNames ? '' : 'count') - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUsage clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_MemoriesUsage copyWith( - void Function(Response_MemoriesUsage) updates) => - super.copyWith((message) => updates(message as Response_MemoriesUsage)) - as Response_MemoriesUsage; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_MemoriesUsage create() => Response_MemoriesUsage._(); - @$core.override - Response_MemoriesUsage createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_MemoriesUsage getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_MemoriesUsage? _defaultInstance; - - @$pb.TagNumber(1) - $fixnum.Int64 get maxBytes => $_getI64(0); - @$pb.TagNumber(1) - set maxBytes($fixnum.Int64 value) => $_setInt64(0, value); - @$pb.TagNumber(1) - $core.bool hasMaxBytes() => $_has(0); - @$pb.TagNumber(1) - void clearMaxBytes() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get currentBytes => $_getI64(1); - @$pb.TagNumber(2) - set currentBytes($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasCurrentBytes() => $_has(1); - @$pb.TagNumber(2) - void clearCurrentBytes() => $_clearField(2); - - @$pb.TagNumber(3) - $fixnum.Int64 get count => $_getI64(2); - @$pb.TagNumber(3) - set count($fixnum.Int64 value) => $_setInt64(2, value); - @$pb.TagNumber(3) - $core.bool hasCount() => $_has(2); - @$pb.TagNumber(3) - void clearCount() => $_clearField(3); -} - -class Response_PrivacyPassParameters extends $pb.GeneratedMessage { - factory Response_PrivacyPassParameters({ - $core.List<$core.int>? tokenChallenge, - $core.List<$core.int>? publicKey, - $core.int? maxBatchSize, - $core.int? maxAgeSeconds, - $core.int? dailyTokenLimit, - $core.int? issuanceCooldownSeconds, - }) { - final result = create(); - if (tokenChallenge != null) result.tokenChallenge = tokenChallenge; - if (publicKey != null) result.publicKey = publicKey; - if (maxBatchSize != null) result.maxBatchSize = maxBatchSize; - if (maxAgeSeconds != null) result.maxAgeSeconds = maxAgeSeconds; - if (dailyTokenLimit != null) result.dailyTokenLimit = dailyTokenLimit; - if (issuanceCooldownSeconds != null) - result.issuanceCooldownSeconds = issuanceCooldownSeconds; - return result; - } - - Response_PrivacyPassParameters._(); - - factory Response_PrivacyPassParameters.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PrivacyPassParameters.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PrivacyPassParameters', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..a<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'tokenChallenge', $pb.PbFieldType.OY) - ..a<$core.List<$core.int>>( - 2, _omitFieldNames ? '' : 'publicKey', $pb.PbFieldType.OY) - ..aI(3, _omitFieldNames ? '' : 'maxBatchSize', - fieldType: $pb.PbFieldType.OU3) - ..aI(4, _omitFieldNames ? '' : 'maxAgeSeconds', - fieldType: $pb.PbFieldType.OU3) - ..aI(5, _omitFieldNames ? '' : 'dailyTokenLimit', - fieldType: $pb.PbFieldType.OU3) - ..aI(6, _omitFieldNames ? '' : 'issuanceCooldownSeconds', - fieldType: $pb.PbFieldType.OU3) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PrivacyPassParameters clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PrivacyPassParameters copyWith( - void Function(Response_PrivacyPassParameters) updates) => - super.copyWith( - (message) => updates(message as Response_PrivacyPassParameters)) - as Response_PrivacyPassParameters; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PrivacyPassParameters create() => - Response_PrivacyPassParameters._(); - @$core.override - Response_PrivacyPassParameters createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PrivacyPassParameters getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_PrivacyPassParameters? _defaultInstance; - - @$pb.TagNumber(1) - $core.List<$core.int> get tokenChallenge => $_getN(0); - @$pb.TagNumber(1) - set tokenChallenge($core.List<$core.int> value) => $_setBytes(0, value); - @$pb.TagNumber(1) - $core.bool hasTokenChallenge() => $_has(0); - @$pb.TagNumber(1) - void clearTokenChallenge() => $_clearField(1); - - @$pb.TagNumber(2) - $core.List<$core.int> get publicKey => $_getN(1); - @$pb.TagNumber(2) - set publicKey($core.List<$core.int> value) => $_setBytes(1, value); - @$pb.TagNumber(2) - $core.bool hasPublicKey() => $_has(1); - @$pb.TagNumber(2) - void clearPublicKey() => $_clearField(2); - - @$pb.TagNumber(3) - $core.int get maxBatchSize => $_getIZ(2); - @$pb.TagNumber(3) - set maxBatchSize($core.int value) => $_setUnsignedInt32(2, value); - @$pb.TagNumber(3) - $core.bool hasMaxBatchSize() => $_has(2); - @$pb.TagNumber(3) - void clearMaxBatchSize() => $_clearField(3); - - @$pb.TagNumber(4) - $core.int get maxAgeSeconds => $_getIZ(3); - @$pb.TagNumber(4) - set maxAgeSeconds($core.int value) => $_setUnsignedInt32(3, value); - @$pb.TagNumber(4) - $core.bool hasMaxAgeSeconds() => $_has(3); - @$pb.TagNumber(4) - void clearMaxAgeSeconds() => $_clearField(4); - - @$pb.TagNumber(5) - $core.int get dailyTokenLimit => $_getIZ(4); - @$pb.TagNumber(5) - set dailyTokenLimit($core.int value) => $_setUnsignedInt32(4, value); - @$pb.TagNumber(5) - $core.bool hasDailyTokenLimit() => $_has(4); - @$pb.TagNumber(5) - void clearDailyTokenLimit() => $_clearField(5); - - @$pb.TagNumber(6) - $core.int get issuanceCooldownSeconds => $_getIZ(5); - @$pb.TagNumber(6) - set issuanceCooldownSeconds($core.int value) => $_setUnsignedInt32(5, value); - @$pb.TagNumber(6) - $core.bool hasIssuanceCooldownSeconds() => $_has(5); - @$pb.TagNumber(6) - void clearIssuanceCooldownSeconds() => $_clearField(6); -} - -class Response_PrivacyPassTokenResponses extends $pb.GeneratedMessage { - factory Response_PrivacyPassTokenResponses({ - $core.Iterable<$core.List<$core.int>>? tokenResponses, - }) { - final result = create(); - if (tokenResponses != null) result.tokenResponses.addAll(tokenResponses); - return result; - } - - Response_PrivacyPassTokenResponses._(); - - factory Response_PrivacyPassTokenResponses.fromBuffer( - $core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_PrivacyPassTokenResponses.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.PrivacyPassTokenResponses', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..p<$core.List<$core.int>>( - 1, _omitFieldNames ? '' : 'tokenResponses', $pb.PbFieldType.PY) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PrivacyPassTokenResponses clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_PrivacyPassTokenResponses copyWith( - void Function(Response_PrivacyPassTokenResponses) updates) => - super.copyWith((message) => - updates(message as Response_PrivacyPassTokenResponses)) - as Response_PrivacyPassTokenResponses; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_PrivacyPassTokenResponses create() => - Response_PrivacyPassTokenResponses._(); - @$core.override - Response_PrivacyPassTokenResponses createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_PrivacyPassTokenResponses getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor( - create); - static Response_PrivacyPassTokenResponses? _defaultInstance; - - @$pb.TagNumber(1) - $pb.PbList<$core.List<$core.int>> get tokenResponses => $_getList(0); -} - -enum Response_Ok_Ok { - none, - userid, - authchallenge, - uploadtoken, - userdata, - authtoken, - authenticated, - plans, - planballance, - addaccountsinvites, - downloadtokens, - signedprekey, - proofOfWork, - passwordlessRecoveryServerKey, - passwordlessNotificationMessages, - memoriesUploadUrls, - memoriesList, - memoriesUrl, - memoriesUsage, - privacyPassParameters, - privacyPassTokenResponses, - notSet -} - -class Response_Ok extends $pb.GeneratedMessage { - factory Response_Ok({ - $core.bool? none, - $fixnum.Int64? userid, - $core.List<$core.int>? authchallenge, - Response_UploadToken? uploadtoken, - Response_UserData? userdata, - $core.List<$core.int>? authtoken, - Response_Authenticated? authenticated, - Response_Plans? plans, - Response_PlanBallance? planballance, - Response_AddAccountsInvites? addaccountsinvites, - Response_DownloadTokens? downloadtokens, - Response_SignedPreKey? signedprekey, - Response_ProofOfWork? proofOfWork, - $core.List<$core.int>? passwordlessRecoveryServerKey, - Response_PasswordlessNotificationMessages? passwordlessNotificationMessages, - Response_MemoriesUploadUrls? memoriesUploadUrls, - Response_MemoriesList? memoriesList, - Response_MemoriesUrl? memoriesUrl, - Response_MemoriesUsage? memoriesUsage, - Response_PrivacyPassParameters? privacyPassParameters, - Response_PrivacyPassTokenResponses? privacyPassTokenResponses, - }) { - final result = create(); - if (none != null) result.none = none; - if (userid != null) result.userid = userid; - if (authchallenge != null) result.authchallenge = authchallenge; - if (uploadtoken != null) result.uploadtoken = uploadtoken; - if (userdata != null) result.userdata = userdata; - if (authtoken != null) result.authtoken = authtoken; - if (authenticated != null) result.authenticated = authenticated; - if (plans != null) result.plans = plans; - if (planballance != null) result.planballance = planballance; - if (addaccountsinvites != null) - result.addaccountsinvites = addaccountsinvites; - if (downloadtokens != null) result.downloadtokens = downloadtokens; - if (signedprekey != null) result.signedprekey = signedprekey; - if (proofOfWork != null) result.proofOfWork = proofOfWork; - if (passwordlessRecoveryServerKey != null) - result.passwordlessRecoveryServerKey = passwordlessRecoveryServerKey; - if (passwordlessNotificationMessages != null) - result.passwordlessNotificationMessages = - passwordlessNotificationMessages; - if (memoriesUploadUrls != null) - result.memoriesUploadUrls = memoriesUploadUrls; - if (memoriesList != null) result.memoriesList = memoriesList; - if (memoriesUrl != null) result.memoriesUrl = memoriesUrl; - if (memoriesUsage != null) result.memoriesUsage = memoriesUsage; - if (privacyPassParameters != null) - result.privacyPassParameters = privacyPassParameters; - if (privacyPassTokenResponses != null) - result.privacyPassTokenResponses = privacyPassTokenResponses; - return result; - } - - Response_Ok._(); - - factory Response_Ok.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response_Ok.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, Response_Ok_Ok> _Response_Ok_OkByTag = { - 1: Response_Ok_Ok.none, - 2: Response_Ok_Ok.userid, - 3: Response_Ok_Ok.authchallenge, - 4: Response_Ok_Ok.uploadtoken, - 5: Response_Ok_Ok.userdata, - 6: Response_Ok_Ok.authtoken, - 8: Response_Ok_Ok.authenticated, - 9: Response_Ok_Ok.plans, - 10: Response_Ok_Ok.planballance, - 12: Response_Ok_Ok.addaccountsinvites, - 13: Response_Ok_Ok.downloadtokens, - 14: Response_Ok_Ok.signedprekey, - 15: Response_Ok_Ok.proofOfWork, - 16: Response_Ok_Ok.passwordlessRecoveryServerKey, - 17: Response_Ok_Ok.passwordlessNotificationMessages, - 18: Response_Ok_Ok.memoriesUploadUrls, - 19: Response_Ok_Ok.memoriesList, - 20: Response_Ok_Ok.memoriesUrl, - 21: Response_Ok_Ok.memoriesUsage, - 22: Response_Ok_Ok.privacyPassParameters, - 23: Response_Ok_Ok.privacyPassTokenResponses, - 0: Response_Ok_Ok.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response.Ok', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..oo(0, [ - 1, - 2, - 3, - 4, - 5, - 6, - 8, - 9, - 10, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ]) - ..aOB(1, _omitFieldNames ? '' : 'None', protoName: 'None') - ..aInt64(2, _omitFieldNames ? '' : 'userid') - ..a<$core.List<$core.int>>( - 3, _omitFieldNames ? '' : 'authchallenge', $pb.PbFieldType.OY) - ..aOM(4, _omitFieldNames ? '' : 'uploadtoken', - subBuilder: Response_UploadToken.create) - ..aOM(5, _omitFieldNames ? '' : 'userdata', - subBuilder: Response_UserData.create) - ..a<$core.List<$core.int>>( - 6, _omitFieldNames ? '' : 'authtoken', $pb.PbFieldType.OY) - ..aOM(8, _omitFieldNames ? '' : 'authenticated', - subBuilder: Response_Authenticated.create) - ..aOM(9, _omitFieldNames ? '' : 'plans', - subBuilder: Response_Plans.create) - ..aOM(10, _omitFieldNames ? '' : 'planballance', - subBuilder: Response_PlanBallance.create) - ..aOM( - 12, _omitFieldNames ? '' : 'addaccountsinvites', - subBuilder: Response_AddAccountsInvites.create) - ..aOM(13, _omitFieldNames ? '' : 'downloadtokens', - subBuilder: Response_DownloadTokens.create) - ..aOM(14, _omitFieldNames ? '' : 'signedprekey', - subBuilder: Response_SignedPreKey.create) - ..aOM(15, _omitFieldNames ? '' : 'proofOfWork', - protoName: 'proofOfWork', subBuilder: Response_ProofOfWork.create) - ..a<$core.List<$core.int>>( - 16, - _omitFieldNames ? '' : 'passwordlessRecoveryServerKey', - $pb.PbFieldType.OY) - ..aOM( - 17, _omitFieldNames ? '' : 'passwordlessNotificationMessages', - subBuilder: Response_PasswordlessNotificationMessages.create) - ..aOM( - 18, _omitFieldNames ? '' : 'memoriesUploadUrls', - subBuilder: Response_MemoriesUploadUrls.create) - ..aOM(19, _omitFieldNames ? '' : 'memoriesList', - subBuilder: Response_MemoriesList.create) - ..aOM(20, _omitFieldNames ? '' : 'memoriesUrl', - subBuilder: Response_MemoriesUrl.create) - ..aOM(21, _omitFieldNames ? '' : 'memoriesUsage', - subBuilder: Response_MemoriesUsage.create) - ..aOM( - 22, _omitFieldNames ? '' : 'privacyPassParameters', - subBuilder: Response_PrivacyPassParameters.create) - ..aOM( - 23, _omitFieldNames ? '' : 'privacyPassTokenResponses', - subBuilder: Response_PrivacyPassTokenResponses.create) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Ok clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response_Ok copyWith(void Function(Response_Ok) updates) => - super.copyWith((message) => updates(message as Response_Ok)) - as Response_Ok; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response_Ok create() => Response_Ok._(); - @$core.override - Response_Ok createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response_Ok getDefault() => _defaultInstance ??= - $pb.GeneratedMessage.$_defaultFor(create); - static Response_Ok? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(5) - @$pb.TagNumber(6) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - @$pb.TagNumber(12) - @$pb.TagNumber(13) - @$pb.TagNumber(14) - @$pb.TagNumber(15) - @$pb.TagNumber(16) - @$pb.TagNumber(17) - @$pb.TagNumber(18) - @$pb.TagNumber(19) - @$pb.TagNumber(20) - @$pb.TagNumber(21) - @$pb.TagNumber(22) - @$pb.TagNumber(23) - Response_Ok_Ok whichOk() => _Response_Ok_OkByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - @$pb.TagNumber(3) - @$pb.TagNumber(4) - @$pb.TagNumber(5) - @$pb.TagNumber(6) - @$pb.TagNumber(8) - @$pb.TagNumber(9) - @$pb.TagNumber(10) - @$pb.TagNumber(12) - @$pb.TagNumber(13) - @$pb.TagNumber(14) - @$pb.TagNumber(15) - @$pb.TagNumber(16) - @$pb.TagNumber(17) - @$pb.TagNumber(18) - @$pb.TagNumber(19) - @$pb.TagNumber(20) - @$pb.TagNumber(21) - @$pb.TagNumber(22) - @$pb.TagNumber(23) - void clearOk() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - $core.bool get none => $_getBF(0); - @$pb.TagNumber(1) - set none($core.bool value) => $_setBool(0, value); - @$pb.TagNumber(1) - $core.bool hasNone() => $_has(0); - @$pb.TagNumber(1) - void clearNone() => $_clearField(1); - - @$pb.TagNumber(2) - $fixnum.Int64 get userid => $_getI64(1); - @$pb.TagNumber(2) - set userid($fixnum.Int64 value) => $_setInt64(1, value); - @$pb.TagNumber(2) - $core.bool hasUserid() => $_has(1); - @$pb.TagNumber(2) - void clearUserid() => $_clearField(2); - - @$pb.TagNumber(3) - $core.List<$core.int> get authchallenge => $_getN(2); - @$pb.TagNumber(3) - set authchallenge($core.List<$core.int> value) => $_setBytes(2, value); - @$pb.TagNumber(3) - $core.bool hasAuthchallenge() => $_has(2); - @$pb.TagNumber(3) - void clearAuthchallenge() => $_clearField(3); - - @$pb.TagNumber(4) - Response_UploadToken get uploadtoken => $_getN(3); - @$pb.TagNumber(4) - set uploadtoken(Response_UploadToken value) => $_setField(4, value); - @$pb.TagNumber(4) - $core.bool hasUploadtoken() => $_has(3); - @$pb.TagNumber(4) - void clearUploadtoken() => $_clearField(4); - @$pb.TagNumber(4) - Response_UploadToken ensureUploadtoken() => $_ensure(3); - - @$pb.TagNumber(5) - Response_UserData get userdata => $_getN(4); - @$pb.TagNumber(5) - set userdata(Response_UserData value) => $_setField(5, value); - @$pb.TagNumber(5) - $core.bool hasUserdata() => $_has(4); - @$pb.TagNumber(5) - void clearUserdata() => $_clearField(5); - @$pb.TagNumber(5) - Response_UserData ensureUserdata() => $_ensure(4); - - @$pb.TagNumber(6) - $core.List<$core.int> get authtoken => $_getN(5); - @$pb.TagNumber(6) - set authtoken($core.List<$core.int> value) => $_setBytes(5, value); - @$pb.TagNumber(6) - $core.bool hasAuthtoken() => $_has(5); - @$pb.TagNumber(6) - void clearAuthtoken() => $_clearField(6); - - @$pb.TagNumber(8) - Response_Authenticated get authenticated => $_getN(6); - @$pb.TagNumber(8) - set authenticated(Response_Authenticated value) => $_setField(8, value); - @$pb.TagNumber(8) - $core.bool hasAuthenticated() => $_has(6); - @$pb.TagNumber(8) - void clearAuthenticated() => $_clearField(8); - @$pb.TagNumber(8) - Response_Authenticated ensureAuthenticated() => $_ensure(6); - - @$pb.TagNumber(9) - Response_Plans get plans => $_getN(7); - @$pb.TagNumber(9) - set plans(Response_Plans value) => $_setField(9, value); - @$pb.TagNumber(9) - $core.bool hasPlans() => $_has(7); - @$pb.TagNumber(9) - void clearPlans() => $_clearField(9); - @$pb.TagNumber(9) - Response_Plans ensurePlans() => $_ensure(7); - - @$pb.TagNumber(10) - Response_PlanBallance get planballance => $_getN(8); - @$pb.TagNumber(10) - set planballance(Response_PlanBallance value) => $_setField(10, value); - @$pb.TagNumber(10) - $core.bool hasPlanballance() => $_has(8); - @$pb.TagNumber(10) - void clearPlanballance() => $_clearField(10); - @$pb.TagNumber(10) - Response_PlanBallance ensurePlanballance() => $_ensure(8); - - @$pb.TagNumber(12) - Response_AddAccountsInvites get addaccountsinvites => $_getN(9); - @$pb.TagNumber(12) - set addaccountsinvites(Response_AddAccountsInvites value) => - $_setField(12, value); - @$pb.TagNumber(12) - $core.bool hasAddaccountsinvites() => $_has(9); - @$pb.TagNumber(12) - void clearAddaccountsinvites() => $_clearField(12); - @$pb.TagNumber(12) - Response_AddAccountsInvites ensureAddaccountsinvites() => $_ensure(9); - - @$pb.TagNumber(13) - Response_DownloadTokens get downloadtokens => $_getN(10); - @$pb.TagNumber(13) - set downloadtokens(Response_DownloadTokens value) => $_setField(13, value); - @$pb.TagNumber(13) - $core.bool hasDownloadtokens() => $_has(10); - @$pb.TagNumber(13) - void clearDownloadtokens() => $_clearField(13); - @$pb.TagNumber(13) - Response_DownloadTokens ensureDownloadtokens() => $_ensure(10); - - @$pb.TagNumber(14) - Response_SignedPreKey get signedprekey => $_getN(11); - @$pb.TagNumber(14) - set signedprekey(Response_SignedPreKey value) => $_setField(14, value); - @$pb.TagNumber(14) - $core.bool hasSignedprekey() => $_has(11); - @$pb.TagNumber(14) - void clearSignedprekey() => $_clearField(14); - @$pb.TagNumber(14) - Response_SignedPreKey ensureSignedprekey() => $_ensure(11); - - @$pb.TagNumber(15) - Response_ProofOfWork get proofOfWork => $_getN(12); - @$pb.TagNumber(15) - set proofOfWork(Response_ProofOfWork value) => $_setField(15, value); - @$pb.TagNumber(15) - $core.bool hasProofOfWork() => $_has(12); - @$pb.TagNumber(15) - void clearProofOfWork() => $_clearField(15); - @$pb.TagNumber(15) - Response_ProofOfWork ensureProofOfWork() => $_ensure(12); - - @$pb.TagNumber(16) - $core.List<$core.int> get passwordlessRecoveryServerKey => $_getN(13); - @$pb.TagNumber(16) - set passwordlessRecoveryServerKey($core.List<$core.int> value) => - $_setBytes(13, value); - @$pb.TagNumber(16) - $core.bool hasPasswordlessRecoveryServerKey() => $_has(13); - @$pb.TagNumber(16) - void clearPasswordlessRecoveryServerKey() => $_clearField(16); - - @$pb.TagNumber(17) - Response_PasswordlessNotificationMessages - get passwordlessNotificationMessages => $_getN(14); - @$pb.TagNumber(17) - set passwordlessNotificationMessages( - Response_PasswordlessNotificationMessages value) => - $_setField(17, value); - @$pb.TagNumber(17) - $core.bool hasPasswordlessNotificationMessages() => $_has(14); - @$pb.TagNumber(17) - void clearPasswordlessNotificationMessages() => $_clearField(17); - @$pb.TagNumber(17) - Response_PasswordlessNotificationMessages - ensurePasswordlessNotificationMessages() => $_ensure(14); - - @$pb.TagNumber(18) - Response_MemoriesUploadUrls get memoriesUploadUrls => $_getN(15); - @$pb.TagNumber(18) - set memoriesUploadUrls(Response_MemoriesUploadUrls value) => - $_setField(18, value); - @$pb.TagNumber(18) - $core.bool hasMemoriesUploadUrls() => $_has(15); - @$pb.TagNumber(18) - void clearMemoriesUploadUrls() => $_clearField(18); - @$pb.TagNumber(18) - Response_MemoriesUploadUrls ensureMemoriesUploadUrls() => $_ensure(15); - - @$pb.TagNumber(19) - Response_MemoriesList get memoriesList => $_getN(16); - @$pb.TagNumber(19) - set memoriesList(Response_MemoriesList value) => $_setField(19, value); - @$pb.TagNumber(19) - $core.bool hasMemoriesList() => $_has(16); - @$pb.TagNumber(19) - void clearMemoriesList() => $_clearField(19); - @$pb.TagNumber(19) - Response_MemoriesList ensureMemoriesList() => $_ensure(16); - - @$pb.TagNumber(20) - Response_MemoriesUrl get memoriesUrl => $_getN(17); - @$pb.TagNumber(20) - set memoriesUrl(Response_MemoriesUrl value) => $_setField(20, value); - @$pb.TagNumber(20) - $core.bool hasMemoriesUrl() => $_has(17); - @$pb.TagNumber(20) - void clearMemoriesUrl() => $_clearField(20); - @$pb.TagNumber(20) - Response_MemoriesUrl ensureMemoriesUrl() => $_ensure(17); - - @$pb.TagNumber(21) - Response_MemoriesUsage get memoriesUsage => $_getN(18); - @$pb.TagNumber(21) - set memoriesUsage(Response_MemoriesUsage value) => $_setField(21, value); - @$pb.TagNumber(21) - $core.bool hasMemoriesUsage() => $_has(18); - @$pb.TagNumber(21) - void clearMemoriesUsage() => $_clearField(21); - @$pb.TagNumber(21) - Response_MemoriesUsage ensureMemoriesUsage() => $_ensure(18); - - @$pb.TagNumber(22) - Response_PrivacyPassParameters get privacyPassParameters => $_getN(19); - @$pb.TagNumber(22) - set privacyPassParameters(Response_PrivacyPassParameters value) => - $_setField(22, value); - @$pb.TagNumber(22) - $core.bool hasPrivacyPassParameters() => $_has(19); - @$pb.TagNumber(22) - void clearPrivacyPassParameters() => $_clearField(22); - @$pb.TagNumber(22) - Response_PrivacyPassParameters ensurePrivacyPassParameters() => $_ensure(19); - - @$pb.TagNumber(23) - Response_PrivacyPassTokenResponses get privacyPassTokenResponses => - $_getN(20); - @$pb.TagNumber(23) - set privacyPassTokenResponses(Response_PrivacyPassTokenResponses value) => - $_setField(23, value); - @$pb.TagNumber(23) - $core.bool hasPrivacyPassTokenResponses() => $_has(20); - @$pb.TagNumber(23) - void clearPrivacyPassTokenResponses() => $_clearField(23); - @$pb.TagNumber(23) - Response_PrivacyPassTokenResponses ensurePrivacyPassTokenResponses() => - $_ensure(20); -} - -enum Response_Response { ok, error, notSet } - -class Response extends $pb.GeneratedMessage { - factory Response({ - Response_Ok? ok, - $0.ErrorCode? error, - }) { - final result = create(); - if (ok != null) result.ok = ok; - if (error != null) result.error = error; - return result; - } - - Response._(); - - factory Response.fromBuffer($core.List<$core.int> data, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromBuffer(data, registry); - factory Response.fromJson($core.String json, - [$pb.ExtensionRegistry registry = $pb.ExtensionRegistry.EMPTY]) => - create()..mergeFromJson(json, registry); - - static const $core.Map<$core.int, Response_Response> _Response_ResponseByTag = - { - 1: Response_Response.ok, - 2: Response_Response.error, - 0: Response_Response.notSet - }; - static final $pb.BuilderInfo _i = $pb.BuilderInfo( - _omitMessageNames ? '' : 'Response', - package: - const $pb.PackageName(_omitMessageNames ? '' : 'server_to_client'), - createEmptyInstance: create) - ..oo(0, [1, 2]) - ..aOM(1, _omitFieldNames ? '' : 'ok', - subBuilder: Response_Ok.create) - ..aE<$0.ErrorCode>(2, _omitFieldNames ? '' : 'error', - enumValues: $0.ErrorCode.values) - ..hasRequiredFields = false; - - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response clone() => deepCopy(); - @$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.') - Response copyWith(void Function(Response) updates) => - super.copyWith((message) => updates(message as Response)) as Response; - - @$core.override - $pb.BuilderInfo get info_ => _i; - - @$core.pragma('dart2js:noInline') - static Response create() => Response._(); - @$core.override - Response createEmptyInstance() => create(); - @$core.pragma('dart2js:noInline') - static Response getDefault() => - _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); - static Response? _defaultInstance; - - @$pb.TagNumber(1) - @$pb.TagNumber(2) - Response_Response whichResponse() => - _Response_ResponseByTag[$_whichOneof(0)]!; - @$pb.TagNumber(1) - @$pb.TagNumber(2) - void clearResponse() => $_clearField($_whichOneof(0)); - - @$pb.TagNumber(1) - Response_Ok get ok => $_getN(0); - @$pb.TagNumber(1) - set ok(Response_Ok value) => $_setField(1, value); - @$pb.TagNumber(1) - $core.bool hasOk() => $_has(0); - @$pb.TagNumber(1) - void clearOk() => $_clearField(1); - @$pb.TagNumber(1) - Response_Ok ensureOk() => $_ensure(0); - - @$pb.TagNumber(2) - $0.ErrorCode get error => $_getN(1); - @$pb.TagNumber(2) - set error($0.ErrorCode value) => $_setField(2, value); - @$pb.TagNumber(2) - $core.bool hasError() => $_has(1); - @$pb.TagNumber(2) - void clearError() => $_clearField(2); -} - -const $core.bool _omitFieldNames = - $core.bool.fromEnvironment('protobuf.omit_field_names'); -const $core.bool _omitMessageNames = - $core.bool.fromEnvironment('protobuf.omit_message_names'); diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart deleted file mode 100644 index 86f414a5..00000000 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pbenum.dart +++ /dev/null @@ -1,11 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/server_to_client.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart deleted file mode 100644 index 413217f4..00000000 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pbjson.dart +++ /dev/null @@ -1,1135 +0,0 @@ -// This is a generated file - do not edit. -// -// Generated from api/websocket/server_to_client.proto. - -// @dart = 3.3 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: curly_braces_in_flow_control_structures -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_relative_imports -// ignore_for_file: unused_import - -import 'dart:convert' as $convert; -import 'dart:core' as $core; -import 'dart:typed_data' as $typed_data; - -@$core.Deprecated('Use serverToClientDescriptor instead') -const ServerToClient$json = { - '1': 'ServerToClient', - '2': [ - { - '1': 'V0', - '3': 1, - '4': 1, - '5': 11, - '6': '.server_to_client.V0', - '9': 0, - '10': 'V0' - }, - ], - '8': [ - {'1': 'v'}, - ], -}; - -/// Descriptor for `ServerToClient`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List serverToClientDescriptor = $convert.base64Decode( - 'Cg5TZXJ2ZXJUb0NsaWVudBImCgJWMBgBIAEoCzIULnNlcnZlcl90b19jbGllbnQuVjBIAFICVj' - 'BCAwoBdg=='); - -@$core.Deprecated('Use v0Descriptor instead') -const V0$json = { - '1': 'V0', - '2': [ - {'1': 'seq', '3': 1, '4': 1, '5': 4, '10': 'seq'}, - { - '1': 'response', - '3': 2, - '4': 1, - '5': 11, - '6': '.server_to_client.Response', - '9': 0, - '10': 'response' - }, - { - '1': 'newMessage', - '3': 3, - '4': 1, - '5': 11, - '6': '.server_to_client.NewMessage', - '9': 0, - '10': 'newMessage' - }, - { - '1': 'newMessages', - '3': 7, - '4': 1, - '5': 11, - '6': '.server_to_client.NewMessages', - '9': 0, - '10': 'newMessages' - }, - { - '1': 'RequestNewPreKeys', - '3': 4, - '4': 1, - '5': 8, - '9': 0, - '10': 'RequestNewPreKeys' - }, - { - '1': 'RequestNewPqcPreKeys', - '3': 8, - '4': 1, - '5': 8, - '9': 0, - '10': 'RequestNewPqcPreKeys' - }, - { - '1': 'error', - '3': 6, - '4': 1, - '5': 14, - '6': '.error.ErrorCode', - '9': 0, - '10': 'error' - }, - { - '1': 'sealedSenderMessage', - '3': 9, - '4': 1, - '5': 11, - '6': '.server_to_client.SealedSenderMessage', - '9': 0, - '10': 'sealedSenderMessage' - }, - { - '1': 'sealedSenderMessages', - '3': 10, - '4': 1, - '5': 11, - '6': '.server_to_client.SealedSenderMessages', - '9': 0, - '10': 'sealedSenderMessages' - }, - ], - '8': [ - {'1': 'Kind'}, - ], -}; - -/// Descriptor for `V0`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List v0Descriptor = $convert.base64Decode( - 'CgJWMBIQCgNzZXEYASABKARSA3NlcRI4CghyZXNwb25zZRgCIAEoCzIaLnNlcnZlcl90b19jbG' - 'llbnQuUmVzcG9uc2VIAFIIcmVzcG9uc2USPgoKbmV3TWVzc2FnZRgDIAEoCzIcLnNlcnZlcl90' - 'b19jbGllbnQuTmV3TWVzc2FnZUgAUgpuZXdNZXNzYWdlEkEKC25ld01lc3NhZ2VzGAcgASgLMh' - '0uc2VydmVyX3RvX2NsaWVudC5OZXdNZXNzYWdlc0gAUgtuZXdNZXNzYWdlcxIuChFSZXF1ZXN0' - 'TmV3UHJlS2V5cxgEIAEoCEgAUhFSZXF1ZXN0TmV3UHJlS2V5cxI0ChRSZXF1ZXN0TmV3UHFjUH' - 'JlS2V5cxgIIAEoCEgAUhRSZXF1ZXN0TmV3UHFjUHJlS2V5cxIoCgVlcnJvchgGIAEoDjIQLmVy' - 'cm9yLkVycm9yQ29kZUgAUgVlcnJvchJZChNzZWFsZWRTZW5kZXJNZXNzYWdlGAkgASgLMiUuc2' - 'VydmVyX3RvX2NsaWVudC5TZWFsZWRTZW5kZXJNZXNzYWdlSABSE3NlYWxlZFNlbmRlck1lc3Nh' - 'Z2USXAoUc2VhbGVkU2VuZGVyTWVzc2FnZXMYCiABKAsyJi5zZXJ2ZXJfdG9fY2xpZW50LlNlYW' - 'xlZFNlbmRlck1lc3NhZ2VzSABSFHNlYWxlZFNlbmRlck1lc3NhZ2VzQgYKBEtpbmQ='); - -@$core.Deprecated('Use newMessageDescriptor instead') -const NewMessage$json = { - '1': 'NewMessage', - '2': [ - {'1': 'from_user_id', '3': 2, '4': 1, '5': 3, '10': 'fromUserId'}, - {'1': 'body', '3': 1, '4': 1, '5': 12, '10': 'body'}, - ], -}; - -/// Descriptor for `NewMessage`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List newMessageDescriptor = $convert.base64Decode( - 'CgpOZXdNZXNzYWdlEiAKDGZyb21fdXNlcl9pZBgCIAEoA1IKZnJvbVVzZXJJZBISCgRib2R5GA' - 'EgASgMUgRib2R5'); - -@$core.Deprecated('Use newMessagesDescriptor instead') -const NewMessages$json = { - '1': 'NewMessages', - '2': [ - { - '1': 'newMessages', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.NewMessage', - '10': 'newMessages' - }, - ], -}; - -/// Descriptor for `NewMessages`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List newMessagesDescriptor = $convert.base64Decode( - 'CgtOZXdNZXNzYWdlcxI+CgtuZXdNZXNzYWdlcxgBIAMoCzIcLnNlcnZlcl90b19jbGllbnQuTm' - 'V3TWVzc2FnZVILbmV3TWVzc2FnZXM='); - -@$core.Deprecated('Use sealedSenderMessageDescriptor instead') -const SealedSenderMessage$json = { - '1': 'SealedSenderMessage', - '2': [ - {'1': 'message_id', '3': 1, '4': 1, '5': 9, '10': 'messageId'}, - {'1': 'body', '3': 2, '4': 1, '5': 12, '10': 'body'}, - ], -}; - -/// Descriptor for `SealedSenderMessage`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List sealedSenderMessageDescriptor = $convert.base64Decode( - 'ChNTZWFsZWRTZW5kZXJNZXNzYWdlEh0KCm1lc3NhZ2VfaWQYASABKAlSCW1lc3NhZ2VJZBISCg' - 'Rib2R5GAIgASgMUgRib2R5'); - -@$core.Deprecated('Use sealedSenderMessagesDescriptor instead') -const SealedSenderMessages$json = { - '1': 'SealedSenderMessages', - '2': [ - { - '1': 'messages', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.SealedSenderMessage', - '10': 'messages' - }, - ], -}; - -/// Descriptor for `SealedSenderMessages`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List sealedSenderMessagesDescriptor = $convert.base64Decode( - 'ChRTZWFsZWRTZW5kZXJNZXNzYWdlcxJBCghtZXNzYWdlcxgBIAMoCzIlLnNlcnZlcl90b19jbG' - 'llbnQuU2VhbGVkU2VuZGVyTWVzc2FnZVIIbWVzc2FnZXM='); - -@$core.Deprecated('Use responseDescriptor instead') -const Response$json = { - '1': 'Response', - '2': [ - { - '1': 'ok', - '3': 1, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.Ok', - '9': 0, - '10': 'ok' - }, - { - '1': 'error', - '3': 2, - '4': 1, - '5': 14, - '6': '.error.ErrorCode', - '9': 0, - '10': 'error' - }, - ], - '3': [ - Response_Authenticated$json, - Response_Plan$json, - Response_Plans$json, - Response_AddAccountsInvite$json, - Response_AddAccountsInvites$json, - Response_AdditionalAccount$json, - Response_Transaction$json, - Response_PlanBallance$json, - Response_PreKey$json, - Response_SignedPreKey$json, - Response_PqcPreKey$json, - Response_PqcBundle$json, - Response_UserData$json, - Response_UploadToken$json, - Response_DownloadTokens$json, - Response_ProofOfWork$json, - Response_PasswordlessNotificationMessage$json, - Response_PasswordlessNotificationMessages$json, - Response_PresignedPost$json, - Response_MemoriesUploadUrls$json, - Response_MediaItem$json, - Response_MemoriesList$json, - Response_MemoriesUrl$json, - Response_MemoriesUsage$json, - Response_PrivacyPassParameters$json, - Response_PrivacyPassTokenResponses$json, - Response_Ok$json - ], - '8': [ - {'1': 'Response'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Authenticated$json = { - '1': 'Authenticated', - '2': [ - {'1': 'plan', '3': 1, '4': 1, '5': 9, '10': 'plan'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Plan$json = { - '1': 'Plan', - '2': [ - {'1': 'plan_id', '3': 1, '4': 1, '5': 9, '10': 'planId'}, - {'1': 'upload_size_limit', '3': 2, '4': 1, '5': 3, '10': 'uploadSizeLimit'}, - { - '1': 'daily_media_upload_limit', - '3': 3, - '4': 1, - '5': 3, - '10': 'dailyMediaUploadLimit' - }, - { - '1': 'maximal_upload_size_of_single_media_size', - '3': 4, - '4': 1, - '5': 3, - '10': 'maximalUploadSizeOfSingleMediaSize' - }, - { - '1': 'additional_plus_accounts', - '3': 5, - '4': 1, - '5': 3, - '10': 'additionalPlusAccounts' - }, - { - '1': 'monthly_costs_cent', - '3': 7, - '4': 1, - '5': 3, - '10': 'monthlyCostsCent' - }, - {'1': 'yearly_costs_cent', '3': 8, '4': 1, '5': 3, '10': 'yearlyCostsCent'}, - { - '1': 'allowed_to_send_text_messages', - '3': 9, - '4': 1, - '5': 8, - '10': 'allowedToSendTextMessages' - }, - { - '1': 'is_additional_account', - '3': 10, - '4': 1, - '5': 8, - '10': 'isAdditionalAccount' - }, - { - '1': 'memories_size_limit', - '3': 11, - '4': 1, - '5': 3, - '10': 'memoriesSizeLimit' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Plans$json = { - '1': 'Plans', - '2': [ - { - '1': 'plans', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.Plan', - '10': 'plans' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_AddAccountsInvite$json = { - '1': 'AddAccountsInvite', - '2': [ - {'1': 'plan_id', '3': 1, '4': 1, '5': 9, '10': 'planId'}, - {'1': 'invite_code', '3': 2, '4': 1, '5': 9, '10': 'inviteCode'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_AddAccountsInvites$json = { - '1': 'AddAccountsInvites', - '2': [ - { - '1': 'invites', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.AddAccountsInvite', - '10': 'invites' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_AdditionalAccount$json = { - '1': 'AdditionalAccount', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - {'1': 'plan_id', '3': 3, '4': 1, '5': 9, '10': 'planId'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Transaction$json = { - '1': 'Transaction', -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PlanBallance$json = { - '1': 'PlanBallance', - '2': [ - { - '1': 'used_daily_media_upload_limit', - '3': 1, - '4': 1, - '5': 3, - '10': 'usedDailyMediaUploadLimit' - }, - { - '1': 'used_upload_media_size_limit', - '3': 2, - '4': 1, - '5': 3, - '10': 'usedUploadMediaSizeLimit' - }, - { - '1': 'payment_period_days', - '3': 3, - '4': 1, - '5': 3, - '9': 0, - '10': 'paymentPeriodDays', - '17': true - }, - { - '1': 'last_payment_done_unix_timestamp', - '3': 4, - '4': 1, - '5': 3, - '9': 1, - '10': 'lastPaymentDoneUnixTimestamp', - '17': true - }, - { - '1': 'transactions', - '3': 5, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.Transaction', - '10': 'transactions' - }, - { - '1': 'additional_accounts', - '3': 6, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.AdditionalAccount', - '10': 'additionalAccounts' - }, - { - '1': 'auto_renewal', - '3': 7, - '4': 1, - '5': 8, - '9': 2, - '10': 'autoRenewal', - '17': true - }, - { - '1': 'additional_account_owner_id', - '3': 8, - '4': 1, - '5': 3, - '9': 3, - '10': 'additionalAccountOwnerId', - '17': true - }, - ], - '8': [ - {'1': '_payment_period_days'}, - {'1': '_last_payment_done_unix_timestamp'}, - {'1': '_auto_renewal'}, - {'1': '_additional_account_owner_id'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PreKey$json = { - '1': 'PreKey', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'}, - {'1': 'prekey', '3': 2, '4': 1, '5': 12, '10': 'prekey'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_SignedPreKey$json = { - '1': 'SignedPreKey', - '2': [ - {'1': 'signed_prekey_id', '3': 1, '4': 1, '5': 3, '10': 'signedPrekeyId'}, - {'1': 'signed_prekey', '3': 2, '4': 1, '5': 12, '10': 'signedPrekey'}, - { - '1': 'signed_prekey_signature', - '3': 3, - '4': 1, - '5': 12, - '10': 'signedPrekeySignature' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PqcPreKey$json = { - '1': 'PqcPreKey', - '2': [ - {'1': 'ecc_pre_key_id', '3': 1, '4': 1, '5': 3, '10': 'eccPreKeyId'}, - {'1': 'ecc_pre_key', '3': 2, '4': 1, '5': 12, '10': 'eccPreKey'}, - {'1': 'kyber_pre_key_id', '3': 3, '4': 1, '5': 3, '10': 'kyberPreKeyId'}, - {'1': 'kyber_pre_key', '3': 4, '4': 1, '5': 12, '10': 'kyberPreKey'}, - { - '1': 'kyber_pre_key_signature', - '3': 5, - '4': 1, - '5': 12, - '10': 'kyberPreKeySignature' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PqcBundle$json = { - '1': 'PqcBundle', - '2': [ - { - '1': 'ecc_signed_prekey_id', - '3': 1, - '4': 1, - '5': 3, - '10': 'eccSignedPrekeyId' - }, - { - '1': 'ecc_signed_prekey', - '3': 2, - '4': 1, - '5': 12, - '10': 'eccSignedPrekey' - }, - { - '1': 'ecc_signed_prekey_signature', - '3': 3, - '4': 1, - '5': 12, - '10': 'eccSignedPrekeySignature' - }, - { - '1': 'kyber_signed_prekey_id', - '3': 4, - '4': 1, - '5': 3, - '10': 'kyberSignedPrekeyId' - }, - { - '1': 'kyber_signed_prekey', - '3': 5, - '4': 1, - '5': 12, - '10': 'kyberSignedPrekey' - }, - { - '1': 'kyber_signed_prekey_signature', - '3': 6, - '4': 1, - '5': 12, - '10': 'kyberSignedPrekeySignature' - }, - { - '1': 'prekey', - '3': 7, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PqcPreKey', - '9': 0, - '10': 'prekey', - '17': true - }, - ], - '8': [ - {'1': '_prekey'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_UserData$json = { - '1': 'UserConfig', - '2': [ - {'1': 'user_id', '3': 1, '4': 1, '5': 3, '10': 'userId'}, - { - '1': 'prekeys', - '3': 2, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.PreKey', - '10': 'prekeys' - }, - { - '1': 'username', - '3': 7, - '4': 1, - '5': 12, - '9': 0, - '10': 'username', - '17': true - }, - { - '1': 'public_identity_key', - '3': 3, - '4': 1, - '5': 12, - '9': 1, - '10': 'publicIdentityKey', - '17': true - }, - { - '1': 'signed_prekey', - '3': 4, - '4': 1, - '5': 12, - '9': 2, - '10': 'signedPrekey', - '17': true - }, - { - '1': 'signed_prekey_signature', - '3': 5, - '4': 1, - '5': 12, - '9': 3, - '10': 'signedPrekeySignature', - '17': true - }, - { - '1': 'signed_prekey_id', - '3': 6, - '4': 1, - '5': 3, - '9': 4, - '10': 'signedPrekeyId', - '17': true - }, - { - '1': 'registration_id', - '3': 8, - '4': 1, - '5': 3, - '9': 5, - '10': 'registrationId', - '17': true - }, - { - '1': 'pqc_bundle', - '3': 9, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PqcBundle', - '9': 6, - '10': 'pqcBundle', - '17': true - }, - ], - '8': [ - {'1': '_username'}, - {'1': '_public_identity_key'}, - {'1': '_signed_prekey'}, - {'1': '_signed_prekey_signature'}, - {'1': '_signed_prekey_id'}, - {'1': '_registration_id'}, - {'1': '_pqc_bundle'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_UploadToken$json = { - '1': 'UploadToken', - '2': [ - {'1': 'upload_token', '3': 1, '4': 1, '5': 12, '10': 'uploadToken'}, - {'1': 'download_tokens', '3': 2, '4': 3, '5': 12, '10': 'downloadTokens'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_DownloadTokens$json = { - '1': 'DownloadTokens', - '2': [ - {'1': 'download_tokens', '3': 1, '4': 3, '5': 12, '10': 'downloadTokens'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_ProofOfWork$json = { - '1': 'ProofOfWork', - '2': [ - {'1': 'prefix', '3': 1, '4': 1, '5': 9, '10': 'prefix'}, - {'1': 'difficulty', '3': 2, '4': 1, '5': 3, '10': 'difficulty'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PasswordlessNotificationMessage$json = { - '1': 'PasswordlessNotificationMessage', - '2': [ - {'1': 'id', '3': 1, '4': 1, '5': 3, '10': 'id'}, - { - '1': 'encrypted_message', - '3': 2, - '4': 1, - '5': 12, - '10': 'encryptedMessage' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PasswordlessNotificationMessages$json = { - '1': 'PasswordlessNotificationMessages', - '2': [ - { - '1': 'messages', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.PasswordlessNotificationMessage', - '10': 'messages' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PresignedPost$json = { - '1': 'PresignedPost', - '2': [ - {'1': 'url', '3': 1, '4': 1, '5': 9, '10': 'url'}, - { - '1': 'fields', - '3': 2, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.PresignedPost.FieldsEntry', - '10': 'fields' - }, - ], - '3': [Response_PresignedPost_FieldsEntry$json], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PresignedPost_FieldsEntry$json = { - '1': 'FieldsEntry', - '2': [ - {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, - {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'}, - ], - '7': {'7': true}, -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_MemoriesUploadUrls$json = { - '1': 'MemoriesUploadUrls', - '2': [ - {'1': 'media_id', '3': 1, '4': 1, '5': 9, '10': 'mediaId'}, - { - '1': 'thumbnail_upload', - '3': 2, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PresignedPost', - '10': 'thumbnailUpload' - }, - { - '1': 'full_upload', - '3': 3, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PresignedPost', - '10': 'fullUpload' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_MediaItem$json = { - '1': 'MediaItem', - '2': [ - {'1': 'media_id', '3': 1, '4': 1, '5': 9, '10': 'mediaId'}, - {'1': 'original_date', '3': 2, '4': 1, '5': 3, '10': 'originalDate'}, - { - '1': 'thumbnail_download_url', - '3': 3, - '4': 1, - '5': 9, - '10': 'thumbnailDownloadUrl' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_MemoriesList$json = { - '1': 'MemoriesList', - '2': [ - { - '1': 'items', - '3': 1, - '4': 3, - '5': 11, - '6': '.server_to_client.Response.MediaItem', - '10': 'items' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_MemoriesUrl$json = { - '1': 'MemoriesUrl', - '2': [ - {'1': 'full_download_url', '3': 1, '4': 1, '5': 9, '10': 'fullDownloadUrl'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_MemoriesUsage$json = { - '1': 'MemoriesUsage', - '2': [ - {'1': 'max_bytes', '3': 1, '4': 1, '5': 3, '10': 'maxBytes'}, - {'1': 'current_bytes', '3': 2, '4': 1, '5': 3, '10': 'currentBytes'}, - {'1': 'count', '3': 3, '4': 1, '5': 3, '10': 'count'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PrivacyPassParameters$json = { - '1': 'PrivacyPassParameters', - '2': [ - {'1': 'token_challenge', '3': 1, '4': 1, '5': 12, '10': 'tokenChallenge'}, - {'1': 'public_key', '3': 2, '4': 1, '5': 12, '10': 'publicKey'}, - {'1': 'max_batch_size', '3': 3, '4': 1, '5': 13, '10': 'maxBatchSize'}, - {'1': 'max_age_seconds', '3': 4, '4': 1, '5': 13, '10': 'maxAgeSeconds'}, - { - '1': 'daily_token_limit', - '3': 5, - '4': 1, - '5': 13, - '10': 'dailyTokenLimit' - }, - { - '1': 'issuance_cooldown_seconds', - '3': 6, - '4': 1, - '5': 13, - '10': 'issuanceCooldownSeconds' - }, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_PrivacyPassTokenResponses$json = { - '1': 'PrivacyPassTokenResponses', - '2': [ - {'1': 'token_responses', '3': 1, '4': 3, '5': 12, '10': 'tokenResponses'}, - ], -}; - -@$core.Deprecated('Use responseDescriptor instead') -const Response_Ok$json = { - '1': 'Ok', - '2': [ - {'1': 'None', '3': 1, '4': 1, '5': 8, '9': 0, '10': 'None'}, - {'1': 'userid', '3': 2, '4': 1, '5': 3, '9': 0, '10': 'userid'}, - { - '1': 'authchallenge', - '3': 3, - '4': 1, - '5': 12, - '9': 0, - '10': 'authchallenge' - }, - { - '1': 'uploadtoken', - '3': 4, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.UploadToken', - '9': 0, - '10': 'uploadtoken' - }, - { - '1': 'userdata', - '3': 5, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.UserConfig', - '9': 0, - '10': 'userdata' - }, - {'1': 'authtoken', '3': 6, '4': 1, '5': 12, '9': 0, '10': 'authtoken'}, - { - '1': 'authenticated', - '3': 8, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.Authenticated', - '9': 0, - '10': 'authenticated' - }, - { - '1': 'plans', - '3': 9, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.Plans', - '9': 0, - '10': 'plans' - }, - { - '1': 'planballance', - '3': 10, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PlanBallance', - '9': 0, - '10': 'planballance' - }, - { - '1': 'addaccountsinvites', - '3': 12, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.AddAccountsInvites', - '9': 0, - '10': 'addaccountsinvites' - }, - { - '1': 'downloadtokens', - '3': 13, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.DownloadTokens', - '9': 0, - '10': 'downloadtokens' - }, - { - '1': 'signedprekey', - '3': 14, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.SignedPreKey', - '9': 0, - '10': 'signedprekey' - }, - { - '1': 'proofOfWork', - '3': 15, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.ProofOfWork', - '9': 0, - '10': 'proofOfWork' - }, - { - '1': 'passwordless_recovery_server_key', - '3': 16, - '4': 1, - '5': 12, - '9': 0, - '10': 'passwordlessRecoveryServerKey' - }, - { - '1': 'passwordless_notification_messages', - '3': 17, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PasswordlessNotificationMessages', - '9': 0, - '10': 'passwordlessNotificationMessages' - }, - { - '1': 'memories_upload_urls', - '3': 18, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.MemoriesUploadUrls', - '9': 0, - '10': 'memoriesUploadUrls' - }, - { - '1': 'memories_list', - '3': 19, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.MemoriesList', - '9': 0, - '10': 'memoriesList' - }, - { - '1': 'memories_url', - '3': 20, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.MemoriesUrl', - '9': 0, - '10': 'memoriesUrl' - }, - { - '1': 'memories_usage', - '3': 21, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.MemoriesUsage', - '9': 0, - '10': 'memoriesUsage' - }, - { - '1': 'privacy_pass_parameters', - '3': 22, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PrivacyPassParameters', - '9': 0, - '10': 'privacyPassParameters' - }, - { - '1': 'privacy_pass_token_responses', - '3': 23, - '4': 1, - '5': 11, - '6': '.server_to_client.Response.PrivacyPassTokenResponses', - '9': 0, - '10': 'privacyPassTokenResponses' - }, - ], - '8': [ - {'1': 'Ok'}, - ], - '9': [ - {'1': 7, '2': 8}, - {'1': 11, '2': 12}, - ], -}; - -/// Descriptor for `Response`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List responseDescriptor = $convert.base64Decode( - 'CghSZXNwb25zZRIvCgJvaxgBIAEoCzIdLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuT2tIAF' - 'ICb2sSKAoFZXJyb3IYAiABKA4yEC5lcnJvci5FcnJvckNvZGVIAFIFZXJyb3IaIwoNQXV0aGVu' - 'dGljYXRlZBISCgRwbGFuGAEgASgJUgRwbGFuGpQECgRQbGFuEhcKB3BsYW5faWQYASABKAlSBn' - 'BsYW5JZBIqChF1cGxvYWRfc2l6ZV9saW1pdBgCIAEoA1IPdXBsb2FkU2l6ZUxpbWl0EjcKGGRh' - 'aWx5X21lZGlhX3VwbG9hZF9saW1pdBgDIAEoA1IVZGFpbHlNZWRpYVVwbG9hZExpbWl0ElQKKG' - '1heGltYWxfdXBsb2FkX3NpemVfb2Zfc2luZ2xlX21lZGlhX3NpemUYBCABKANSIm1heGltYWxV' - 'cGxvYWRTaXplT2ZTaW5nbGVNZWRpYVNpemUSOAoYYWRkaXRpb25hbF9wbHVzX2FjY291bnRzGA' - 'UgASgDUhZhZGRpdGlvbmFsUGx1c0FjY291bnRzEiwKEm1vbnRobHlfY29zdHNfY2VudBgHIAEo' - 'A1IQbW9udGhseUNvc3RzQ2VudBIqChF5ZWFybHlfY29zdHNfY2VudBgIIAEoA1IPeWVhcmx5Q2' - '9zdHNDZW50EkAKHWFsbG93ZWRfdG9fc2VuZF90ZXh0X21lc3NhZ2VzGAkgASgIUhlhbGxvd2Vk' - 'VG9TZW5kVGV4dE1lc3NhZ2VzEjIKFWlzX2FkZGl0aW9uYWxfYWNjb3VudBgKIAEoCFITaXNBZG' - 'RpdGlvbmFsQWNjb3VudBIuChNtZW1vcmllc19zaXplX2xpbWl0GAsgASgDUhFtZW1vcmllc1Np' - 'emVMaW1pdBo+CgVQbGFucxI1CgVwbGFucxgBIAMoCzIfLnNlcnZlcl90b19jbGllbnQuUmVzcG' - '9uc2UuUGxhblIFcGxhbnMaTQoRQWRkQWNjb3VudHNJbnZpdGUSFwoHcGxhbl9pZBgBIAEoCVIG' - 'cGxhbklkEh8KC2ludml0ZV9jb2RlGAIgASgJUgppbnZpdGVDb2RlGlwKEkFkZEFjY291bnRzSW' - '52aXRlcxJGCgdpbnZpdGVzGAEgAygLMiwuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5BZGRB' - 'Y2NvdW50c0ludml0ZVIHaW52aXRlcxpFChFBZGRpdGlvbmFsQWNjb3VudBIXCgd1c2VyX2lkGA' - 'EgASgDUgZ1c2VySWQSFwoHcGxhbl9pZBgDIAEoCVIGcGxhbklkGg0KC1RyYW5zYWN0aW9uGpcF' - 'CgxQbGFuQmFsbGFuY2USQAoddXNlZF9kYWlseV9tZWRpYV91cGxvYWRfbGltaXQYASABKANSGX' - 'VzZWREYWlseU1lZGlhVXBsb2FkTGltaXQSPgocdXNlZF91cGxvYWRfbWVkaWFfc2l6ZV9saW1p' - 'dBgCIAEoA1IYdXNlZFVwbG9hZE1lZGlhU2l6ZUxpbWl0EjMKE3BheW1lbnRfcGVyaW9kX2RheX' - 'MYAyABKANIAFIRcGF5bWVudFBlcmlvZERheXOIAQESSwogbGFzdF9wYXltZW50X2RvbmVfdW5p' - 'eF90aW1lc3RhbXAYBCABKANIAVIcbGFzdFBheW1lbnREb25lVW5peFRpbWVzdGFtcIgBARJKCg' - 'x0cmFuc2FjdGlvbnMYBSADKAsyJi5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlRyYW5zYWN0' - 'aW9uUgx0cmFuc2FjdGlvbnMSXQoTYWRkaXRpb25hbF9hY2NvdW50cxgGIAMoCzIsLnNlcnZlcl' - '90b19jbGllbnQuUmVzcG9uc2UuQWRkaXRpb25hbEFjY291bnRSEmFkZGl0aW9uYWxBY2NvdW50' - 'cxImCgxhdXRvX3JlbmV3YWwYByABKAhIAlILYXV0b1JlbmV3YWyIAQESQgobYWRkaXRpb25hbF' - '9hY2NvdW50X293bmVyX2lkGAggASgDSANSGGFkZGl0aW9uYWxBY2NvdW50T3duZXJJZIgBAUIW' - 'ChRfcGF5bWVudF9wZXJpb2RfZGF5c0IjCiFfbGFzdF9wYXltZW50X2RvbmVfdW5peF90aW1lc3' - 'RhbXBCDwoNX2F1dG9fcmVuZXdhbEIeChxfYWRkaXRpb25hbF9hY2NvdW50X293bmVyX2lkGjAK' - 'BlByZUtleRIOCgJpZBgBIAEoA1ICaWQSFgoGcHJla2V5GAIgASgMUgZwcmVrZXkalQEKDFNpZ2' - '5lZFByZUtleRIoChBzaWduZWRfcHJla2V5X2lkGAEgASgDUg5zaWduZWRQcmVrZXlJZBIjCg1z' - 'aWduZWRfcHJla2V5GAIgASgMUgxzaWduZWRQcmVrZXkSNgoXc2lnbmVkX3ByZWtleV9zaWduYX' - 'R1cmUYAyABKAxSFXNpZ25lZFByZWtleVNpZ25hdHVyZRrUAQoJUHFjUHJlS2V5EiMKDmVjY19w' - 'cmVfa2V5X2lkGAEgASgDUgtlY2NQcmVLZXlJZBIeCgtlY2NfcHJlX2tleRgCIAEoDFIJZWNjUH' - 'JlS2V5EicKEGt5YmVyX3ByZV9rZXlfaWQYAyABKANSDWt5YmVyUHJlS2V5SWQSIgoNa3liZXJf' - 'cHJlX2tleRgEIAEoDFILa3liZXJQcmVLZXkSNQoXa3liZXJfcHJlX2tleV9zaWduYXR1cmUYBS' - 'ABKAxSFGt5YmVyUHJlS2V5U2lnbmF0dXJlGp0DCglQcWNCdW5kbGUSLwoUZWNjX3NpZ25lZF9w' - 'cmVrZXlfaWQYASABKANSEWVjY1NpZ25lZFByZWtleUlkEioKEWVjY19zaWduZWRfcHJla2V5GA' - 'IgASgMUg9lY2NTaWduZWRQcmVrZXkSPQobZWNjX3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMg' - 'ASgMUhhlY2NTaWduZWRQcmVrZXlTaWduYXR1cmUSMwoWa3liZXJfc2lnbmVkX3ByZWtleV9pZB' - 'gEIAEoA1ITa3liZXJTaWduZWRQcmVrZXlJZBIuChNreWJlcl9zaWduZWRfcHJla2V5GAUgASgM' - 'UhFreWJlclNpZ25lZFByZWtleRJBCh1reWJlcl9zaWduZWRfcHJla2V5X3NpZ25hdHVyZRgGIA' - 'EoDFIaa3liZXJTaWduZWRQcmVrZXlTaWduYXR1cmUSQQoGcHJla2V5GAcgASgLMiQuc2VydmVy' - 'X3RvX2NsaWVudC5SZXNwb25zZS5QcWNQcmVLZXlIAFIGcHJla2V5iAEBQgkKB19wcmVrZXkazw' - 'QKCFVzZXJEYXRhEhcKB3VzZXJfaWQYASABKANSBnVzZXJJZBI7CgdwcmVrZXlzGAIgAygLMiEu' - 'c2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5QcmVLZXlSB3ByZWtleXMSHwoIdXNlcm5hbWUYBy' - 'ABKAxIAFIIdXNlcm5hbWWIAQESMwoTcHVibGljX2lkZW50aXR5X2tleRgDIAEoDEgBUhFwdWJs' - 'aWNJZGVudGl0eUtleYgBARIoCg1zaWduZWRfcHJla2V5GAQgASgMSAJSDHNpZ25lZFByZWtleY' - 'gBARI7ChdzaWduZWRfcHJla2V5X3NpZ25hdHVyZRgFIAEoDEgDUhVzaWduZWRQcmVrZXlTaWdu' - 'YXR1cmWIAQESLQoQc2lnbmVkX3ByZWtleV9pZBgGIAEoA0gEUg5zaWduZWRQcmVrZXlJZIgBAR' - 'IsCg9yZWdpc3RyYXRpb25faWQYCCABKANIBVIOcmVnaXN0cmF0aW9uSWSIAQESSAoKcHFjX2J1' - 'bmRsZRgJIAEoCzIkLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUHFjQnVuZGxlSAZSCXBxY0' - 'J1bmRsZYgBAUILCglfdXNlcm5hbWVCFgoUX3B1YmxpY19pZGVudGl0eV9rZXlCEAoOX3NpZ25l' - 'ZF9wcmVrZXlCGgoYX3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlQhMKEV9zaWduZWRfcHJla2V5X2' - 'lkQhIKEF9yZWdpc3RyYXRpb25faWRCDQoLX3BxY19idW5kbGUaWQoLVXBsb2FkVG9rZW4SIQoM' - 'dXBsb2FkX3Rva2VuGAEgASgMUgt1cGxvYWRUb2tlbhInCg9kb3dubG9hZF90b2tlbnMYAiADKA' - 'xSDmRvd25sb2FkVG9rZW5zGjkKDkRvd25sb2FkVG9rZW5zEicKD2Rvd25sb2FkX3Rva2VucxgB' - 'IAMoDFIOZG93bmxvYWRUb2tlbnMaRQoLUHJvb2ZPZldvcmsSFgoGcHJlZml4GAEgASgJUgZwcm' - 'VmaXgSHgoKZGlmZmljdWx0eRgCIAEoA1IKZGlmZmljdWx0eRpeCh9QYXNzd29yZGxlc3NOb3Rp' - 'ZmljYXRpb25NZXNzYWdlEg4KAmlkGAEgASgDUgJpZBIrChFlbmNyeXB0ZWRfbWVzc2FnZRgCIA' - 'EoDFIQZW5jcnlwdGVkTWVzc2FnZRp6CiBQYXNzd29yZGxlc3NOb3RpZmljYXRpb25NZXNzYWdl' - 'cxJWCghtZXNzYWdlcxgBIAMoCzI6LnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUGFzc3dvcm' - 'RsZXNzTm90aWZpY2F0aW9uTWVzc2FnZVIIbWVzc2FnZXMaqgEKDVByZXNpZ25lZFBvc3QSEAoD' - 'dXJsGAEgASgJUgN1cmwSTAoGZmllbGRzGAIgAygLMjQuc2VydmVyX3RvX2NsaWVudC5SZXNwb2' - '5zZS5QcmVzaWduZWRQb3N0LkZpZWxkc0VudHJ5UgZmaWVsZHMaOQoLRmllbGRzRW50cnkSEAoD' - 'a2V5GAEgASgJUgNrZXkSFAoFdmFsdWUYAiABKAlSBXZhbHVlOgI4ARrPAQoSTWVtb3JpZXNVcG' - 'xvYWRVcmxzEhkKCG1lZGlhX2lkGAEgASgJUgdtZWRpYUlkElMKEHRodW1ibmFpbF91cGxvYWQY' - 'AiABKAsyKC5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlByZXNpZ25lZFBvc3RSD3RodW1ibm' - 'FpbFVwbG9hZBJJCgtmdWxsX3VwbG9hZBgDIAEoCzIoLnNlcnZlcl90b19jbGllbnQuUmVzcG9u' - 'c2UuUHJlc2lnbmVkUG9zdFIKZnVsbFVwbG9hZBqBAQoJTWVkaWFJdGVtEhkKCG1lZGlhX2lkGA' - 'EgASgJUgdtZWRpYUlkEiMKDW9yaWdpbmFsX2RhdGUYAiABKANSDG9yaWdpbmFsRGF0ZRI0ChZ0' - 'aHVtYm5haWxfZG93bmxvYWRfdXJsGAMgASgJUhR0aHVtYm5haWxEb3dubG9hZFVybBpKCgxNZW' - '1vcmllc0xpc3QSOgoFaXRlbXMYASADKAsyJC5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLk1l' - 'ZGlhSXRlbVIFaXRlbXMaOQoLTWVtb3JpZXNVcmwSKgoRZnVsbF9kb3dubG9hZF91cmwYASABKA' - 'lSD2Z1bGxEb3dubG9hZFVybBpnCg1NZW1vcmllc1VzYWdlEhsKCW1heF9ieXRlcxgBIAEoA1II' - 'bWF4Qnl0ZXMSIwoNY3VycmVudF9ieXRlcxgCIAEoA1IMY3VycmVudEJ5dGVzEhQKBWNvdW50GA' - 'MgASgDUgVjb3VudBqVAgoVUHJpdmFjeVBhc3NQYXJhbWV0ZXJzEicKD3Rva2VuX2NoYWxsZW5n' - 'ZRgBIAEoDFIOdG9rZW5DaGFsbGVuZ2USHQoKcHVibGljX2tleRgCIAEoDFIJcHVibGljS2V5Ei' - 'QKDm1heF9iYXRjaF9zaXplGAMgASgNUgxtYXhCYXRjaFNpemUSJgoPbWF4X2FnZV9zZWNvbmRz' - 'GAQgASgNUg1tYXhBZ2VTZWNvbmRzEioKEWRhaWx5X3Rva2VuX2xpbWl0GAUgASgNUg9kYWlseV' - 'Rva2VuTGltaXQSOgoZaXNzdWFuY2VfY29vbGRvd25fc2Vjb25kcxgGIAEoDVIXaXNzdWFuY2VD' - 'b29sZG93blNlY29uZHMaRAoZUHJpdmFjeVBhc3NUb2tlblJlc3BvbnNlcxInCg90b2tlbl9yZX' - 'Nwb25zZXMYASADKAxSDnRva2VuUmVzcG9uc2VzGtoMCgJPaxIUCgROb25lGAEgASgISABSBE5v' - 'bmUSGAoGdXNlcmlkGAIgASgDSABSBnVzZXJpZBImCg1hdXRoY2hhbGxlbmdlGAMgASgMSABSDW' - 'F1dGhjaGFsbGVuZ2USSgoLdXBsb2FkdG9rZW4YBCABKAsyJi5zZXJ2ZXJfdG9fY2xpZW50LlJl' - 'c3BvbnNlLlVwbG9hZFRva2VuSABSC3VwbG9hZHRva2VuEkEKCHVzZXJkYXRhGAUgASgLMiMuc2' - 'VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5Vc2VyRGF0YUgAUgh1c2VyZGF0YRIeCglhdXRodG9r' - 'ZW4YBiABKAxIAFIJYXV0aHRva2VuElAKDWF1dGhlbnRpY2F0ZWQYCCABKAsyKC5zZXJ2ZXJfdG' - '9fY2xpZW50LlJlc3BvbnNlLkF1dGhlbnRpY2F0ZWRIAFINYXV0aGVudGljYXRlZBI4CgVwbGFu' - 'cxgJIAEoCzIgLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUGxhbnNIAFIFcGxhbnMSTQoMcG' - 'xhbmJhbGxhbmNlGAogASgLMicuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5QbGFuQmFsbGFu' - 'Y2VIAFIMcGxhbmJhbGxhbmNlEl8KEmFkZGFjY291bnRzaW52aXRlcxgMIAEoCzItLnNlcnZlcl' - '90b19jbGllbnQuUmVzcG9uc2UuQWRkQWNjb3VudHNJbnZpdGVzSABSEmFkZGFjY291bnRzaW52' - 'aXRlcxJTCg5kb3dubG9hZHRva2VucxgNIAEoCzIpLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2' - 'UuRG93bmxvYWRUb2tlbnNIAFIOZG93bmxvYWR0b2tlbnMSTQoMc2lnbmVkcHJla2V5GA4gASgL' - 'Micuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5TaWduZWRQcmVLZXlIAFIMc2lnbmVkcHJla2' - 'V5EkoKC3Byb29mT2ZXb3JrGA8gASgLMiYuc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5Qcm9v' - 'Zk9mV29ya0gAUgtwcm9vZk9mV29yaxJJCiBwYXNzd29yZGxlc3NfcmVjb3Zlcnlfc2VydmVyX2' - 'tleRgQIAEoDEgAUh1wYXNzd29yZGxlc3NSZWNvdmVyeVNlcnZlcktleRKLAQoicGFzc3dvcmRs' - 'ZXNzX25vdGlmaWNhdGlvbl9tZXNzYWdlcxgRIAEoCzI7LnNlcnZlcl90b19jbGllbnQuUmVzcG' - '9uc2UuUGFzc3dvcmRsZXNzTm90aWZpY2F0aW9uTWVzc2FnZXNIAFIgcGFzc3dvcmRsZXNzTm90' - 'aWZpY2F0aW9uTWVzc2FnZXMSYQoUbWVtb3JpZXNfdXBsb2FkX3VybHMYEiABKAsyLS5zZXJ2ZX' - 'JfdG9fY2xpZW50LlJlc3BvbnNlLk1lbW9yaWVzVXBsb2FkVXJsc0gAUhJtZW1vcmllc1VwbG9h' - 'ZFVybHMSTgoNbWVtb3JpZXNfbGlzdBgTIAEoCzInLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2' - 'UuTWVtb3JpZXNMaXN0SABSDG1lbW9yaWVzTGlzdBJLCgxtZW1vcmllc191cmwYFCABKAsyJi5z' - 'ZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLk1lbW9yaWVzVXJsSABSC21lbW9yaWVzVXJsElEKDm' - '1lbW9yaWVzX3VzYWdlGBUgASgLMiguc2VydmVyX3RvX2NsaWVudC5SZXNwb25zZS5NZW1vcmll' - 'c1VzYWdlSABSDW1lbW9yaWVzVXNhZ2USagoXcHJpdmFjeV9wYXNzX3BhcmFtZXRlcnMYFiABKA' - 'syMC5zZXJ2ZXJfdG9fY2xpZW50LlJlc3BvbnNlLlByaXZhY3lQYXNzUGFyYW1ldGVyc0gAUhVw' - 'cml2YWN5UGFzc1BhcmFtZXRlcnMSdwoccHJpdmFjeV9wYXNzX3Rva2VuX3Jlc3BvbnNlcxgXIA' - 'EoCzI0LnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuUHJpdmFjeVBhc3NUb2tlblJlc3BvbnNl' - 'c0gAUhlwcml2YWN5UGFzc1Rva2VuUmVzcG9uc2VzQgQKAk9rSgQIBxAISgQICxAMQgoKCFJlc3' - 'BvbnNl'); diff --git a/lib/src/model/protobuf/api/websocket/server_to_client.pbserver.dart b/lib/src/model/protobuf/api/websocket/server_to_client.pbserver.dart deleted file mode 100644 index 61c867e5..00000000 --- a/lib/src/model/protobuf/api/websocket/server_to_client.pbserver.dart +++ /dev/null @@ -1,13 +0,0 @@ -// -// Generated code. Do not modify. -// source: api/websocket/server_to_client.proto -// -// @dart = 2.12 - -// ignore_for_file: annotate_overrides, camel_case_types, comment_references -// ignore_for_file: constant_identifier_names -// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes -// ignore_for_file: non_constant_identifier_names, prefer_final_fields -// ignore_for_file: unnecessary_import, unnecessary_this, unused_import - -export 'server_to_client.pb.dart'; diff --git a/lib/src/model/protobuf/api/http/http_requests.pb.dart b/lib/src/model/protobuf/client/generated/http_requests.pb.dart similarity index 99% rename from lib/src/model/protobuf/api/http/http_requests.pb.dart rename to lib/src/model/protobuf/client/generated/http_requests.pb.dart index c5ecea1f..4cc1b132 100644 --- a/lib/src/model/protobuf/api/http/http_requests.pb.dart +++ b/lib/src/model/protobuf/client/generated/http_requests.pb.dart @@ -1,6 +1,6 @@ // This is a generated file - do not edit. // -// Generated from api/http/http_requests.proto. +// Generated from http_requests.proto. // @dart = 3.3 diff --git a/lib/src/model/protobuf/api/http/http_requests.pbenum.dart b/lib/src/model/protobuf/client/generated/http_requests.pbenum.dart similarity index 89% rename from lib/src/model/protobuf/api/http/http_requests.pbenum.dart rename to lib/src/model/protobuf/client/generated/http_requests.pbenum.dart index 6b32edfe..21c4a60f 100644 --- a/lib/src/model/protobuf/api/http/http_requests.pbenum.dart +++ b/lib/src/model/protobuf/client/generated/http_requests.pbenum.dart @@ -1,6 +1,6 @@ // This is a generated file - do not edit. // -// Generated from api/http/http_requests.proto. +// Generated from http_requests.proto. // @dart = 3.3 diff --git a/lib/src/model/protobuf/api/http/http_requests.pbjson.dart b/lib/src/model/protobuf/client/generated/http_requests.pbjson.dart similarity index 99% rename from lib/src/model/protobuf/api/http/http_requests.pbjson.dart rename to lib/src/model/protobuf/client/generated/http_requests.pbjson.dart index 6319dd38..33cc9ddd 100644 --- a/lib/src/model/protobuf/api/http/http_requests.pbjson.dart +++ b/lib/src/model/protobuf/client/generated/http_requests.pbjson.dart @@ -1,6 +1,6 @@ // This is a generated file - do not edit. // -// Generated from api/http/http_requests.proto. +// Generated from http_requests.proto. // @dart = 3.3 diff --git a/lib/src/model/protobuf/client/http_requests.proto b/lib/src/model/protobuf/client/http_requests.proto new file mode 100644 index 00000000..40ce0404 --- /dev/null +++ b/lib/src/model/protobuf/client/http_requests.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; +package http_requests; + +message TextMessage { + int64 user_id = 1; + bytes body = 2; + optional bytes push_data = 3; +} + +message UploadRequest { + bytes encrypted_data = 1; + repeated bytes download_tokens = 2; + repeated TextMessage messages_on_success = 3; +} + +message SealedSenderMessageRequest { + reserved 4; + int64 recipient_user_id = 1; + bytes sealed_sender_message = 2; + bytes privacy_pass_token = 3; +} + +message SealedSenderMessageResponse { + string message_id = 1; +} + +// plaintext message send to the server +message UpdateGroupState { + message UpdateTBS { + uint64 version_id = 1; + bytes encrypted_group_state = 3; + bytes public_key = 4; + // public group key + optional bytes remove_admin = 5; + optional bytes add_admin = 6; + bytes nonce = 7; + } + UpdateTBS update = 1; + bytes signature = 2; +} + +message NewGroupState { + string group_id = 1; + uint64 version_id = 2; + bytes encrypted_group_state = 3; + bytes public_key = 4; +} + +message AppendGroupState { + message AppendTBS { + bytes encrypted_group_state_append = 1; + bytes public_key = 2; + string group_id = 3; + bytes nonce = 4; + } + bytes signature = 1; + AppendTBS appendTBS = 2; + uint64 versionId = 3; +} + +message GroupState { + uint64 version_id = 1; + bytes encrypted_group_state = 2; + repeated AppendGroupState appended_group_states = 3; +} + +// this is just a database helper to store multiple appends +message AppendGroupStateHelper { + repeated AppendGroupState appended_group_states = 1; +} diff --git a/lib/src/services/api/mediafiles/upload.api.dart b/lib/src/services/api/mediafiles/upload.api.dart index 8e786e79..14a527ce 100644 --- a/lib/src/services/api/mediafiles/upload.api.dart +++ b/lib/src/services/api/mediafiles/upload.api.dart @@ -1,4 +1,5 @@ import 'dart:async'; + import 'package:background_downloader/background_downloader.dart'; import 'package:clock/clock.dart'; import 'package:connectivity_plus/connectivity_plus.dart'; @@ -13,8 +14,8 @@ import 'package:twonly/locator.dart'; import 'package:twonly/src/database/tables/mediafiles.table.dart'; import 'package:twonly/src/database/tables/messages.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/model/protobuf/api/http/http_requests.pb.dart'; import 'package:twonly/src/model/protobuf/client/generated/data.pb.dart'; +import 'package:twonly/src/model/protobuf/client/generated/http_requests.pb.dart'; import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'; import 'package:twonly/src/services/api/mediafiles/media_background.api.dart'; import 'package:twonly/src/services/api/messages.api.dart'; diff --git a/lib/src/services/api/rust_api_result.dart b/lib/src/services/api/rust_api_result.dart index 67285516..67e2d673 100644 --- a/lib/src/services/api/rust_api_result.dart +++ b/lib/src/services/api/rust_api_result.dart @@ -1,11 +1,9 @@ -import 'dart:typed_data'; - -import 'package:twonly/src/model/protobuf/api/websocket/error.pb.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; +import 'package:twonly/src/model/error_code.dart'; import 'package:twonly/src/services/api/utils.api.dart'; import 'package:twonly/src/utils/log.dart'; +export 'package:twonly/src/model/error_code.dart'; + Future> rustApiResult(Future request) async { try { return Result.success(await request); @@ -18,33 +16,3 @@ Future> rustApiResult(Future request) async { return Result.error(ErrorCode.InternalError); } } - -Future rustApiProtobuf( - Future request, - T Function(List) decode, -) async { - try { - return decode(await request); - } catch (error) { - Log.error('Rust API call failed', error: error); - return null; - } -} - -server.Response_UserData decodeUserData(List bytes) => - server.Response_UserData.fromBuffer(bytes); - -server.Response_ProofOfWork decodeProofOfWork(List bytes) => - server.Response_ProofOfWork.fromBuffer(bytes); - -server.Response_MemoriesUrl decodeMemoriesUrl(List bytes) => - server.Response_MemoriesUrl.fromBuffer(bytes); - -server.Response_MemoriesUploadUrls decodeMemoriesUploadUrls(List bytes) => - server.Response_MemoriesUploadUrls.fromBuffer(bytes); - -server.Response_MemoriesUsage decodeMemoriesUsage(List bytes) => - server.Response_MemoriesUsage.fromBuffer(bytes); - -server.Response_PlanBallance decodePlanBalance(List bytes) => - server.Response_PlanBallance.fromBuffer(bytes); diff --git a/lib/src/services/api/utils.api.dart b/lib/src/services/api/utils.api.dart index cb4afdef..38023d31 100644 --- a/lib/src/services/api/utils.api.dart +++ b/lib/src/services/api/utils.api.dart @@ -6,8 +6,6 @@ import 'package:twonly/core/bridge/wrapper/key_manager.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/tables/mediafiles.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/model/protobuf/client/generated/messages.pbserver.dart' hide Message; import 'package:twonly/src/utils/log.dart'; @@ -35,18 +33,6 @@ DateTime fromTimestamp(Int64 timeStamp) { return date; } -// ignore: strict_raw_type -Result asResult(server.ServerToClient? msg) { - if (msg == null) { - return Result.error(ErrorCode.InternalError); - } - if (msg.v0.response.hasOk()) { - return Result.success(msg.v0.response.ok); - } else { - return Result.error(msg.v0.response.error); - } -} - Future handleMediaError(MediaFile media) async { await twonlyDB.mediaFilesDao.updateMedia( media.mediaId, @@ -72,17 +58,17 @@ Future handleMediaError(MediaFile media) async { } Future importSignalContactAndCreateRequest( - server.Response_UserData userdata, + FrbUserData userdata, ) async { try { await RustApi.establishSignalSession( - contactId: userdata.userId.toInt(), + contactId: userdata.userId, expectedPublicKey: Uint8List.fromList(userdata.publicIdentityKey), ); // 2. Then send user request await RustApi.sendEncryptedContent( - contactId: userdata.userId.toInt(), + contactId: userdata.userId, content: EncryptedContent( contactRequest: EncryptedContent_ContactRequest( type: EncryptedContent_ContactRequest_Type.REQUEST, diff --git a/lib/src/services/group.service.dart b/lib/src/services/group.service.dart deleted file mode 100644 index 2e06396d..00000000 --- a/lib/src/services/group.service.dart +++ /dev/null @@ -1,56 +0,0 @@ -import 'dart:typed_data' show Uint8List; - -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart' - show Int64List; -import 'package:twonly/core/bridge/groups.dart' as rust_groups; -import 'package:twonly/src/database/twonly.db.dart'; - -Future createNewGroup(String groupName, List members) => - rust_groups.createNewGroup( - groupName: groupName, - memberIds: Int64List.fromList( - members.map((contact) => contact.userId).toList(), - ), - ); - -Future fetchGroupStatesForUnjoinedGroups() => - rust_groups.fetchGroupStatesForUnjoinedGroups(); -Future fetchMissingGroupPublicKey() => - rust_groups.fetchMissingGroupPublicKeys(); -Future fetchGroupState(Group group) => - rust_groups.fetchGroupState(groupId: group.groupId); -Future addNewHiddenContact(int contactId) => - rust_groups.addHiddenContact(contactId: contactId); - -Future manageAdminState( - Group group, - Uint8List key, - int contactId, - bool remove, -) => rust_groups.manageAdminState( - groupId: group.groupId, - groupPublicKey: key, - contactId: contactId, - remove: remove, -); -Future updateGroupName(Group group, String name) => - rust_groups.updateGroupName(groupId: group.groupId, groupName: name); -Future updateChatDeletionTime(Group group, int milliseconds) => - rust_groups.updateChatDeletionTime( - groupId: group.groupId, - deleteMessagesAfterMilliseconds: milliseconds, - ); -Future addNewGroupMembers(Group group, List ids) => - rust_groups.addNewGroupMembers( - groupId: group.groupId, - memberIds: Int64List.fromList(ids), - ); -Future removeMemberFromGroup(Group group, Uint8List key, int contactId) => - rust_groups.removeMemberFromGroup( - groupId: group.groupId, - groupPublicKey: key, - contactId: contactId, - ); -Future leaveGroup(Group group) => - rust_groups.leaveGroup(groupId: group.groupId); -Future leaveAsNonAdminFromGroup(Group group) => leaveGroup(group); diff --git a/lib/src/services/memories/memories_cloud.service.dart b/lib/src/services/memories/memories_cloud.service.dart index 97a63aed..6565f785 100644 --- a/lib/src/services/memories/memories_cloud.service.dart +++ b/lib/src/services/memories/memories_cloud.service.dart @@ -12,8 +12,6 @@ import 'package:twonly/core/bridge/wrapper/key_manager.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/tables/mediafiles.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/model/protobuf/client/generated/backup.pb.dart'; import 'package:twonly/src/services/mediafiles/mediafile.service.dart'; import 'package:twonly/src/utils/log.dart'; @@ -171,14 +169,17 @@ class MemoriesCloudService { return true; } - final urls = await rustApiProtobuf( - RustApi.getMemoriesUrl(mediaId: mediaId, thumbnail: isThumbnail), - decodeMemoriesUrl, - ); - if (urls == null || !urls.hasFullDownloadUrl()) return false; + String? downloadUrl; + try { + downloadUrl = await RustApi.getMemoriesUrl( + mediaId: mediaId, + thumbnail: isThumbnail, + ); + } catch (_) {} + if (downloadUrl == null || downloadUrl.isEmpty) return false; try { - final response = await http.get(Uri.parse(urls.fullDownloadUrl)); + final response = await http.get(Uri.parse(downloadUrl)); if (response.statusCode == 200) { return await _decryptFile(response.bodyBytes, targetPath); @@ -208,17 +209,18 @@ class MemoriesCloudService { } final sizeBytes = ms.storedPath.lengthSync(); - final urls = await rustApiProtobuf( - RustApi.requestMemoriesUpload( + final FrbMemoriesUploadUrls? urls; + try { + urls = await RustApi.requestMemoriesUpload( size: sizeBytes, originalDate: mediaFile.createdAt.millisecondsSinceEpoch, mediaId: mediaFile.mediaId, - ), - decodeMemoriesUploadUrls, - ); - - if (urls == null) { - Log.error('Could not get upload URLs for memory ${mediaFile.mediaId}'); + ); + } catch (error) { + Log.error( + 'Could not get upload URLs for memory ${mediaFile.mediaId}', + error: error, + ); return false; } @@ -238,7 +240,8 @@ class MemoriesCloudService { final tempDir = await getTemporaryDirectory(); // 1. Upload thumbnail if exists - if (ms.thumbnailPath.existsSync() && urls.hasThumbnailUpload()) { + final thumbUpload = urls.thumbnailUpload; + if (ms.thumbnailPath.existsSync() && thumbUpload != null) { final thumbFile = await _encryptFile( ms.thumbnailPath, mediaKey, @@ -247,7 +250,7 @@ class MemoriesCloudService { 'thumb_${mediaFile.mediaId}', ); try { - await _uploadToS3(urls.thumbnailUpload, thumbFile, (_) {}); + await _uploadToS3(thumbUpload, thumbFile, (_) {}); } finally { if (thumbFile.existsSync()) { thumbFile.deleteSync(); @@ -256,7 +259,8 @@ class MemoriesCloudService { } // 2. Upload full media if exists - if (urls.hasFullUpload()) { + final fullUpload = urls.fullUpload; + if (fullUpload != null) { final fullFile = await _encryptFile( ms.storedPath, mediaKey, @@ -265,7 +269,7 @@ class MemoriesCloudService { 'full_${mediaFile.mediaId}', ); try { - await _uploadToS3(urls.fullUpload, fullFile, onProgress); + await _uploadToS3(fullUpload, fullFile, onProgress); } finally { if (fullFile.existsSync()) { fullFile.deleteSync(); @@ -304,7 +308,7 @@ class MemoriesCloudService { } Future _uploadToS3( - server.Response_PresignedPost presignedPost, + FrbPresignedPost presignedPost, File file, void Function(double progress) onProgress, ) async { @@ -318,7 +322,9 @@ class MemoriesCloudService { }, ); - request.fields.addAll(presignedPost.fields); + request.fields.addAll( + Map.fromEntries(presignedPost.fields.map((f) => MapEntry(f.$1, f.$2))), + ); request.files.add( await http.MultipartFile.fromPath( 'file', diff --git a/lib/src/services/passwordless_recovery.service.dart b/lib/src/services/passwordless_recovery.service.dart index 680f9f99..fe483a70 100644 --- a/lib/src/services/passwordless_recovery.service.dart +++ b/lib/src/services/passwordless_recovery.service.dart @@ -16,8 +16,6 @@ import 'package:twonly/src/database/daos/contacts.dao.dart' show getContactDisplayName; import 'package:twonly/src/database/twonly.db.dart'; import 'package:twonly/src/model/json/onboarding_state.model.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart' as pb; import 'package:twonly/src/model/protobuf/client/generated/passwordless_recovery.pb.dart'; @@ -312,6 +310,7 @@ class PasswordlessRecoveryService { } unawaited( + // ignore: inference_failure_on_untyped_parameter RustApi.performPasswordlessRecoveryHeartbeat().catchError((e) { Log.warn('Failed to perform passwordless recovery heartbeat: $e'); }), @@ -377,16 +376,13 @@ class PasswordlessRecoveryService { state.receivedShares.map((share) => share.messageId).toList(), ); - late final server.Response_PasswordlessNotificationMessages response; + late final List messages; try { - final responseBytes = await RustApi.checkForPasswordlessNotification( + messages = await RustApi.checkForPasswordlessNotification( notificationId: state.notificationId!, downloadAuthToken: state.downloadAuthToken!, alreadyReceivedMessageIds: alreadyReceivedIds, ); - response = server.Response_PasswordlessNotificationMessages.fromBuffer( - responseBytes, - ); } catch (error) { Log.error( 'Failed to load passwordless recovery messages', @@ -395,7 +391,7 @@ class PasswordlessRecoveryService { return false; } - if (response.messages.isEmpty) { + if (messages.isEmpty) { return false; } @@ -403,8 +399,8 @@ class PasswordlessRecoveryService { final secretKey = SecretKey(state.encryptionKey!); var didUpdate = false; - for (final msg in response.messages) { - final msgId = msg.id.toInt(); + for (final msg in messages) { + final msgId = msg.id; try { final envelope = EncryptedEnvelope.fromBuffer(msg.encryptedMessage); diff --git a/lib/src/services/user_discovery.service.dart b/lib/src/services/user_discovery.service.dart index 1c3803b1..0047d0fb 100644 --- a/lib/src/services/user_discovery.service.dart +++ b/lib/src/services/user_discovery.service.dart @@ -17,11 +17,14 @@ class UserDiscoveryService { .getNewAnnouncementsWithoutData(); for (final announcedUser in announcedUsers) { - final userdata = await rustApiProtobuf( - RustApi.getUserById(userId: announcedUser.announcedUserId), - decodeUserData, - ); - if (userdata == null) continue; + final FrbUserData? userdata; + try { + userdata = await RustApi.getUserById( + userId: announcedUser.announcedUserId, + ); + } catch (_) { + continue; + } if (!userdata.publicIdentityKey.equals( announcedUser.announcedPublicKey.toList(), )) { diff --git a/lib/src/utils/misc.dart b/lib/src/utils/misc.dart index 65299bd0..1be9c41d 100644 --- a/lib/src/utils/misc.dart +++ b/lib/src/utils/misc.dart @@ -14,7 +14,7 @@ import 'package:local_auth/local_auth.dart'; import 'package:path/path.dart'; import 'package:provider/provider.dart'; import 'package:twonly/src/localization/generated/app_localizations.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/error.pb.dart'; +import 'package:twonly/src/model/error_code.dart'; import 'package:twonly/src/providers/settings.provider.dart'; import 'package:twonly/src/services/backup.service.dart'; import 'package:twonly/src/utils/log.dart'; @@ -150,7 +150,6 @@ String getRandomString(int length) => String.fromCharCodes( ); String errorCodeToText(BuildContext context, ErrorCode code) { - // ignore: exhaustive_cases switch (code) { case ErrorCode.InternalError: return context.lang.errorInternalError; @@ -170,8 +169,10 @@ String errorCodeToText(BuildContext context, ErrorCode code) { return context.lang.errorVoucherInvalid; case ErrorCode.PlanUpgradeNotYearly: return context.lang.errorPlanUpgradeNotYearly; + // ignore: no_default_cases + default: + return code.toString(); } - return code.toString(); } String formatDuration(BuildContext context, int seconds) { diff --git a/lib/src/visual/components/select_chat_deletion_time.comp.dart b/lib/src/visual/components/select_chat_deletion_time.comp.dart index 479a5e35..bb13a998 100644 --- a/lib/src/visual/components/select_chat_deletion_time.comp.dart +++ b/lib/src/visual/components/select_chat_deletion_time.comp.dart @@ -4,11 +4,11 @@ import 'package:drift/drift.dart' show Value; import 'package:fixnum/fixnum.dart'; import 'package:flutter/cupertino.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:twonly/core/bridge/groups.dart' as rust_groups; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/tables/groups.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'; -import 'package:twonly/src/services/group.service.dart'; import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/elements/better_list_title.element.dart'; import 'package:twonly/src/visual/views/groups/group.view.dart'; @@ -106,7 +106,10 @@ class _SelectChatDeletionTimeListTitleState onlySendIfNoReceiptsAreOpen: false, ); } else { - if (!await updateChatDeletionTime(group!, selected)) { + if (!await rust_groups.updateChatDeletionTime( + groupId: group!.groupId, + deleteMessagesAfterMilliseconds: selected, + )) { if (mounted) { showNetworkIssue(context); } diff --git a/lib/src/visual/views/chats/chat_messages_components/entries/chat_ask_a_friend.entry.dart b/lib/src/visual/views/chats/chat_messages_components/entries/chat_ask_a_friend.entry.dart index 7d5a3258..ca842ba8 100644 --- a/lib/src/visual/views/chats/chat_messages_components/entries/chat_ask_a_friend.entry.dart +++ b/lib/src/visual/views/chats/chat_messages_components/entries/chat_ask_a_friend.entry.dart @@ -88,7 +88,10 @@ class _ChatAskAFriendEntryState extends State { _username = contact.displayName ?? contact.username; } else { // Fetch from API - final userdata = await rustApiProtobuf(RustApi.getUserById(userId: userId), decodeUserData); + FrbUserData? userdata; + try { + userdata = await RustApi.getUserById(userId: userId); + } catch (_) {} if (userdata != null) { _username = utf8.decode(userdata.username); } @@ -122,12 +125,15 @@ class _ChatAskAFriendEntryState extends State { }); try { final userId = _data!.askAboutUserId.toInt(); - final userdata = await rustApiProtobuf(RustApi.getUserById(userId: userId), decodeUserData); + FrbUserData? userdata; + try { + userdata = await RustApi.getUserById(userId: userId); + } catch (_) {} if (userdata != null) { await twonlyDB.contactsDao.insertOnConflictUpdate( ContactsCompanion( username: Value(utf8.decode(userdata.username)), - userId: Value(userdata.userId.toInt()), + userId: Value(userdata.userId), requested: const Value(false), blocked: const Value(false), deletedByUser: const Value(false), diff --git a/lib/src/visual/views/chats/chat_messages_components/entries/chat_contacts.entry.dart b/lib/src/visual/views/chats/chat_messages_components/entries/chat_contacts.entry.dart index 0f2643e6..7134264b 100644 --- a/lib/src/visual/views/chats/chat_messages_components/entries/chat_contacts.entry.dart +++ b/lib/src/visual/views/chats/chat_messages_components/entries/chat_contacts.entry.dart @@ -117,11 +117,9 @@ class _ContactRowState extends State<_ContactRow> { }); try { - final userdata = await rustApiProtobuf( - RustApi.getUserById(userId: widget.contact.userId.toInt()), - decodeUserData, + final userdata = await RustApi.getUserById( + userId: widget.contact.userId.toInt(), ); - if (userdata == null) return; final username = utf8.decode(userdata.username); @@ -140,7 +138,7 @@ class _ContactRowState extends State<_ContactRow> { final added = await twonlyDB.contactsDao.insertOnConflictUpdate( ContactsCompanion( username: Value(username), - userId: Value(userdata.userId.toInt()), + userId: Value(userdata.userId), requested: const Value(false), blocked: const Value(false), deletedByUser: const Value(false), @@ -150,7 +148,7 @@ class _ContactRowState extends State<_ContactRow> { if (added > 0) await importSignalContactAndCreateRequest(userdata); await KeyVerificationService.verifySharedContact( - contactId: userdata.userId.toInt(), + contactId: userdata.userId, sharedPublicIdentityKey: widget.contact.publicIdentityKey, senderId: widget.message.senderId!, ); diff --git a/lib/src/visual/views/contact/add_contact_via_qr_link.view.dart b/lib/src/visual/views/contact/add_contact_via_qr_link.view.dart index c970a24c..3437528a 100644 --- a/lib/src/visual/views/contact/add_contact_via_qr_link.view.dart +++ b/lib/src/visual/views/contact/add_contact_via_qr_link.view.dart @@ -6,8 +6,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:go_router/go_router.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/model/protobuf/client/generated/qr.pb.dart'; import 'package:twonly/src/services/api/utils.api.dart'; import 'package:twonly/src/utils/log.dart'; @@ -39,14 +37,10 @@ class _AddContactViaQrLinkViewState extends State { }); try { - final userData = server.Response_UserData( - userId: widget.profile.userId, - publicIdentityKey: widget.profile.publicIdentityKey, - signedPrekey: widget.profile.signedPrekey, - signedPrekeySignature: widget.profile.signedPrekeySignature, - signedPrekeyId: widget.profile.signedPrekeyId, - username: utf8.encode(widget.profile.username), - registrationId: widget.profile.registrationId, + final userData = FrbUserData( + userId: widget.profile.userId.toInt(), + publicIdentityKey: Uint8List.fromList(widget.profile.publicIdentityKey), + username: Uint8List.fromList(utf8.encode(widget.profile.username)), ); final added = await twonlyDB.contactsDao.insertOnConflictUpdate( diff --git a/lib/src/visual/views/contact/add_new_contact.view.dart b/lib/src/visual/views/contact/add_new_contact.view.dart index f8ef22c6..c9b11f40 100644 --- a/lib/src/visual/views/contact/add_new_contact.view.dart +++ b/lib/src/visual/views/contact/add_new_contact.view.dart @@ -117,10 +117,12 @@ class _SearchUsernameView extends State { _isLoading = true; }); - final userdata = await rustApiProtobuf( - RustApi.getUserData(username: username), - decodeUserData, - ); + FrbUserData? userdata; + try { + userdata = await RustApi.getUserData(username: username); + } catch (_) { + userdata = null; + } if (!mounted) return; setState(() { @@ -149,7 +151,7 @@ class _SearchUsernameView extends State { final added = await twonlyDB.contactsDao.insertOnConflictUpdate( ContactsCompanion( username: Value(username), - userId: Value(userdata.userId.toInt()), + userId: Value(userdata.userId), requested: const Value(false), blocked: const Value(false), deletedByUser: const Value(false), @@ -167,7 +169,7 @@ class _SearchUsernameView extends State { ); if (markAsVerified) { await twonlyDB.keyVerificationDao.addKeyVerification( - userdata.userId.toInt(), + userdata.userId, VerificationType.link, ); } diff --git a/lib/src/visual/views/contact/add_new_contact_components/friend_suggestions.comp.dart b/lib/src/visual/views/contact/add_new_contact_components/friend_suggestions.comp.dart index b7d706e4..e877cbc0 100644 --- a/lib/src/visual/views/contact/add_new_contact_components/friend_suggestions.comp.dart +++ b/lib/src/visual/views/contact/add_new_contact_components/friend_suggestions.comp.dart @@ -46,7 +46,14 @@ class FriendSuggestionsComp extends StatelessWidget { ) async { Log.info('Requesting user via friend suggestions'); - final userdata = await rustApiProtobuf(RustApi.getUserById(userId: user.announcedUserId), decodeUserData); + FrbUserData? userdata; + try { + userdata = await RustApi.getUserById( + userId: user.announcedUserId, + ); + } catch (_) { + userdata = null; + } if (userdata == null) { if (context.mounted) { @@ -58,7 +65,7 @@ class FriendSuggestionsComp extends StatelessWidget { final added = await twonlyDB.contactsDao.insertOnConflictUpdate( ContactsCompanion( username: Value(user.username!), - userId: Value(userdata.userId.toInt()), + userId: Value(userdata.userId), requested: const Value(false), blocked: const Value(false), deletedByUser: const Value(false), diff --git a/lib/src/visual/views/groups/group.view.dart b/lib/src/visual/views/groups/group.view.dart index 827a87c4..1eeead3e 100644 --- a/lib/src/visual/views/groups/group.view.dart +++ b/lib/src/visual/views/groups/group.view.dart @@ -1,12 +1,14 @@ import 'dart:async'; import 'package:flutter/material.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart' + show Int64List; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:twonly/core/bridge/groups.dart' as rust_groups; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/daos/contacts.dao.dart'; import 'package:twonly/src/database/tables/groups.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/services/group.service.dart'; import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/components/alert.dialog.dart'; import 'package:twonly/src/visual/components/avatar_icon.comp.dart'; @@ -78,7 +80,10 @@ class _GroupViewState extends State { newGroupName != null && newGroupName != '' && newGroupName != _group!.groupName) { - if (!await updateGroupName(_group!, newGroupName)) { + if (!await rust_groups.updateGroupName( + groupId: _group!.groupId, + groupName: newGroupName, + )) { if (mounted) { showNetworkIssue(context); } @@ -98,7 +103,10 @@ class _GroupViewState extends State { ) as List?; if (selectedUserIds == null) return; - if (!await addNewGroupMembers(_group!, selectedUserIds)) { + if (!await rust_groups.addNewGroupMembers( + groupId: _group!.groupId, + memberIds: Int64List.fromList(selectedUserIds), + )) { if (mounted) { showNetworkIssue(context); } @@ -134,7 +142,7 @@ class _GroupViewState extends State { } } - final success = await leaveGroup(_group!); + final success = await rust_groups.leaveGroup(groupId: _group!.groupId); if (!success) { if (mounted) { diff --git a/lib/src/visual/views/groups/group_create_select_group_name.view.dart b/lib/src/visual/views/groups/group_create_select_group_name.view.dart index 0c11d963..561cec9f 100644 --- a/lib/src/visual/views/groups/group_create_select_group_name.view.dart +++ b/lib/src/visual/views/groups/group_create_select_group_name.view.dart @@ -1,8 +1,10 @@ import 'package:flutter/material.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart' + show Int64List; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:twonly/core/bridge/groups.dart' as rust_groups; import 'package:twonly/src/database/daos/contacts.dao.dart'; import 'package:twonly/src/database/twonly.db.dart'; -import 'package:twonly/src/services/group.service.dart'; import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/components/avatar_icon.comp.dart'; import 'package:twonly/src/visual/components/contact_labels.comp.dart'; @@ -36,9 +38,11 @@ class _GroupCreateSelectGroupNameViewState _isLoading = true; }); - final wasSuccess = await createNewGroup( - textFieldGroupName.text, - widget.selectedUsers, + final wasSuccess = await rust_groups.createNewGroup( + groupName: textFieldGroupName.text, + memberIds: Int64List.fromList( + widget.selectedUsers.map((contact) => contact.userId).toList(), + ), ); if (wasSuccess) { // POP diff --git a/lib/src/visual/views/groups/group_member.context.dart b/lib/src/visual/views/groups/group_member.context.dart index f5bd6a69..c3c9bfae 100644 --- a/lib/src/visual/views/groups/group_member.context.dart +++ b/lib/src/visual/views/groups/group_member.context.dart @@ -2,13 +2,13 @@ import 'package:drift/drift.dart' show Value; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:go_router/go_router.dart'; +import 'package:twonly/core/bridge/groups.dart' as rust_groups; import 'package:twonly/locator.dart'; import 'package:twonly/src/constants/routes.keys.dart'; import 'package:twonly/src/database/daos/contacts.dao.dart'; import 'package:twonly/src/database/tables/groups.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart'; -import 'package:twonly/src/services/group.service.dart'; import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/components/alert.dialog.dart'; import 'package:twonly/src/visual/components/snackbar.dart'; @@ -36,11 +36,11 @@ class GroupMemberContextMenu extends StatelessWidget { customOk: context.lang.makeAdminRightsOkBtn, ); if (ok) { - if (!await manageAdminState( - group, - member.groupPublicKey!, - contact.userId, - false, + if (!await rust_groups.manageAdminState( + groupId: group.groupId, + groupPublicKey: member.groupPublicKey!, + contactId: contact.userId, + remove: false, )) { if (context.mounted) { showNetworkIssue(context); @@ -57,11 +57,11 @@ class GroupMemberContextMenu extends StatelessWidget { customOk: context.lang.revokeAdminRightsOkBtn, ); if (ok) { - if (!await manageAdminState( - group, - member.groupPublicKey!, - contact.userId, - true, + if (!await rust_groups.manageAdminState( + groupId: group.groupId, + groupPublicKey: member.groupPublicKey!, + contactId: contact.userId, + remove: true, )) { if (context.mounted) { showNetworkIssue(context); @@ -77,10 +77,10 @@ class GroupMemberContextMenu extends StatelessWidget { '', ); if (ok) { - if (!await removeMemberFromGroup( - group, - member.groupPublicKey!, - contact.userId, + if (!await rust_groups.removeMemberFromGroup( + groupId: group.groupId, + groupPublicKey: member.groupPublicKey!, + contactId: contact.userId, )) { if (context.mounted) { showNetworkIssue(context); diff --git a/lib/src/visual/views/memories/memories.view.dart b/lib/src/visual/views/memories/memories.view.dart index dc8757c2..c6e8e570 100644 --- a/lib/src/visual/views/memories/memories.view.dart +++ b/lib/src/visual/views/memories/memories.view.dart @@ -46,7 +46,10 @@ class MemoriesViewState extends State } Future _checkUsage() async { - final usage = await rustApiProtobuf(RustApi.getMemoriesUsage(), decodeMemoriesUsage); + FrbMemoriesUsage? usage; + try { + usage = await RustApi.getMemoriesUsage(); + } catch (_) {} if (usage != null && usage.maxBytes > 0 && usage.currentBytes >= usage.maxBytes) { diff --git a/lib/src/visual/views/onboarding/register.view.dart b/lib/src/visual/views/onboarding/register.view.dart index a31d88ac..6e976e02 100644 --- a/lib/src/visual/views/onboarding/register.view.dart +++ b/lib/src/visual/views/onboarding/register.view.dart @@ -78,9 +78,7 @@ class _RegisterViewState extends State { proof = await proofOfWork!; } else { final proofResult = await rustApiResult(RustApi.getProofOfWork()); - final pow = proofResult.value == null - ? null - : decodeProofOfWork(proofResult.value!); + final pow = proofResult.value; final registrationDisabled = proofResult.error == ErrorCode.RegistrationDisabled; if (pow == null) { @@ -93,7 +91,7 @@ class _RegisterViewState extends State { } return; } - proof = await calculatePoW(pow.prefix, pow.difficulty.toInt()); + proof = await calculatePoW(pow.prefix, pow.difficulty); } Log.info('The result of the POW is $proof'); diff --git a/lib/src/visual/views/settings/backup/backup_settings.view.dart b/lib/src/visual/views/settings/backup/backup_settings.view.dart index 40ce8d62..1cceadc6 100644 --- a/lib/src/visual/views/settings/backup/backup_settings.view.dart +++ b/lib/src/visual/views/settings/backup/backup_settings.view.dart @@ -7,8 +7,6 @@ import 'package:provider/provider.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/constants/routes.keys.dart'; import 'package:twonly/src/model/json/backup.model.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/providers/purchases.provider.dart'; import 'package:twonly/src/services/backup.service.dart'; import 'package:twonly/src/services/memories/memories_cloud.service.dart'; @@ -33,7 +31,7 @@ class BackupView extends StatefulWidget { class _BackupViewState extends State { bool _isLoading = false; CurrentBackupStatus? _backupStatus; - server.Response_MemoriesUsage? _memoriesUsage; + FrbMemoriesUsage? _memoriesUsage; StreamSubscription? _backupUpdateSub; @override @@ -54,7 +52,10 @@ class _BackupViewState extends State { Future _loadBackupStatus() async { setState(() => _isLoading = true); final status = await BackupService.getData(); - final memoriesUsage = await rustApiProtobuf(RustApi.getMemoriesUsage(), decodeMemoriesUsage); + FrbMemoriesUsage? memoriesUsage; + try { + memoriesUsage = await RustApi.getMemoriesUsage(); + } catch (_) {} if (!mounted) return; setState(() { _backupStatus = status; @@ -197,7 +198,7 @@ class _BackupViewState extends State { : (!userService.currentUser.isCloudBackupEnabled ? context.lang.backupMemoriesNotEnabled : (_memoriesUsage != null - ? '${formatBytes(_memoriesUsage!.currentBytes.toInt())} / ${formatBytes(_memoriesUsage!.maxBytes.toInt())}' + ? '${formatBytes(_memoriesUsage!.currentBytes)} / ${formatBytes(_memoriesUsage!.maxBytes)}' : '-')), ), trailing: isFreePlan diff --git a/lib/src/visual/views/settings/backup/memories_backup_detail.view.dart b/lib/src/visual/views/settings/backup/memories_backup_detail.view.dart index 3efae528..39688d5d 100644 --- a/lib/src/visual/views/settings/backup/memories_backup_detail.view.dart +++ b/lib/src/visual/views/settings/backup/memories_backup_detail.view.dart @@ -1,8 +1,6 @@ import 'dart:async'; import 'package:flutter/material.dart'; import 'package:twonly/locator.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart' - as server; import 'package:twonly/src/services/memories/memories_cloud.service.dart'; import 'package:twonly/src/utils/misc.dart'; import 'package:twonly/src/visual/components/snackbar.dart'; @@ -19,7 +17,7 @@ class MemoriesBackupDetailView extends StatefulWidget { } class _MemoriesBackupDetailViewState extends State { - server.Response_MemoriesUsage? _memoriesUsage; + FrbMemoriesUsage? _memoriesUsage; bool _isLoading = true; @override @@ -29,7 +27,10 @@ class _MemoriesBackupDetailViewState extends State { } Future _loadStats() async { - final memoriesUsage = await rustApiProtobuf(RustApi.getMemoriesUsage(), decodeMemoriesUsage); + FrbMemoriesUsage? memoriesUsage; + try { + memoriesUsage = await RustApi.getMemoriesUsage(); + } catch (_) {} if (mounted) { setState(() { _memoriesUsage = memoriesUsage; @@ -58,7 +59,7 @@ class _MemoriesBackupDetailViewState extends State { children: [ Text( _memoriesUsage != null - ? '${formatBytes(_memoriesUsage!.currentBytes.toInt())} / ${formatBytes(_memoriesUsage!.maxBytes.toInt())}' + ? '${formatBytes(_memoriesUsage!.currentBytes)} / ${formatBytes(_memoriesUsage!.maxBytes)}' : '-', style: Theme.of(context).textTheme.headlineMedium?.copyWith( fontWeight: FontWeight.bold, diff --git a/lib/src/visual/views/settings/help/contact_us.view.dart b/lib/src/visual/views/settings/help/contact_us.view.dart index 7caf6a8d..be9b6bf7 100644 --- a/lib/src/visual/views/settings/help/contact_us.view.dart +++ b/lib/src/visual/views/settings/help/contact_us.view.dart @@ -10,7 +10,7 @@ import 'package:http/http.dart' as http; import 'package:package_info_plus/package_info_plus.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/constants/routes.keys.dart'; -import 'package:twonly/src/model/protobuf/api/http/http_requests.pb.dart'; +import 'package:twonly/src/model/protobuf/client/generated/http_requests.pb.dart'; import 'package:twonly/src/services/api/utils.api.dart'; import 'package:twonly/src/utils/log.dart'; import 'package:twonly/src/utils/misc.dart'; diff --git a/lib/src/visual/views/settings/subscription/additional_users.view.dart b/lib/src/visual/views/settings/subscription/additional_users.view.dart index 26f4821a..a5756f91 100644 --- a/lib/src/visual/views/settings/subscription/additional_users.view.dart +++ b/lib/src/visual/views/settings/subscription/additional_users.view.dart @@ -5,7 +5,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/daos/contacts.dao.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart'; import 'package:twonly/src/providers/purchases.provider.dart'; import 'package:twonly/src/services/subscription.service.dart'; import 'package:twonly/src/utils/misc.dart'; @@ -17,14 +16,14 @@ import 'package:twonly/src/visual/views/settings/subscription/select_additional_ class AdditionalUsersView extends StatefulWidget { const AdditionalUsersView({required this.ballance, super.key}); - final Response_PlanBallance? ballance; + final FrbPlanBalance? ballance; @override State createState() => _AdditionalUsersViewState(); } class _AdditionalUsersViewState extends State { - Response_PlanBallance? ballance; + FrbPlanBalance? ballance; late int _unusedAdditionalAccounts; int _planLimit = 0; @@ -48,10 +47,11 @@ class _AdditionalUsersViewState extends State { Future initAsync({required bool force}) async { if (force) { - ballance = await rustApiProtobuf( - RustApi.loadPlanBalance(), - decodePlanBalance, - ); + try { + ballance = await RustApi.loadPlanBalance(); + } catch (_) { + ballance = null; + } _unusedAdditionalAccounts = _planLimit - (ballance?.additionalAccounts.length ?? _planLimit); } @@ -65,7 +65,7 @@ class _AdditionalUsersViewState extends State { limit: _planLimit, alreadySelected: ballance?.additionalAccounts - .map((e) => e.userId.toInt()) + .map((e) => e.userId) .toList() ?? [], ), @@ -162,7 +162,7 @@ class AdditionalAccount extends StatefulWidget { }); final void Function() refresh; - final Response_AdditionalAccount account; + final FrbAdditionalAccount account; @override State createState() => _AdditionalAccountState(); } @@ -179,7 +179,7 @@ class _AdditionalAccountState extends State { Future initAsync() async { final contact = await twonlyDB.contactsDao - .getContactByUserId(widget.account.userId.toInt()) + .getContactByUserId(widget.account.userId) .getSingleOrNull(); if (contact != null) { username = getContactDisplayName(contact); @@ -225,7 +225,7 @@ class _AdditionalAccountState extends State { if (remove) { final res = await rustApiResult( RustApi.removeAdditionalUser( - userId: widget.account.userId.toInt(), + userId: widget.account.userId, ), ); if (!context.mounted) return; diff --git a/lib/src/visual/views/settings/subscription/subscription.view.dart b/lib/src/visual/views/settings/subscription/subscription.view.dart index 1e8e8a42..d98f4660 100644 --- a/lib/src/visual/views/settings/subscription/subscription.view.dart +++ b/lib/src/visual/views/settings/subscription/subscription.view.dart @@ -6,7 +6,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; import 'package:twonly/locator.dart'; import 'package:twonly/src/database/daos/contacts.dao.dart'; -import 'package:twonly/src/model/protobuf/api/websocket/server_to_client.pb.dart'; import 'package:twonly/src/model/purchasable_product.model.dart'; import 'package:twonly/src/providers/purchases.provider.dart'; import 'package:twonly/src/services/subscription.service.dart'; @@ -26,7 +25,7 @@ class SubscriptionView extends StatefulWidget { class _SubscriptionViewState extends State { bool loaded = false; bool testerRequested = true; - Response_PlanBallance? ballance; + FrbPlanBalance? ballance; String? additionalOwnerName; @override @@ -36,12 +35,13 @@ class _SubscriptionViewState extends State { } Future initAsync() async { - ballance = await rustApiProtobuf( - RustApi.loadPlanBalance(), - decodePlanBalance, - ); - if (ballance != null && ballance!.hasAdditionalAccountOwnerId()) { - final ownerId = ballance!.additionalAccountOwnerId.toInt(); + try { + ballance = await RustApi.loadPlanBalance(); + } catch (_) { + ballance = null; + } + if (ballance != null && ballance!.additionalAccountOwnerId != null) { + final ownerId = ballance!.additionalAccountOwnerId!; final contact = await twonlyDB.contactsDao .getContactByUserId(ownerId) .getSingleOrNull(); diff --git a/rust/src/api/runtime/helpers.rs b/rust/src/api/runtime/helpers.rs index a97cac54..32c807e9 100644 --- a/rust/src/api/runtime/helpers.rs +++ b/rust/src/api/runtime/helpers.rs @@ -140,3 +140,10 @@ pub(crate) fn decode_ok_value( ServerResult::ErrorCode(code) => Ok(ServerResult::ErrorCode(code)), } } + +pub(crate) fn decode_empty_ok(bytes: Vec) -> Result> { + decode_ok_value(bytes, |value| match value { + server_to_client::response::ok::Ok::None(_) => Some(()), + _ => None, + }) +} diff --git a/rust/src/api/server/purchases.rs b/rust/src/api/server/purchases.rs index d452154f..d6cfe300 100644 --- a/rust/src/api/server/purchases.rs +++ b/rust/src/api/server/purchases.rs @@ -4,8 +4,8 @@ */ use super::Server; -use crate::api::proto::client_to_server; use crate::api::proto::server_to_client::response::ok::Ok as ResponseOk; +use crate::api::proto::{client_to_server, server_to_client}; use crate::api::runtime::helpers::decode_ok_value; use crate::api::server::server_ok; use crate::bridge::api::ServerResult; @@ -24,6 +24,16 @@ impl Server { .await } + pub async fn get_plan_balance_model( + ctx: &Arc, + ) -> Result> { + let bytes = Self::get_plan_balance(ctx).await?; + decode_ok_value(bytes, |value| match value { + server_to_client::response::ok::Ok::Planballance(balance) => Some(balance), + _ => None, + }) + } + pub async fn load_plan_balance(ctx: &Arc) -> Result> { Self::get_plan_balance(ctx).await } diff --git a/rust/src/bridge/api.rs b/rust/src/bridge/api.rs index 332efe34..698dd2a8 100644 --- a/rust/src/bridge/api.rs +++ b/rust/src/bridge/api.rs @@ -3,12 +3,10 @@ * */ +use crate::api::messages::incoming::messages; use crate::api::ApiRuntime; pub use crate::api::PqcPreKeyInput; use crate::api::Server; -use crate::api::messages::incoming::messages; -use crate::api::proto::server_to_client::response::ok::Ok as ResponseOk; -use crate::api::runtime::helpers::decode_ok_value; use crate::context::Context; use crate::error::{Result, TwonlyError}; use crate::frb_generated::StreamSink; @@ -16,7 +14,6 @@ use crate::services::contacts::ContactService; use crate::services::messages::MessageService; use crate::user_config::UserConfig; use flutter_rust_bridge::frb; -use prost::Message; #[frb(ignore)] pub enum ServerResult { @@ -32,17 +29,7 @@ fn api_result(result: ServerResult) -> Result { } fn empty_api_response(bytes: Vec) -> Result<()> { - api_result(decode_ok_value(bytes, |value| match value { - ResponseOk::None(_) => Some(()), - _ => None, - })?) -} - -fn encoded_api_response( - bytes: Vec, - extract: impl FnOnce(ResponseOk) -> Option, -) -> Result> { - api_result(decode_ok_value(bytes, extract)?).map(|value| value.encode_to_vec()) + crate::api::runtime::helpers::decode_empty_ok(bytes).and_then(api_result) } #[derive(Clone, Debug)] @@ -102,6 +89,62 @@ pub enum ApiEventKind { LoginTokenMigrated, } +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbPasswordlessNotificationMessage { + pub id: i64, + pub encrypted_message: Vec, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbUserData { + pub user_id: i64, + pub username: Vec, + pub public_identity_key: Vec, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbProofOfWork { + pub prefix: String, + pub difficulty: i64, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbMemoriesUsage { + pub current_bytes: i64, + pub count: i64, + pub max_bytes: i64, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbAdditionalAccount { + pub user_id: i64, + pub plan_id: String, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbPlanBalance { + pub used_daily_media_upload_limit: i64, + pub used_upload_media_size_limit: i64, + pub payment_period_days: Option, + pub last_payment_done_unix_timestamp: Option, + pub additional_accounts: Vec, + pub auto_renewal: Option, + pub additional_account_owner_id: Option, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbPresignedPost { + pub url: String, + pub fields: Vec<(String, String)>, +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct FrbMemoriesUploadUrls { + pub media_id: String, + pub thumbnail_upload: Option, + pub full_upload: Option, +} + /// Flutter-facing facade for the Rust-owned API runtime. pub struct RustApi {} @@ -188,12 +231,16 @@ impl RustApi { .and_then(api_result) } - pub async fn get_user_by_id(user_id: i64) -> Result> { + pub async fn get_user_by_id(user_id: i64) -> Result { let ctx = Context::get_static()?; - Server::get_user_by_id(ctx, user_id) + let res = Server::get_user_by_id(ctx, user_id) .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + .and_then(api_result)?; + Ok(FrbUserData { + user_id: res.user_id, + username: res.username.unwrap_or_default(), + public_identity_key: res.public_identity_key.unwrap_or_default(), + }) } pub async fn check_for_deleted_usernames() -> Result<()> { let ctx = Context::get_static()?; @@ -205,19 +252,24 @@ impl RustApi { .await .and_then(api_result) } - pub async fn get_user_data(username: String) -> Result> { + pub async fn get_user_data(username: String) -> Result { let ctx = Context::get_static()?; - Server::get_user_by_username(ctx, username) + let res = Server::get_user_by_username(ctx, username) .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + .and_then(api_result)?; + Ok(FrbUserData { + user_id: res.user_id, + username: res.username.unwrap_or_default(), + public_identity_key: res.public_identity_key.unwrap_or_default(), + }) } - pub async fn get_proof_of_work() -> Result> { + pub async fn get_proof_of_work() -> Result { let ctx = Context::get_static()?; - Server::get_proof_of_work(ctx) - .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + let res = Server::get_proof_of_work(ctx).await.and_then(api_result)?; + Ok(FrbProofOfWork { + prefix: res.prefix, + difficulty: res.difficulty, + }) } pub async fn download_done(token: Vec) -> Result<()> { let ctx = Context::get_static()?; @@ -250,30 +302,43 @@ impl RustApi { .await .and_then(api_result) } + pub async fn request_memories_upload( size: i64, original_date: i64, media_id: String, - ) -> Result> { + ) -> Result { let ctx = Context::get_static()?; - Server::request_memories_upload(ctx, size, original_date, media_id) + let res = Server::request_memories_upload(ctx, size, original_date, media_id) .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + .and_then(api_result)?; + Ok(FrbMemoriesUploadUrls { + media_id: res.media_id, + thumbnail_upload: res.thumbnail_upload.map(|p| FrbPresignedPost { + url: p.url, + fields: p.fields.into_iter().collect(), + }), + full_upload: res.full_upload.map(|p| FrbPresignedPost { + url: p.url, + fields: p.fields.into_iter().collect(), + }), + }) } - pub async fn get_memories_usage() -> Result> { + pub async fn get_memories_usage() -> Result { let ctx = Context::get_static()?; - Server::get_memories_usage(ctx) - .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + let res = Server::get_memories_usage(ctx).await.and_then(api_result)?; + Ok(FrbMemoriesUsage { + current_bytes: res.current_bytes, + count: res.count, + max_bytes: res.max_bytes, + }) } - pub async fn get_memories_url(media_id: String, thumbnail: bool) -> Result> { + pub async fn get_memories_url(media_id: String, thumbnail: bool) -> Result { let ctx = Context::get_static()?; - Server::get_memories_url(ctx, media_id, thumbnail) + let res = Server::get_memories_url(ctx, media_id, thumbnail) .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + .and_then(api_result)?; + Ok(res.full_download_url) } pub async fn confirm_memories_upload(media_id: String) -> Result<()> { let ctx = Context::get_static()?; @@ -293,19 +358,30 @@ impl RustApi { .await .and_then(api_result) } - pub async fn get_plan_balance() -> Result> { + pub async fn get_plan_balance() -> Result { let ctx = Context::get_static()?; - encoded_api_response(Server::get_plan_balance(ctx).await?, |value| match value { - ResponseOk::Planballance(balance) => Some(balance), - _ => None, + let res = Server::get_plan_balance_model(ctx) + .await + .and_then(api_result)?; + Ok(FrbPlanBalance { + used_daily_media_upload_limit: res.used_daily_media_upload_limit, + used_upload_media_size_limit: res.used_upload_media_size_limit, + payment_period_days: res.payment_period_days, + last_payment_done_unix_timestamp: res.last_payment_done_unix_timestamp, + additional_accounts: res + .additional_accounts + .into_iter() + .map(|a| FrbAdditionalAccount { + user_id: a.user_id, + plan_id: a.plan_id, + }) + .collect(), + auto_renewal: res.auto_renewal, + additional_account_owner_id: res.additional_account_owner_id, }) } - pub async fn load_plan_balance() -> Result> { - let ctx = Context::get_static()?; - encoded_api_response(Server::load_plan_balance(ctx).await?, |value| match value { - ResponseOk::Planballance(balance) => Some(balance), - _ => None, - }) + pub async fn load_plan_balance() -> Result { + Self::get_plan_balance().await } pub async fn remove_additional_user(user_id: i64) -> Result<()> { let ctx = Context::get_static()?; @@ -377,22 +453,31 @@ impl RustApi { .await .and_then(api_result) } + pub async fn check_for_passwordless_notification( notification_id: String, download_auth_token: Vec, already_received_message_ids: Vec, - ) -> Result> { + ) -> Result> { let ctx = Context::get_static()?; - Server::check_for_passwordless_notification( + let res = Server::check_for_passwordless_notification( ctx, notification_id, download_auth_token, already_received_message_ids, ) .await - .and_then(api_result) - .map(|value| value.encode_to_vec()) + .and_then(api_result)?; + Ok(res + .messages + .into_iter() + .map(|msg| FrbPasswordlessNotificationMessage { + id: msg.id, + encrypted_message: msg.encrypted_message, + }) + .collect()) } + pub async fn report_user(user_id: i64, reason: String) -> Result<()> { let ctx = Context::get_static()?; Server::report_user(ctx, user_id, reason) diff --git a/rust/src/frb_generated.rs b/rust/src/frb_generated.rs index 8e111d7b..a838d50e 100644 --- a/rust/src/frb_generated.rs +++ b/rust/src/frb_generated.rs @@ -4553,6 +4553,83 @@ impl SseDecode for crate::bridge::wrapper::user_discovery::FlutterUserDiscovery } } +impl SseDecode for crate::bridge::api::FrbAdditionalAccount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_userId = ::sse_decode(deserializer); + let mut var_planId = ::sse_decode(deserializer); + return crate::bridge::api::FrbAdditionalAccount { + user_id: var_userId, + plan_id: var_planId, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbMemoriesUploadUrls { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_mediaId = ::sse_decode(deserializer); + let mut var_thumbnailUpload = + >::sse_decode(deserializer); + let mut var_fullUpload = + >::sse_decode(deserializer); + return crate::bridge::api::FrbMemoriesUploadUrls { + media_id: var_mediaId, + thumbnail_upload: var_thumbnailUpload, + full_upload: var_fullUpload, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbMemoriesUsage { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_currentBytes = ::sse_decode(deserializer); + let mut var_count = ::sse_decode(deserializer); + let mut var_maxBytes = ::sse_decode(deserializer); + return crate::bridge::api::FrbMemoriesUsage { + current_bytes: var_currentBytes, + count: var_count, + max_bytes: var_maxBytes, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbPasswordlessNotificationMessage { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_id = ::sse_decode(deserializer); + let mut var_encryptedMessage = >::sse_decode(deserializer); + return crate::bridge::api::FrbPasswordlessNotificationMessage { + id: var_id, + encrypted_message: var_encryptedMessage, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbPlanBalance { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_usedDailyMediaUploadLimit = ::sse_decode(deserializer); + let mut var_usedUploadMediaSizeLimit = ::sse_decode(deserializer); + let mut var_paymentPeriodDays = >::sse_decode(deserializer); + let mut var_lastPaymentDoneUnixTimestamp = >::sse_decode(deserializer); + let mut var_additionalAccounts = + >::sse_decode(deserializer); + let mut var_autoRenewal = >::sse_decode(deserializer); + let mut var_additionalAccountOwnerId = >::sse_decode(deserializer); + return crate::bridge::api::FrbPlanBalance { + used_daily_media_upload_limit: var_usedDailyMediaUploadLimit, + used_upload_media_size_limit: var_usedUploadMediaSizeLimit, + payment_period_days: var_paymentPeriodDays, + last_payment_done_unix_timestamp: var_lastPaymentDoneUnixTimestamp, + additional_accounts: var_additionalAccounts, + auto_renewal: var_autoRenewal, + additional_account_owner_id: var_additionalAccountOwnerId, + }; + } +} + impl SseDecode for crate::signal::engine::FrbPqcPreKey { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -4601,6 +4678,44 @@ impl SseDecode for crate::signal::engine::FrbPreKeyBundle { } } +impl SseDecode for crate::bridge::api::FrbPresignedPost { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_url = ::sse_decode(deserializer); + let mut var_fields = >::sse_decode(deserializer); + return crate::bridge::api::FrbPresignedPost { + url: var_url, + fields: var_fields, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbProofOfWork { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_prefix = ::sse_decode(deserializer); + let mut var_difficulty = ::sse_decode(deserializer); + return crate::bridge::api::FrbProofOfWork { + prefix: var_prefix, + difficulty: var_difficulty, + }; + } +} + +impl SseDecode for crate::bridge::api::FrbUserData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut var_userId = ::sse_decode(deserializer); + let mut var_username = >::sse_decode(deserializer); + let mut var_publicIdentityKey = >::sse_decode(deserializer); + return crate::bridge::api::FrbUserData { + user_id: var_userId, + username: var_username, + public_identity_key: var_publicIdentityKey, + }; + } +} + impl SseDecode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -4687,6 +4802,34 @@ impl SseDecode for Vec { } } +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = Vec::with_capacity(len_ as usize); + for idx_ in 0..len_ { + ans_.push(::sse_decode( + deserializer, + )); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = Vec::with_capacity(len_ as usize); + for idx_ in 0..len_ { + ans_.push( + ::sse_decode(deserializer), + ); + } + return ans_; + } +} + impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -4779,6 +4922,18 @@ impl SseDecode for Vec<(String, Vec)> { } } +impl SseDecode for Vec<(String, String)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = Vec::with_capacity(len_ as usize); + for idx_ in 0..len_ { + ans_.push(<(String, String)>::sse_decode(deserializer)); + } + return ans_; + } +} + impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -4873,6 +5028,19 @@ impl SseDecode for Option { } } +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -5606,6 +5774,126 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + [ + self.user_id.into_into_dart().into_dart(), + self.plan_id.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbAdditionalAccount +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbAdditionalAccount +{ + fn into_into_dart(self) -> crate::bridge::api::FrbAdditionalAccount { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbMemoriesUploadUrls { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.media_id.into_into_dart().into_dart(), + self.thumbnail_upload.into_into_dart().into_dart(), + self.full_upload.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbMemoriesUploadUrls +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbMemoriesUploadUrls +{ + fn into_into_dart(self) -> crate::bridge::api::FrbMemoriesUploadUrls { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbMemoriesUsage { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.current_bytes.into_into_dart().into_dart(), + self.count.into_into_dart().into_dart(), + self.max_bytes.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbMemoriesUsage +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbMemoriesUsage +{ + fn into_into_dart(self) -> crate::bridge::api::FrbMemoriesUsage { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbPasswordlessNotificationMessage { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.encrypted_message.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbPasswordlessNotificationMessage +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbPasswordlessNotificationMessage +{ + fn into_into_dart(self) -> crate::bridge::api::FrbPasswordlessNotificationMessage { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbPlanBalance { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.used_daily_media_upload_limit + .into_into_dart() + .into_dart(), + self.used_upload_media_size_limit + .into_into_dart() + .into_dart(), + self.payment_period_days.into_into_dart().into_dart(), + self.last_payment_done_unix_timestamp + .into_into_dart() + .into_dart(), + self.additional_accounts.into_into_dart().into_dart(), + self.auto_renewal.into_into_dart().into_dart(), + self.additional_account_owner_id + .into_into_dart() + .into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbPlanBalance +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbPlanBalance +{ + fn into_into_dart(self) -> crate::bridge::api::FrbPlanBalance { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::signal::engine::FrbPqcPreKey { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -5660,6 +5948,70 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbPresignedPost { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.url.into_into_dart().into_dart(), + self.fields.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbPresignedPost +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbPresignedPost +{ + fn into_into_dart(self) -> crate::bridge::api::FrbPresignedPost { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbProofOfWork { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.prefix.into_into_dart().into_dart(), + self.difficulty.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbProofOfWork +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbProofOfWork +{ + fn into_into_dart(self) -> crate::bridge::api::FrbProofOfWork { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::bridge::api::FrbUserData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.user_id.into_into_dart().into_dart(), + self.username.into_into_dart().into_dart(), + self.public_identity_key.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::bridge::api::FrbUserData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::bridge::api::FrbUserData +{ + fn into_into_dart(self) -> crate::bridge::api::FrbUserData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::bridge::InitConfig { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -6304,6 +6656,59 @@ impl SseEncode for crate::bridge::wrapper::user_discovery::FlutterUserDiscovery fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} } +impl SseEncode for crate::bridge::api::FrbAdditionalAccount { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.user_id, serializer); + ::sse_encode(self.plan_id, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbMemoriesUploadUrls { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.media_id, serializer); + >::sse_encode( + self.thumbnail_upload, + serializer, + ); + >::sse_encode(self.full_upload, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbMemoriesUsage { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.current_bytes, serializer); + ::sse_encode(self.count, serializer); + ::sse_encode(self.max_bytes, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbPasswordlessNotificationMessage { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + >::sse_encode(self.encrypted_message, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbPlanBalance { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.used_daily_media_upload_limit, serializer); + ::sse_encode(self.used_upload_media_size_limit, serializer); + >::sse_encode(self.payment_period_days, serializer); + >::sse_encode(self.last_payment_done_unix_timestamp, serializer); + >::sse_encode( + self.additional_accounts, + serializer, + ); + >::sse_encode(self.auto_renewal, serializer); + >::sse_encode(self.additional_account_owner_id, serializer); + } +} + impl SseEncode for crate::signal::engine::FrbPqcPreKey { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6332,6 +6737,31 @@ impl SseEncode for crate::signal::engine::FrbPreKeyBundle { } } +impl SseEncode for crate::bridge::api::FrbPresignedPost { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.url, serializer); + >::sse_encode(self.fields, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbProofOfWork { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.prefix, serializer); + ::sse_encode(self.difficulty, serializer); + } +} + +impl SseEncode for crate::bridge::api::FrbUserData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.user_id, serializer); + >::sse_encode(self.username, serializer); + >::sse_encode(self.public_identity_key, serializer); + } +} + impl SseEncode for i32 { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6411,6 +6841,26 @@ impl SseEncode for Vec { } } +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6483,6 +6933,16 @@ impl SseEncode for Vec<(String, Vec)> { } } +impl SseEncode for Vec<(String, String)> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + <(String, String)>::sse_encode(item, serializer); + } + } +} + impl SseEncode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -6563,6 +7023,16 @@ impl SseEncode for Option { } } +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { diff --git a/test/mocks/test_client.dart b/test/mocks/test_client.dart index 54aef2c6..69d6d16a 100644 --- a/test/mocks/test_client.dart +++ b/test/mocks/test_client.dart @@ -4,13 +4,13 @@ import 'dart:io'; import 'package:collection/collection.dart'; import 'package:drift/drift.dart' hide isNotNull, isNull; import 'package:fixnum/fixnum.dart'; +import 'package:flutter/foundation.dart'; import 'package:twonly/core/bridge/api.dart'; import 'package:twonly/src/database/tables/messages.table.dart'; import 'package:twonly/src/database/twonly.db.dart'; import 'package:twonly/src/model/protobuf/client/generated/messages.pb.dart' as pb; import 'package:twonly/src/services/api/api.service.dart'; -import 'package:twonly/src/services/api/rust_api_result.dart'; import 'package:twonly/src/services/user.service.dart'; import 'package:twonly/src/utils/log.dart'; import 'package:twonly/src/utils/pow.dart'; @@ -50,19 +50,18 @@ class TestClient { await run(() async { Log.info('Requesting POW...'); - final dynamic pow; + final FrbProofOfWork pow; try { - final raw = await RustApi.getProofOfWork(); - pow = decodeProofOfWork(raw); + pow = await RustApi.getProofOfWork(); } catch (e, st) { - print('POW EXCEPTION: $e\n$st'); + if (kDebugMode) { + print('POW EXCEPTION: $e\n$st'); + } rethrow; } Log.info('POW result: $pow'); - final prefix = pow.prefix; - final difficulty = pow.difficulty.toInt(); - final proof = await calculatePoW(prefix, difficulty); + final proof = await calculatePoW(pow.prefix, pow.difficulty); realUserId = await RustApi.register( username: username, diff --git a/test/services/passwordless_recovery_service_test.dart b/test/services/passwordless_recovery_service_test.dart index be13ba80..ffcf08cb 100644 --- a/test/services/passwordless_recovery_service_test.dart +++ b/test/services/passwordless_recovery_service_test.dart @@ -5,7 +5,6 @@ import 'package:drift/native.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:twonly/core/bridge.dart' as bridge; -import 'package:twonly/core/bridge/wrapper/signal.dart'; import 'package:twonly/core/frb_generated.dart'; import 'package:twonly/globals.dart'; import 'package:twonly/locator.dart'; @@ -99,15 +98,6 @@ void main() { } }); - Future setupSignalSession(int contactId) async { - final bundle = await RustSignal.generateBundle(); - await RustSignal.processPrekeyBundle( - name: contactId.toString(), - deviceId: 1, - bundle: bundle, - ); - } - group('PasswordlessRecoveryService - enablePasswordlessRecovery', () { test('works with SecondFactorType.none', () async { await twonlyDB.contactsDao.insertOnConflictUpdate(