update protobuf

pull/941/head
ryanzhao 1 year ago
parent e5f57a6e94
commit fa02b76d77

@ -588,12 +588,14 @@ extension SNProtoMessageRequestResponse.SNProtoMessageRequestResponseBuilder {
// MARK: - SNProtoContentExpirationType
@objc public enum SNProtoContentExpirationType: Int32 {
case legacy = 0
case deleteAfterRead = 1
case deleteAfterSend = 2
}
private class func SNProtoContentExpirationTypeWrap(_ value: SessionProtos_Content.ExpirationType) -> SNProtoContentExpirationType {
switch value {
case .legacy: return .legacy
case .deleteAfterRead: return .deleteAfterRead
case .deleteAfterSend: return .deleteAfterSend
}
@ -601,6 +603,7 @@ extension SNProtoMessageRequestResponse.SNProtoMessageRequestResponseBuilder {
private class func SNProtoContentExpirationTypeUnwrap(_ value: SNProtoContentExpirationType) -> SessionProtos_Content.ExpirationType {
switch value {
case .legacy: return .legacy
case .deleteAfterRead: return .deleteAfterRead
case .deleteAfterSend: return .deleteAfterSend
}

@ -358,7 +358,7 @@ struct SessionProtos_Content {
mutating func clearSharedConfigMessage() {_uniqueStorage()._sharedConfigMessage = nil}
var expirationType: SessionProtos_Content.ExpirationType {
get {return _storage._expirationType ?? .deleteAfterRead}
get {return _storage._expirationType ?? .legacy}
set {_uniqueStorage()._expirationType = newValue}
}
/// Returns true if `expirationType` has been explicitly set.
@ -388,15 +388,17 @@ struct SessionProtos_Content {
enum ExpirationType: SwiftProtobuf.Enum {
typealias RawValue = Int
case legacy // = 0
case deleteAfterRead // = 1
case deleteAfterSend // = 2
init() {
self = .deleteAfterRead
self = .legacy
}
init?(rawValue: Int) {
switch rawValue {
case 0: self = .legacy
case 1: self = .deleteAfterRead
case 2: self = .deleteAfterSend
default: return nil
@ -405,6 +407,7 @@ struct SessionProtos_Content {
var rawValue: Int {
switch self {
case .legacy: return 0
case .deleteAfterRead: return 1
case .deleteAfterSend: return 2
}
@ -1765,28 +1768,24 @@ extension SessionProtos_Envelope: SwiftProtobuf.Message, SwiftProtobuf._MessageI
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
try { if let v = self._source {
}
if let v = self._source {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._timestamp {
}
if let v = self._timestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 5)
} }()
try { if let v = self._sourceDevice {
}
if let v = self._sourceDevice {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 7)
} }()
try { if let v = self._content {
}
if let v = self._content {
try visitor.visitSingularBytesField(value: v, fieldNumber: 8)
} }()
try { if let v = self._serverTimestamp {
}
if let v = self._serverTimestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 10)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -1836,16 +1835,12 @@ extension SessionProtos_TypingMessage: SwiftProtobuf.Message, SwiftProtobuf._Mes
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._timestamp {
if let v = self._timestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._action {
}
if let v = self._action {
try visitor.visitSingularEnumField(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -1891,16 +1886,12 @@ extension SessionProtos_UnsendRequest: SwiftProtobuf.Message, SwiftProtobuf._Mes
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._timestamp {
if let v = self._timestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._author {
}
if let v = self._author {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -1940,19 +1931,15 @@ extension SessionProtos_MessageRequestResponse: SwiftProtobuf.Message, SwiftProt
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._isApproved {
if let v = self._isApproved {
try visitor.visitSingularBoolField(value: v, fieldNumber: 1)
} }()
try { if let v = self._profileKey {
}
if let v = self._profileKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
} }()
try { if let v = self._profile {
}
if let v = self._profile {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2066,46 +2053,42 @@ extension SessionProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = _storage._dataMessage {
if let v = _storage._dataMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
} }()
try { if let v = _storage._callMessage {
}
if let v = _storage._callMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
try { if let v = _storage._receiptMessage {
}
if let v = _storage._receiptMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
} }()
try { if let v = _storage._typingMessage {
}
if let v = _storage._typingMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 6)
} }()
try { if let v = _storage._configurationMessage {
}
if let v = _storage._configurationMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 7)
} }()
try { if let v = _storage._dataExtractionNotification {
}
if let v = _storage._dataExtractionNotification {
try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
} }()
try { if let v = _storage._unsendRequest {
}
if let v = _storage._unsendRequest {
try visitor.visitSingularMessageField(value: v, fieldNumber: 9)
} }()
try { if let v = _storage._messageRequestResponse {
}
if let v = _storage._messageRequestResponse {
try visitor.visitSingularMessageField(value: v, fieldNumber: 10)
} }()
try { if let v = _storage._sharedConfigMessage {
}
if let v = _storage._sharedConfigMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
} }()
try { if let v = _storage._expirationType {
}
if let v = _storage._expirationType {
try visitor.visitSingularEnumField(value: v, fieldNumber: 12)
} }()
try { if let v = _storage._expirationTimer {
}
if let v = _storage._expirationTimer {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 13)
} }()
try { if let v = _storage._lastDisappearingMessageChangeTimestamp {
}
if let v = _storage._lastDisappearingMessageChangeTimestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 14)
} }()
}
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2138,6 +2121,7 @@ extension SessionProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
extension SessionProtos_Content.ExpirationType: SwiftProtobuf._ProtoNameProviding {
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
0: .same(proto: "LEGACY"),
1: .same(proto: "DELETE_AFTER_READ"),
2: .same(proto: "DELETE_AFTER_SEND"),
]
@ -2176,13 +2160,9 @@ extension SessionProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf._Messa
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
}
if !self.sdps.isEmpty {
try visitor.visitRepeatedStringField(value: self.sdps, fieldNumber: 2)
}
@ -2192,9 +2172,9 @@ extension SessionProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf._Messa
if !self.sdpMids.isEmpty {
try visitor.visitRepeatedStringField(value: self.sdpMids, fieldNumber: 4)
}
try { if let v = self._uuid {
if let v = self._uuid {
try visitor.visitSingularStringField(value: v, fieldNumber: 5)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2247,16 +2227,12 @@ extension SessionProtos_KeyPair: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._publicKey {
if let v = self._publicKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
} }()
try { if let v = self._privateKey {
}
if let v = self._privateKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2294,16 +2270,12 @@ extension SessionProtos_DataExtractionNotification: SwiftProtobuf.Message, Swift
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
try { if let v = self._timestamp {
}
if let v = self._timestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2343,16 +2315,12 @@ extension SessionProtos_LokiProfile: SwiftProtobuf.Message, SwiftProtobuf._Messa
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._displayName {
if let v = self._displayName {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._profilePicture {
}
if let v = self._profilePicture {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2466,49 +2434,45 @@ extension SessionProtos_DataMessage: SwiftProtobuf.Message, SwiftProtobuf._Messa
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
try withExtendedLifetime(_storage) { (_storage: _StorageClass) in
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = _storage._body {
if let v = _storage._body {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
}
if !_storage._attachments.isEmpty {
try visitor.visitRepeatedMessageField(value: _storage._attachments, fieldNumber: 2)
}
try { if let v = _storage._flags {
if let v = _storage._flags {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
} }()
try { if let v = _storage._expireTimer {
}
if let v = _storage._expireTimer {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 5)
} }()
try { if let v = _storage._profileKey {
}
if let v = _storage._profileKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
} }()
try { if let v = _storage._timestamp {
}
if let v = _storage._timestamp {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 7)
} }()
try { if let v = _storage._quote {
}
if let v = _storage._quote {
try visitor.visitSingularMessageField(value: v, fieldNumber: 8)
} }()
}
if !_storage._preview.isEmpty {
try visitor.visitRepeatedMessageField(value: _storage._preview, fieldNumber: 10)
}
try { if let v = _storage._reaction {
if let v = _storage._reaction {
try visitor.visitSingularMessageField(value: v, fieldNumber: 11)
} }()
try { if let v = _storage._profile {
}
if let v = _storage._profile {
try visitor.visitSingularMessageField(value: v, fieldNumber: 101)
} }()
try { if let v = _storage._openGroupInvitation {
}
if let v = _storage._openGroupInvitation {
try visitor.visitSingularMessageField(value: v, fieldNumber: 102)
} }()
try { if let v = _storage._closedGroupControlMessage {
}
if let v = _storage._closedGroupControlMessage {
try visitor.visitSingularMessageField(value: v, fieldNumber: 104)
} }()
try { if let v = _storage._syncTarget {
}
if let v = _storage._syncTarget {
try visitor.visitSingularStringField(value: v, fieldNumber: 105)
} }()
}
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2578,19 +2542,15 @@ extension SessionProtos_DataMessage.Quote: SwiftProtobuf.Message, SwiftProtobuf.
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._id {
if let v = self._id {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._author {
}
if let v = self._author {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._text {
}
if let v = self._text {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
}
if !self.attachments.isEmpty {
try visitor.visitRepeatedMessageField(value: self.attachments, fieldNumber: 4)
}
@ -2637,22 +2597,18 @@ extension SessionProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf.Messag
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._contentType {
if let v = self._contentType {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._fileName {
}
if let v = self._fileName {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._thumbnail {
}
if let v = self._thumbnail {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
try { if let v = self._flags {
}
if let v = self._flags {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2701,19 +2657,15 @@ extension SessionProtos_DataMessage.Preview: SwiftProtobuf.Message, SwiftProtobu
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._url {
if let v = self._url {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._title {
}
if let v = self._title {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._image {
}
if let v = self._image {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2758,22 +2710,18 @@ extension SessionProtos_DataMessage.Reaction: SwiftProtobuf.Message, SwiftProtob
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._id {
if let v = self._id {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._author {
}
if let v = self._author {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._emoji {
}
if let v = self._emoji {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = self._action {
}
if let v = self._action {
try visitor.visitSingularEnumField(value: v, fieldNumber: 4)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2821,16 +2769,12 @@ extension SessionProtos_DataMessage.OpenGroupInvitation: SwiftProtobuf.Message,
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._url {
if let v = self._url {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._name {
}
if let v = self._name {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2882,22 +2826,18 @@ extension SessionProtos_DataMessage.ClosedGroupControlMessage: SwiftProtobuf.Mes
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
try { if let v = self._publicKey {
}
if let v = self._publicKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
} }()
try { if let v = self._name {
}
if let v = self._name {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = self._encryptionKeyPair {
}
if let v = self._encryptionKeyPair {
try visitor.visitSingularMessageField(value: v, fieldNumber: 4)
} }()
}
if !self.members.isEmpty {
try visitor.visitRepeatedBytesField(value: self.members, fieldNumber: 5)
}
@ -2907,9 +2847,9 @@ extension SessionProtos_DataMessage.ClosedGroupControlMessage: SwiftProtobuf.Mes
if !self.wrappers.isEmpty {
try visitor.visitRepeatedMessageField(value: self.wrappers, fieldNumber: 7)
}
try { if let v = self._expirationTimer {
if let v = self._expirationTimer {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -2966,16 +2906,12 @@ extension SessionProtos_DataMessage.ClosedGroupControlMessage.KeyPairWrapper: Sw
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._publicKey {
if let v = self._publicKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
} }()
try { if let v = self._encryptedKeyPair {
}
if let v = self._encryptedKeyPair {
try visitor.visitSingularBytesField(value: v, fieldNumber: 2)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -3022,25 +2958,21 @@ extension SessionProtos_ConfigurationMessage: SwiftProtobuf.Message, SwiftProtob
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if !self.closedGroups.isEmpty {
try visitor.visitRepeatedMessageField(value: self.closedGroups, fieldNumber: 1)
}
if !self.openGroups.isEmpty {
try visitor.visitRepeatedStringField(value: self.openGroups, fieldNumber: 2)
}
try { if let v = self._displayName {
if let v = self._displayName {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = self._profilePicture {
}
if let v = self._profilePicture {
try visitor.visitSingularStringField(value: v, fieldNumber: 4)
} }()
try { if let v = self._profileKey {
}
if let v = self._profileKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
} }()
}
if !self.contacts.isEmpty {
try visitor.visitRepeatedMessageField(value: self.contacts, fieldNumber: 6)
}
@ -3093,28 +3025,24 @@ extension SessionProtos_ConfigurationMessage.ClosedGroup: SwiftProtobuf.Message,
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._publicKey {
if let v = self._publicKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
} }()
try { if let v = self._name {
}
if let v = self._name {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._encryptionKeyPair {
}
if let v = self._encryptionKeyPair {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
}
if !self.members.isEmpty {
try visitor.visitRepeatedBytesField(value: self.members, fieldNumber: 4)
}
if !self.admins.isEmpty {
try visitor.visitRepeatedBytesField(value: self.admins, fieldNumber: 5)
}
try { if let v = self._expirationTimer {
if let v = self._expirationTimer {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 6)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -3167,31 +3095,27 @@ extension SessionProtos_ConfigurationMessage.Contact: SwiftProtobuf.Message, Swi
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._publicKey {
if let v = self._publicKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 1)
} }()
try { if let v = self._name {
}
if let v = self._name {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._profilePicture {
}
if let v = self._profilePicture {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = self._profileKey {
}
if let v = self._profileKey {
try visitor.visitSingularBytesField(value: v, fieldNumber: 4)
} }()
try { if let v = self._isApproved {
}
if let v = self._isApproved {
try visitor.visitSingularBoolField(value: v, fieldNumber: 5)
} }()
try { if let v = self._isBlocked {
}
if let v = self._isBlocked {
try visitor.visitSingularBoolField(value: v, fieldNumber: 6)
} }()
try { if let v = self._didApproveMe {
}
if let v = self._didApproveMe {
try visitor.visitSingularBoolField(value: v, fieldNumber: 7)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -3234,13 +3158,9 @@ extension SessionProtos_ReceiptMessage: SwiftProtobuf.Message, SwiftProtobuf._Me
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
}
if !self.timestamp.isEmpty {
try visitor.visitRepeatedUInt64Field(value: self.timestamp, fieldNumber: 2)
}
@ -3308,46 +3228,42 @@ extension SessionProtos_AttachmentPointer: SwiftProtobuf.Message, SwiftProtobuf.
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._id {
if let v = self._id {
try visitor.visitSingularFixed64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._contentType {
}
if let v = self._contentType {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._key {
}
if let v = self._key {
try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
} }()
try { if let v = self._size {
}
if let v = self._size {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 4)
} }()
try { if let v = self._thumbnail {
}
if let v = self._thumbnail {
try visitor.visitSingularBytesField(value: v, fieldNumber: 5)
} }()
try { if let v = self._digest {
}
if let v = self._digest {
try visitor.visitSingularBytesField(value: v, fieldNumber: 6)
} }()
try { if let v = self._fileName {
}
if let v = self._fileName {
try visitor.visitSingularStringField(value: v, fieldNumber: 7)
} }()
try { if let v = self._flags {
}
if let v = self._flags {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 8)
} }()
try { if let v = self._width {
}
if let v = self._width {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 9)
} }()
try { if let v = self._height {
}
if let v = self._height {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 10)
} }()
try { if let v = self._caption {
}
if let v = self._caption {
try visitor.visitSingularStringField(value: v, fieldNumber: 11)
} }()
try { if let v = self._url {
}
if let v = self._url {
try visitor.visitSingularStringField(value: v, fieldNumber: 101)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}
@ -3405,19 +3321,15 @@ extension SessionProtos_SharedConfigMessage: SwiftProtobuf.Message, SwiftProtobu
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._kind {
if let v = self._kind {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
try { if let v = self._seqno {
}
if let v = self._seqno {
try visitor.visitSingularInt64Field(value: v, fieldNumber: 2)
} }()
try { if let v = self._data {
}
if let v = self._data {
try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}

@ -249,22 +249,18 @@ extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftP
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._verb {
if let v = self._verb {
try visitor.visitSingularStringField(value: v, fieldNumber: 1)
} }()
try { if let v = self._path {
}
if let v = self._path {
try visitor.visitSingularStringField(value: v, fieldNumber: 2)
} }()
try { if let v = self._body {
}
if let v = self._body {
try visitor.visitSingularBytesField(value: v, fieldNumber: 3)
} }()
try { if let v = self._requestID {
}
if let v = self._requestID {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4)
} }()
}
if !self.headers.isEmpty {
try visitor.visitRepeatedStringField(value: self.headers, fieldNumber: 5)
}
@ -309,22 +305,18 @@ extension WebSocketProtos_WebSocketResponseMessage: SwiftProtobuf.Message, Swift
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._requestID {
if let v = self._requestID {
try visitor.visitSingularUInt64Field(value: v, fieldNumber: 1)
} }()
try { if let v = self._status {
}
if let v = self._status {
try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
} }()
try { if let v = self._message {
}
if let v = self._message {
try visitor.visitSingularStringField(value: v, fieldNumber: 3)
} }()
try { if let v = self._body {
}
if let v = self._body {
try visitor.visitSingularBytesField(value: v, fieldNumber: 4)
} }()
}
if !self.headers.isEmpty {
try visitor.visitRepeatedStringField(value: self.headers, fieldNumber: 5)
}
@ -365,19 +357,15 @@ extension WebSocketProtos_WebSocketMessage: SwiftProtobuf.Message, SwiftProtobuf
}
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
try { if let v = self._type {
if let v = self._type {
try visitor.visitSingularEnumField(value: v, fieldNumber: 1)
} }()
try { if let v = self._request {
}
if let v = self._request {
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
} }()
try { if let v = self._response {
}
if let v = self._response {
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
} }()
}
try unknownFields.traverse(visitor: &visitor)
}

@ -51,6 +51,7 @@ message MessageRequestResponse {
message Content {
enum ExpirationType {
LEGACY = 0;
DELETE_AFTER_READ = 1;
DELETE_AFTER_SEND = 2;
}

Loading…
Cancel
Save