-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create backup protobuf models
- Loading branch information
1 parent
08c0cff
commit cc93964
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2021 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
syntax = "proto2"; | ||
|
||
option java_package = "com.wire.kalium.protobuf.backup"; | ||
|
||
message BackupData { | ||
required BackupInfo info = 1; | ||
repeated ExportedConversation conversations = 2; | ||
repeated ExportedMessage messages = 3; | ||
repeated ExportUser users = 4; | ||
} | ||
|
||
message BackupInfo { | ||
required string platform = 1; | ||
required string version = 2; | ||
required ExportedQualifiedId userId = 3; | ||
required int64 creation_time = 4; | ||
required string clientId = 5; | ||
} | ||
|
||
message ExportUser { | ||
required ExportedQualifiedId id = 1; | ||
required string name = 2; | ||
required string handle = 3; | ||
} | ||
|
||
message ExportedQualifiedId { | ||
required string value = 1; | ||
required string domain = 2; | ||
} | ||
|
||
message ExportedConversation { | ||
required ExportedQualifiedId id = 1; | ||
required string name = 2; | ||
} | ||
|
||
message ExportedMessage { | ||
required string id = 1; | ||
required int64 time_iso = 2; | ||
required ExportedQualifiedId sender_user_id = 3; | ||
required string sender_client_id = 4; | ||
required ExportedQualifiedId conversation_id = 5; | ||
oneof content { | ||
ExportedText text = 6; | ||
} | ||
} | ||
|
||
message ExportedText { | ||
required string content = 1; | ||
} |