Signal-iOS/SignalServiceKit/protobuf/Backups
2024-04-01 15:04:24 -07:00
..
Backup.proto Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoAccountData.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoBackupInfo.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoBodyRange.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoCall.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoCallChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoChat.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoChatItem.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoChatUpdateMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoContact.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoContactAttachment.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoContactMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoDistributionList.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoDocumentMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoExpirationTimerChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoFilePointer.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoFrame.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGenericGroupUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroup.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupAdminStatusUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupAnnouncementOnlyChangeUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupAttributesAccessLevelChangeUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupAvatarUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupCallChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupChangeChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupCreationUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupDescriptionChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupDescriptionUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupExpirationTimerUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInvitationAcceptedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInvitationDeclinedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInvitationRevokedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInviteLinkAdminApprovalUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInviteLinkDisabledUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInviteLinkEnabledUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupInviteLinkResetUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupJoinRequestApprovalUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupJoinRequestCanceledUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupJoinRequestUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMemberAddedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMemberJoinedByLinkUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMemberJoinedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMemberLeftUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMemberRemovedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupMembershipAccessLevelChangeUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupNameUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupSelfInvitationRevokedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupSequenceOfRequestsAndCancelsUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupUnknownInviteeUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupV2AccessLevel.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupV2MigrationDroppedMembersUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupV2MigrationInvitedMembersUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupV2MigrationSelfInvitedUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoGroupV2MigrationUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoIdentity.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoIndividualCallChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoLinkPreview.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoProfileChangeChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoQuote.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoReaction.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoRecipient.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoReleaseNotes.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoRemoteDeletedMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSelfInvitedOtherUserToGroupUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSelfInvitedToGroupUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSelfRecipient.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSendStatus.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSessionSwitchoverChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSimpleChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoStandardMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoSticker.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoStickerMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoStickerPack.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoStickerPackSticker.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoText.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoThreadMergeChatUpdate.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
BackupProtoVoiceMessage.swift Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00
README.md Generate models for Backup.proto using Wire 2024-04-01 15:04:24 -07:00

Backup Proto

The Backup protos are generated using Wire, in contrast with the rest of the Signal-iOS protos which use (at the time of writing) a combination of Swift-Protobuf and bespoke code-generation in ProtoWrappers.py.

Using Wire for Backups obviates the need for updates to ProtoWrappers.py, and the models generated by Wire are easier to work with than those generated by ProtoWrappers.py.

Additionally, the Wire-generated models expose optional protobuf fields as Optional values in Swift. This is in contrast to Swift-Protobuf, which exposes those fields as non-Optional (with a default value returned if none is present) with hasField properties allowing the caller to inspect if a value was explicitly set. While the Swift-Protobuf approach is arguably closer to the raw behavior of protobufs, the Wire approach more directly supports the type-safe calling patterns we want to use in code.

How to generate models

See compile-backups-proto-with-wire. That script reads the Backup.proto file in this directory, downloads the Wire (if necessary), and runs it to generate models to the right place.

Special considerations when using Wire

Wire does not support adding a prefix to type names for namespacing purposes. To that end, ensure the names of message, enum, etc. types in Backup.proto (or other protos down the line) are namespaced within the proto itself; for example, prefer message BackupProtoAccountData to message AccountData.