diff --git a/SignalServiceKit/protobuf/SignalService.proto b/SignalServiceKit/protobuf/SignalService.proto index 0f61e32dd..5bf84c644 100644 --- a/SignalServiceKit/protobuf/SignalService.proto +++ b/SignalServiceKit/protobuf/SignalService.proto @@ -234,10 +234,15 @@ message Verified { message SyncMessage { message Sent { - optional string destination = 1; - optional uint64 timestamp = 2; - optional DataMessage message = 3; - optional uint64 expirationStartTimestamp = 4; + message UnidentifiedDeliveryStatus { + optional string destination = 1; + optional bool unidentified = 2; + } + optional string destination = 1; + optional uint64 timestamp = 2; + optional DataMessage message = 3; + optional uint64 expirationStartTimestamp = 4; + repeated UnidentifiedDeliveryStatus unidentifiedStatus = 5; } message Contacts { diff --git a/SignalServiceKit/src/Devices/OWSRecordTranscriptJob.m b/SignalServiceKit/src/Devices/OWSRecordTranscriptJob.m index 58ac8127d..a376dce94 100644 --- a/SignalServiceKit/src/Devices/OWSRecordTranscriptJob.m +++ b/SignalServiceKit/src/Devices/OWSRecordTranscriptJob.m @@ -146,7 +146,9 @@ NS_ASSUME_NONNULL_BEGIN } [outgoingMessage saveWithTransaction:transaction]; - [outgoingMessage updateWithWasSentFromLinkedDeviceWithTransaction:transaction]; + [outgoingMessage updateWithWasSentFromLinkedDeviceWithUDRecipientIds:transcript.udRecipientIds + nonUdRecipientIds:transcript.nonUdRecipientIds + transaction:transaction]; [[OWSDisappearingMessagesJob sharedJob] becomeConsistentWithConfigurationForMessage:outgoingMessage contactsManager:self.contactsManager transaction:transaction]; diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.h b/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.h index 4a7ad6175..1d5573807 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.h +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.h @@ -36,6 +36,11 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly, nullable) TSQuotedMessage *quotedMessage; @property (nonatomic, readonly, nullable) OWSContact *contact; +// If either nonUdRecipientIds or udRecipientIds is nil, +// this is either a legacy transcript or it reflects a legacy sync message. +@property (nonatomic, readonly, nullable) NSArray *nonUdRecipientIds; +@property (nonatomic, readonly, nullable) NSArray *udRecipientIds; + @end NS_ASSUME_NONNULL_END diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.m index b129fad3a..87084e78b 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSIncomingSentMessageTranscript.m @@ -46,6 +46,29 @@ NS_ASSUME_NONNULL_BEGIN _quotedMessage = [TSQuotedMessage quotedMessageForDataMessage:_dataMessage thread:_thread transaction:transaction]; _contact = [OWSContacts contactForDataMessage:_dataMessage transaction:transaction]; + if (sentProto.unidentifiedStatus.count > 0) { + NSMutableArray *nonUdRecipientIds = [NSMutableArray new]; + NSMutableArray *udRecipientIds = [NSMutableArray new]; + for (SSKProtoSyncMessageSentUnidentifiedDeliveryStatus *statusProto in sentProto.unidentifiedStatus) { + if (!statusProto.hasDestination || statusProto.destination.length < 1) { + OWSFailDebug(@"Delivery status proto is missing destination."); + continue; + } + if (!statusProto.hasUnidentified) { + OWSFailDebug(@"Delivery status proto is missing value."); + continue; + } + NSString *recipientId = statusProto.destination; + if (statusProto.unidentified) { + [udRecipientIds addObject:recipientId]; + } else { + [nonUdRecipientIds addObject:recipientId]; + } + } + _nonUdRecipientIds = [nonUdRecipientIds copy]; + _udRecipientIds = [udRecipientIds copy]; + } + return self; } diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m index a8048382d..c3dfee8f5 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m @@ -67,6 +67,31 @@ NS_ASSUME_NONNULL_BEGIN [sentBuilder setMessage:dataMessage]; [sentBuilder setExpirationStartTimestamp:self.message.timestamp]; + for (NSString *recipientId in self.message.recipientIds) { + TSOutgoingMessageRecipientState *_Nullable recipientState = + [self.message recipientStateForRecipientId:recipientId]; + if (!recipientState) { + OWSFailDebug(@"missing recipient state for: %@", recipientId); + continue; + } + if (recipientState.state != OWSOutgoingMessageRecipientStateSent) { + continue; + } + + NSError *error; + SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder *statusBuilder = + [SSKProtoSyncMessageSentUnidentifiedDeliveryStatus builder]; + [statusBuilder setDestination:recipientId]; + [statusBuilder setUnidentified:recipientState.wasSentByUD]; + SSKProtoSyncMessageSentUnidentifiedDeliveryStatus *_Nullable status = + [statusBuilder buildAndReturnError:&error]; + if (error || !status) { + OWSFailDebug(@"Couldn't build UD status proto: %@", error); + continue; + } + [sentBuilder addUnidentifiedStatus:status]; + } + NSError *error; SSKProtoSyncMessageSent *_Nullable sentProto = [sentBuilder buildAndReturnError:&error]; if (error || !sentProto) { diff --git a/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.h b/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.h index 43de963d3..7c73bf122 100644 --- a/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.h +++ b/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.h @@ -206,7 +206,9 @@ typedef NS_ENUM(NSInteger, TSGroupMetaMessage) { deliveryTimestamp:(NSNumber *_Nullable)deliveryTimestamp transaction:(YapDatabaseReadWriteTransaction *)transaction; -- (void)updateWithWasSentFromLinkedDeviceWithTransaction:(YapDatabaseReadWriteTransaction *)transaction; +- (void)updateWithWasSentFromLinkedDeviceWithUDRecipientIds:(nullable NSArray *)udRecipientIds + nonUdRecipientIds:(nullable NSArray *)nonUdRecipientIds + transaction:(YapDatabaseReadWriteTransaction *)transaction; // This method is used to rewrite the recipient list with a single recipient. // It is used to reply to a "group info request", which should only be diff --git a/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.m b/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.m index 8a992cba5..8bd41456e 100644 --- a/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.m +++ b/SignalServiceKit/src/Messages/Interactions/TSOutgoingMessage.m @@ -725,21 +725,57 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt }]; } -- (void)updateWithWasSentFromLinkedDeviceWithTransaction:(YapDatabaseReadWriteTransaction *)transaction -{ +- (void)updateWithWasSentFromLinkedDeviceWithUDRecipientIds:(nullable NSArray *)udRecipientIds + nonUdRecipientIds:(nullable NSArray *)nonUdRecipientIds + transaction:(YapDatabaseReadWriteTransaction *)transaction { OWSAssertDebug(transaction); - [self applyChangeToSelfAndLatestCopy:transaction - changeBlock:^(TSOutgoingMessage *message) { - // Mark any "sending" recipients as "sent." - for (TSOutgoingMessageRecipientState *recipientState in message.recipientStateMap - .allValues) { - if (recipientState.state == OWSOutgoingMessageRecipientStateSending) { - recipientState.state = OWSOutgoingMessageRecipientStateSent; - } - } - [message setIsFromLinkedDevice:YES]; - }]; + [self + applyChangeToSelfAndLatestCopy:transaction + changeBlock:^(TSOutgoingMessage *message) { + if (udRecipientIds.count > 0 || nonUdRecipientIds.count > 0) { + // If we have specific recipient info from the transcript, + // build a new recipient state map. + NSMutableDictionary *recipientStateMap + = [NSMutableDictionary new]; + for (NSString *recipientId in udRecipientIds) { + if (recipientStateMap[recipientId]) { + OWSFailDebug( + @"recipient appears more than once in recipient lists: %@", recipientId); + continue; + } + TSOutgoingMessageRecipientState *recipientState = + [TSOutgoingMessageRecipientState new]; + recipientState.state = OWSOutgoingMessageRecipientStateSent; + recipientState.wasSentByUD = YES; + recipientStateMap[recipientId] = recipientState; + } + for (NSString *recipientId in nonUdRecipientIds) { + if (recipientStateMap[recipientId]) { + OWSFailDebug( + @"recipient appears more than once in recipient lists: %@", recipientId); + continue; + } + TSOutgoingMessageRecipientState *recipientState = + [TSOutgoingMessageRecipientState new]; + recipientState.state = OWSOutgoingMessageRecipientStateSent; + recipientState.wasSentByUD = NO; + recipientStateMap[recipientId] = recipientState; + } + [message setRecipientStateMap:recipientStateMap]; + } else { + // Otherwise assume this is a legacy message before UD was introduced, and mark + // any "sending" recipient as "sent". Note that this will apply to non-legacy + // messages with no recipients. + for (TSOutgoingMessageRecipientState *recipientState in message.recipientStateMap + .allValues) { + if (recipientState.state == OWSOutgoingMessageRecipientStateSending) { + recipientState.state = OWSOutgoingMessageRecipientStateSent; + } + } + } + [message setIsFromLinkedDevice:YES]; + }]; } - (void)updateWithSendingToSingleGroupRecipient:(NSString *)singleGroupRecipient @@ -799,6 +835,7 @@ NSString *NSStringForOutgoingMessageRecipientState(OWSOutgoingMessageRecipientSt } }]; } + #pragma mark - - (nullable SSKProtoDataMessageBuilder *)dataMessageBuilder diff --git a/SignalServiceKit/src/Protos/Generated/Fingerprint.pb.swift b/SignalServiceKit/src/Protos/Generated/Fingerprint.pb.swift index 96304b197..84531f375 100644 --- a/SignalServiceKit/src/Protos/Generated/Fingerprint.pb.swift +++ b/SignalServiceKit/src/Protos/Generated/Fingerprint.pb.swift @@ -57,7 +57,7 @@ struct FingerprintProtos_LogicalFingerprints { /// Returns true if `version` has been explicitly set. var hasVersion: Bool {return _storage._version != nil} /// Clears the value of `version`. Subsequent reads from it will return its default value. - mutating func clearVersion() {_storage._version = nil} + mutating func clearVersion() {_uniqueStorage()._version = nil} /// @required var localFingerprint: FingerprintProtos_LogicalFingerprint { @@ -67,7 +67,7 @@ struct FingerprintProtos_LogicalFingerprints { /// Returns true if `localFingerprint` has been explicitly set. var hasLocalFingerprint: Bool {return _storage._localFingerprint != nil} /// Clears the value of `localFingerprint`. Subsequent reads from it will return its default value. - mutating func clearLocalFingerprint() {_storage._localFingerprint = nil} + mutating func clearLocalFingerprint() {_uniqueStorage()._localFingerprint = nil} /// @required var remoteFingerprint: FingerprintProtos_LogicalFingerprint { @@ -77,7 +77,7 @@ struct FingerprintProtos_LogicalFingerprints { /// Returns true if `remoteFingerprint` has been explicitly set. var hasRemoteFingerprint: Bool {return _storage._remoteFingerprint != nil} /// Clears the value of `remoteFingerprint`. Subsequent reads from it will return its default value. - mutating func clearRemoteFingerprint() {_storage._remoteFingerprint = nil} + mutating func clearRemoteFingerprint() {_uniqueStorage()._remoteFingerprint = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -112,9 +112,9 @@ extension FingerprintProtos_LogicalFingerprint: SwiftProtobuf.Message, SwiftProt try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: FingerprintProtos_LogicalFingerprint) -> Bool { - if self._identityData != other._identityData {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: FingerprintProtos_LogicalFingerprint, rhs: FingerprintProtos_LogicalFingerprint) -> Bool { + if lhs._identityData != rhs._identityData {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -179,19 +179,19 @@ extension FingerprintProtos_LogicalFingerprints: SwiftProtobuf.Message, SwiftPro try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: FingerprintProtos_LogicalFingerprints) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: FingerprintProtos_LogicalFingerprints, rhs: FingerprintProtos_LogicalFingerprints) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._version != other_storage._version {return false} - if _storage._localFingerprint != other_storage._localFingerprint {return false} - if _storage._remoteFingerprint != other_storage._remoteFingerprint {return false} + let rhs_storage = _args.1 + if _storage._version != rhs_storage._version {return false} + if _storage._localFingerprint != rhs_storage._localFingerprint {return false} + if _storage._remoteFingerprint != rhs_storage._remoteFingerprint {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } diff --git a/SignalServiceKit/src/Protos/Generated/Provisioning.pb.swift b/SignalServiceKit/src/Protos/Generated/Provisioning.pb.swift index 446b178e8..11137a0b8 100644 --- a/SignalServiceKit/src/Protos/Generated/Provisioning.pb.swift +++ b/SignalServiceKit/src/Protos/Generated/Provisioning.pb.swift @@ -179,10 +179,10 @@ extension ProvisioningProtos_ProvisionEnvelope: SwiftProtobuf.Message, SwiftProt try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: ProvisioningProtos_ProvisionEnvelope) -> Bool { - if self._publicKey != other._publicKey {return false} - if self._body != other._body {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: ProvisioningProtos_ProvisionEnvelope, rhs: ProvisioningProtos_ProvisionEnvelope) -> Bool { + if lhs._publicKey != rhs._publicKey {return false} + if lhs._body != rhs._body {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -239,15 +239,15 @@ extension ProvisioningProtos_ProvisionMessage: SwiftProtobuf.Message, SwiftProto try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: ProvisioningProtos_ProvisionMessage) -> Bool { - if self._identityKeyPublic != other._identityKeyPublic {return false} - if self._identityKeyPrivate != other._identityKeyPrivate {return false} - if self._number != other._number {return false} - if self._provisioningCode != other._provisioningCode {return false} - if self._userAgent != other._userAgent {return false} - if self._profileKey != other._profileKey {return false} - if self._readReceipts != other._readReceipts {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: ProvisioningProtos_ProvisionMessage, rhs: ProvisioningProtos_ProvisionMessage) -> Bool { + if lhs._identityKeyPublic != rhs._identityKeyPublic {return false} + if lhs._identityKeyPrivate != rhs._identityKeyPrivate {return false} + if lhs._number != rhs._number {return false} + if lhs._provisioningCode != rhs._provisioningCode {return false} + if lhs._userAgent != rhs._userAgent {return false} + if lhs._profileKey != rhs._profileKey {return false} + if lhs._readReceipts != rhs._readReceipts {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } diff --git a/SignalServiceKit/src/Protos/Generated/SSKProto.swift b/SignalServiceKit/src/Protos/Generated/SSKProto.swift index 631220789..48c6de11d 100644 --- a/SignalServiceKit/src/Protos/Generated/SSKProto.swift +++ b/SignalServiceKit/src/Protos/Generated/SSKProto.swift @@ -3151,6 +3151,114 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { #endif +// MARK: - SSKProtoSyncMessageSentUnidentifiedDeliveryStatus + +@objc public class SSKProtoSyncMessageSentUnidentifiedDeliveryStatus: NSObject { + + // MARK: - SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder + + @objc public class func builder() -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder { + return SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder() + } + + // asBuilder() constructs a builder that reflects the proto's contents. + @objc public func asBuilder() -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder { + let builder = SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder() + if let _value = destination { + builder.setDestination(_value) + } + if hasUnidentified { + builder.setUnidentified(unidentified) + } + return builder + } + + @objc public class SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder: NSObject { + + private var proto = SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus() + + @objc fileprivate override init() {} + + @objc public func setDestination(_ valueParam: String) { + proto.destination = valueParam + } + + @objc public func setUnidentified(_ valueParam: Bool) { + proto.unidentified = valueParam + } + + @objc public func build() throws -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatus { + return try SSKProtoSyncMessageSentUnidentifiedDeliveryStatus.parseProto(proto) + } + + @objc public func buildSerializedData() throws -> Data { + return try SSKProtoSyncMessageSentUnidentifiedDeliveryStatus.parseProto(proto).serializedData() + } + } + + fileprivate let proto: SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus + + @objc public var destination: String? { + guard proto.hasDestination else { + return nil + } + return proto.destination + } + @objc public var hasDestination: Bool { + return proto.hasDestination + } + + @objc public var unidentified: Bool { + return proto.unidentified + } + @objc public var hasUnidentified: Bool { + return proto.hasUnidentified + } + + private init(proto: SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus) { + self.proto = proto + } + + @objc + public func serializedData() throws -> Data { + return try self.proto.serializedData() + } + + @objc public class func parseData(_ serializedData: Data) throws -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatus { + let proto = try SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus(serializedData: serializedData) + return try parseProto(proto) + } + + fileprivate class func parseProto(_ proto: SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus) throws -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatus { + // MARK: - Begin Validation Logic for SSKProtoSyncMessageSentUnidentifiedDeliveryStatus - + + // MARK: - End Validation Logic for SSKProtoSyncMessageSentUnidentifiedDeliveryStatus - + + let result = SSKProtoSyncMessageSentUnidentifiedDeliveryStatus(proto: proto) + return result + } + + @objc public override var debugDescription: String { + return "\(proto)" + } +} + +#if DEBUG + +extension SSKProtoSyncMessageSentUnidentifiedDeliveryStatus { + @objc public func serializedDataIgnoringErrors() -> Data? { + return try! self.serializedData() + } +} + +extension SSKProtoSyncMessageSentUnidentifiedDeliveryStatus.SSKProtoSyncMessageSentUnidentifiedDeliveryStatusBuilder { + @objc public func buildIgnoringErrors() -> SSKProtoSyncMessageSentUnidentifiedDeliveryStatus? { + return try! self.build() + } +} + +#endif + // MARK: - SSKProtoSyncMessageSent @objc public class SSKProtoSyncMessageSent: NSObject { @@ -3176,6 +3284,7 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { if hasExpirationStartTimestamp { builder.setExpirationStartTimestamp(expirationStartTimestamp) } + builder.setUnidentifiedStatus(unidentifiedStatus) return builder } @@ -3201,6 +3310,16 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { proto.expirationStartTimestamp = valueParam } + @objc public func addUnidentifiedStatus(_ valueParam: SSKProtoSyncMessageSentUnidentifiedDeliveryStatus) { + var items = proto.unidentifiedStatus + items.append(valueParam.proto) + proto.unidentifiedStatus = items + } + + @objc public func setUnidentifiedStatus(_ wrappedItems: [SSKProtoSyncMessageSentUnidentifiedDeliveryStatus]) { + proto.unidentifiedStatus = wrappedItems.map { $0.proto } + } + @objc public func build() throws -> SSKProtoSyncMessageSent { return try SSKProtoSyncMessageSent.parseProto(proto) } @@ -3214,6 +3333,8 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { @objc public let message: SSKProtoDataMessage? + @objc public let unidentifiedStatus: [SSKProtoSyncMessageSentUnidentifiedDeliveryStatus] + @objc public var destination: String? { guard proto.hasDestination else { return nil @@ -3239,9 +3360,11 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { } private init(proto: SignalServiceProtos_SyncMessage.Sent, - message: SSKProtoDataMessage?) { + message: SSKProtoDataMessage?, + unidentifiedStatus: [SSKProtoSyncMessageSentUnidentifiedDeliveryStatus]) { self.proto = proto self.message = message + self.unidentifiedStatus = unidentifiedStatus } @objc @@ -3260,12 +3383,16 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder { message = try SSKProtoDataMessage.parseProto(proto.message) } + var unidentifiedStatus: [SSKProtoSyncMessageSentUnidentifiedDeliveryStatus] = [] + unidentifiedStatus = try proto.unidentifiedStatus.map { try SSKProtoSyncMessageSentUnidentifiedDeliveryStatus.parseProto($0) } + // MARK: - Begin Validation Logic for SSKProtoSyncMessageSent - // MARK: - End Validation Logic for SSKProtoSyncMessageSent - let result = SSKProtoSyncMessageSent(proto: proto, - message: message) + message: message, + unidentifiedStatus: unidentifiedStatus) return result } diff --git a/SignalServiceKit/src/Protos/Generated/SignalIOS.pb.swift b/SignalServiceKit/src/Protos/Generated/SignalIOS.pb.swift index 934a293d8..5fba5edc1 100644 --- a/SignalServiceKit/src/Protos/Generated/SignalIOS.pb.swift +++ b/SignalServiceKit/src/Protos/Generated/SignalIOS.pb.swift @@ -133,9 +133,9 @@ extension IOSProtos_BackupSnapshot: SwiftProtobuf.Message, SwiftProtobuf._Messag try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: IOSProtos_BackupSnapshot) -> Bool { - if self.entity != other.entity {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: IOSProtos_BackupSnapshot, rhs: IOSProtos_BackupSnapshot) -> Bool { + if lhs.entity != rhs.entity {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -167,10 +167,10 @@ extension IOSProtos_BackupSnapshot.BackupEntity: SwiftProtobuf.Message, SwiftPro try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: IOSProtos_BackupSnapshot.BackupEntity) -> Bool { - if self._type != other._type {return false} - if self._entityData != other._entityData {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: IOSProtos_BackupSnapshot.BackupEntity, rhs: IOSProtos_BackupSnapshot.BackupEntity) -> Bool { + if lhs._type != rhs._type {return false} + if lhs._entityData != rhs._entityData {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } diff --git a/SignalServiceKit/src/Protos/Generated/SignalService.pb.swift b/SignalServiceKit/src/Protos/Generated/SignalService.pb.swift index 0ceadcc1b..c85981e8c 100644 --- a/SignalServiceKit/src/Protos/Generated/SignalService.pb.swift +++ b/SignalServiceKit/src/Protos/Generated/SignalService.pb.swift @@ -192,7 +192,7 @@ struct SignalServiceProtos_Content { /// Returns true if `dataMessage` has been explicitly set. var hasDataMessage: Bool {return _storage._dataMessage != nil} /// Clears the value of `dataMessage`. Subsequent reads from it will return its default value. - mutating func clearDataMessage() {_storage._dataMessage = nil} + mutating func clearDataMessage() {_uniqueStorage()._dataMessage = nil} var syncMessage: SignalServiceProtos_SyncMessage { get {return _storage._syncMessage ?? SignalServiceProtos_SyncMessage()} @@ -201,7 +201,7 @@ struct SignalServiceProtos_Content { /// Returns true if `syncMessage` has been explicitly set. var hasSyncMessage: Bool {return _storage._syncMessage != nil} /// Clears the value of `syncMessage`. Subsequent reads from it will return its default value. - mutating func clearSyncMessage() {_storage._syncMessage = nil} + mutating func clearSyncMessage() {_uniqueStorage()._syncMessage = nil} var callMessage: SignalServiceProtos_CallMessage { get {return _storage._callMessage ?? SignalServiceProtos_CallMessage()} @@ -210,7 +210,7 @@ struct SignalServiceProtos_Content { /// Returns true if `callMessage` has been explicitly set. var hasCallMessage: Bool {return _storage._callMessage != nil} /// Clears the value of `callMessage`. Subsequent reads from it will return its default value. - mutating func clearCallMessage() {_storage._callMessage = nil} + mutating func clearCallMessage() {_uniqueStorage()._callMessage = nil} var nullMessage: SignalServiceProtos_NullMessage { get {return _storage._nullMessage ?? SignalServiceProtos_NullMessage()} @@ -219,7 +219,7 @@ struct SignalServiceProtos_Content { /// Returns true if `nullMessage` has been explicitly set. var hasNullMessage: Bool {return _storage._nullMessage != nil} /// Clears the value of `nullMessage`. Subsequent reads from it will return its default value. - mutating func clearNullMessage() {_storage._nullMessage = nil} + mutating func clearNullMessage() {_uniqueStorage()._nullMessage = nil} var receiptMessage: SignalServiceProtos_ReceiptMessage { get {return _storage._receiptMessage ?? SignalServiceProtos_ReceiptMessage()} @@ -228,7 +228,7 @@ struct SignalServiceProtos_Content { /// Returns true if `receiptMessage` has been explicitly set. var hasReceiptMessage: Bool {return _storage._receiptMessage != nil} /// Clears the value of `receiptMessage`. Subsequent reads from it will return its default value. - mutating func clearReceiptMessage() {_storage._receiptMessage = nil} + mutating func clearReceiptMessage() {_uniqueStorage()._receiptMessage = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -249,7 +249,7 @@ struct SignalServiceProtos_CallMessage { /// Returns true if `offer` has been explicitly set. var hasOffer: Bool {return _storage._offer != nil} /// Clears the value of `offer`. Subsequent reads from it will return its default value. - mutating func clearOffer() {_storage._offer = nil} + mutating func clearOffer() {_uniqueStorage()._offer = nil} var answer: SignalServiceProtos_CallMessage.Answer { get {return _storage._answer ?? SignalServiceProtos_CallMessage.Answer()} @@ -258,7 +258,7 @@ struct SignalServiceProtos_CallMessage { /// Returns true if `answer` has been explicitly set. var hasAnswer: Bool {return _storage._answer != nil} /// Clears the value of `answer`. Subsequent reads from it will return its default value. - mutating func clearAnswer() {_storage._answer = nil} + mutating func clearAnswer() {_uniqueStorage()._answer = nil} var iceUpdate: [SignalServiceProtos_CallMessage.IceUpdate] { get {return _storage._iceUpdate} @@ -272,7 +272,7 @@ struct SignalServiceProtos_CallMessage { /// Returns true if `hangup` has been explicitly set. var hasHangup: Bool {return _storage._hangup != nil} /// Clears the value of `hangup`. Subsequent reads from it will return its default value. - mutating func clearHangup() {_storage._hangup = nil} + mutating func clearHangup() {_uniqueStorage()._hangup = nil} var busy: SignalServiceProtos_CallMessage.Busy { get {return _storage._busy ?? SignalServiceProtos_CallMessage.Busy()} @@ -281,7 +281,7 @@ struct SignalServiceProtos_CallMessage { /// Returns true if `busy` has been explicitly set. var hasBusy: Bool {return _storage._busy != nil} /// Clears the value of `busy`. Subsequent reads from it will return its default value. - mutating func clearBusy() {_storage._busy = nil} + mutating func clearBusy() {_uniqueStorage()._busy = nil} /// Signal-iOS sends profile key with call messages /// for earlier discovery @@ -292,7 +292,7 @@ struct SignalServiceProtos_CallMessage { /// Returns true if `profileKey` has been explicitly set. var hasProfileKey: Bool {return _storage._profileKey != nil} /// Clears the value of `profileKey`. Subsequent reads from it will return its default value. - mutating func clearProfileKey() {_storage._profileKey = nil} + mutating func clearProfileKey() {_uniqueStorage()._profileKey = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -482,7 +482,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `body` has been explicitly set. var hasBody: Bool {return _storage._body != nil} /// Clears the value of `body`. Subsequent reads from it will return its default value. - mutating func clearBody() {_storage._body = nil} + mutating func clearBody() {_uniqueStorage()._body = nil} var attachments: [SignalServiceProtos_AttachmentPointer] { get {return _storage._attachments} @@ -496,7 +496,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `group` has been explicitly set. var hasGroup: Bool {return _storage._group != nil} /// Clears the value of `group`. Subsequent reads from it will return its default value. - mutating func clearGroup() {_storage._group = nil} + mutating func clearGroup() {_uniqueStorage()._group = nil} var flags: UInt32 { get {return _storage._flags ?? 0} @@ -505,7 +505,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `flags` has been explicitly set. var hasFlags: Bool {return _storage._flags != nil} /// Clears the value of `flags`. Subsequent reads from it will return its default value. - mutating func clearFlags() {_storage._flags = nil} + mutating func clearFlags() {_uniqueStorage()._flags = nil} var expireTimer: UInt32 { get {return _storage._expireTimer ?? 0} @@ -514,7 +514,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `expireTimer` has been explicitly set. var hasExpireTimer: Bool {return _storage._expireTimer != nil} /// Clears the value of `expireTimer`. Subsequent reads from it will return its default value. - mutating func clearExpireTimer() {_storage._expireTimer = nil} + mutating func clearExpireTimer() {_uniqueStorage()._expireTimer = nil} var profileKey: Data { get {return _storage._profileKey ?? SwiftProtobuf.Internal.emptyData} @@ -523,7 +523,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `profileKey` has been explicitly set. var hasProfileKey: Bool {return _storage._profileKey != nil} /// Clears the value of `profileKey`. Subsequent reads from it will return its default value. - mutating func clearProfileKey() {_storage._profileKey = nil} + mutating func clearProfileKey() {_uniqueStorage()._profileKey = nil} var timestamp: UInt64 { get {return _storage._timestamp ?? 0} @@ -532,7 +532,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `timestamp` has been explicitly set. var hasTimestamp: Bool {return _storage._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. - mutating func clearTimestamp() {_storage._timestamp = nil} + mutating func clearTimestamp() {_uniqueStorage()._timestamp = nil} var quote: SignalServiceProtos_DataMessage.Quote { get {return _storage._quote ?? SignalServiceProtos_DataMessage.Quote()} @@ -541,7 +541,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `quote` has been explicitly set. var hasQuote: Bool {return _storage._quote != nil} /// Clears the value of `quote`. Subsequent reads from it will return its default value. - mutating func clearQuote() {_storage._quote = nil} + mutating func clearQuote() {_uniqueStorage()._quote = nil} var contact: [SignalServiceProtos_DataMessage.Contact] { get {return _storage._contact} @@ -629,7 +629,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `contentType` has been explicitly set. var hasContentType: Bool {return _storage._contentType != nil} /// Clears the value of `contentType`. Subsequent reads from it will return its default value. - mutating func clearContentType() {_storage._contentType = nil} + mutating func clearContentType() {_uniqueStorage()._contentType = nil} var fileName: String { get {return _storage._fileName ?? String()} @@ -638,7 +638,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `fileName` has been explicitly set. var hasFileName: Bool {return _storage._fileName != nil} /// Clears the value of `fileName`. Subsequent reads from it will return its default value. - mutating func clearFileName() {_storage._fileName = nil} + mutating func clearFileName() {_uniqueStorage()._fileName = nil} var thumbnail: SignalServiceProtos_AttachmentPointer { get {return _storage._thumbnail ?? SignalServiceProtos_AttachmentPointer()} @@ -647,7 +647,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `thumbnail` has been explicitly set. var hasThumbnail: Bool {return _storage._thumbnail != nil} /// Clears the value of `thumbnail`. Subsequent reads from it will return its default value. - mutating func clearThumbnail() {_storage._thumbnail = nil} + mutating func clearThumbnail() {_uniqueStorage()._thumbnail = nil} var flags: UInt32 { get {return _storage._flags ?? 0} @@ -656,7 +656,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `flags` has been explicitly set. var hasFlags: Bool {return _storage._flags != nil} /// Clears the value of `flags`. Subsequent reads from it will return its default value. - mutating func clearFlags() {_storage._flags = nil} + mutating func clearFlags() {_uniqueStorage()._flags = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -707,7 +707,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `name` has been explicitly set. var hasName: Bool {return _storage._name != nil} /// Clears the value of `name`. Subsequent reads from it will return its default value. - mutating func clearName() {_storage._name = nil} + mutating func clearName() {_uniqueStorage()._name = nil} var number: [SignalServiceProtos_DataMessage.Contact.Phone] { get {return _storage._number} @@ -731,7 +731,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `avatar` has been explicitly set. var hasAvatar: Bool {return _storage._avatar != nil} /// Clears the value of `avatar`. Subsequent reads from it will return its default value. - mutating func clearAvatar() {_storage._avatar = nil} + mutating func clearAvatar() {_uniqueStorage()._avatar = nil} var organization: String { get {return _storage._organization ?? String()} @@ -740,7 +740,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `organization` has been explicitly set. var hasOrganization: Bool {return _storage._organization != nil} /// Clears the value of `organization`. Subsequent reads from it will return its default value. - mutating func clearOrganization() {_storage._organization = nil} + mutating func clearOrganization() {_uniqueStorage()._organization = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1103,7 +1103,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `avatar` has been explicitly set. var hasAvatar: Bool {return _storage._avatar != nil} /// Clears the value of `avatar`. Subsequent reads from it will return its default value. - mutating func clearAvatar() {_storage._avatar = nil} + mutating func clearAvatar() {_uniqueStorage()._avatar = nil} var isProfile: Bool { get {return _storage._isProfile ?? false} @@ -1112,7 +1112,7 @@ struct SignalServiceProtos_DataMessage { /// Returns true if `isProfile` has been explicitly set. var hasIsProfile: Bool {return _storage._isProfile != nil} /// Clears the value of `isProfile`. Subsequent reads from it will return its default value. - mutating func clearIsProfile() {_storage._isProfile = nil} + mutating func clearIsProfile() {_uniqueStorage()._isProfile = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1319,7 +1319,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `sent` has been explicitly set. var hasSent: Bool {return _storage._sent != nil} /// Clears the value of `sent`. Subsequent reads from it will return its default value. - mutating func clearSent() {_storage._sent = nil} + mutating func clearSent() {_uniqueStorage()._sent = nil} var contacts: SignalServiceProtos_SyncMessage.Contacts { get {return _storage._contacts ?? SignalServiceProtos_SyncMessage.Contacts()} @@ -1328,7 +1328,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `contacts` has been explicitly set. var hasContacts: Bool {return _storage._contacts != nil} /// Clears the value of `contacts`. Subsequent reads from it will return its default value. - mutating func clearContacts() {_storage._contacts = nil} + mutating func clearContacts() {_uniqueStorage()._contacts = nil} var groups: SignalServiceProtos_SyncMessage.Groups { get {return _storage._groups ?? SignalServiceProtos_SyncMessage.Groups()} @@ -1337,7 +1337,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `groups` has been explicitly set. var hasGroups: Bool {return _storage._groups != nil} /// Clears the value of `groups`. Subsequent reads from it will return its default value. - mutating func clearGroups() {_storage._groups = nil} + mutating func clearGroups() {_uniqueStorage()._groups = nil} var request: SignalServiceProtos_SyncMessage.Request { get {return _storage._request ?? SignalServiceProtos_SyncMessage.Request()} @@ -1346,7 +1346,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `request` has been explicitly set. var hasRequest: Bool {return _storage._request != nil} /// Clears the value of `request`. Subsequent reads from it will return its default value. - mutating func clearRequest() {_storage._request = nil} + mutating func clearRequest() {_uniqueStorage()._request = nil} var read: [SignalServiceProtos_SyncMessage.Read] { get {return _storage._read} @@ -1360,7 +1360,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `blocked` has been explicitly set. var hasBlocked: Bool {return _storage._blocked != nil} /// Clears the value of `blocked`. Subsequent reads from it will return its default value. - mutating func clearBlocked() {_storage._blocked = nil} + mutating func clearBlocked() {_uniqueStorage()._blocked = nil} var verified: SignalServiceProtos_Verified { get {return _storage._verified ?? SignalServiceProtos_Verified()} @@ -1369,7 +1369,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `verified` has been explicitly set. var hasVerified: Bool {return _storage._verified != nil} /// Clears the value of `verified`. Subsequent reads from it will return its default value. - mutating func clearVerified() {_storage._verified = nil} + mutating func clearVerified() {_uniqueStorage()._verified = nil} var configuration: SignalServiceProtos_SyncMessage.Configuration { get {return _storage._configuration ?? SignalServiceProtos_SyncMessage.Configuration()} @@ -1378,7 +1378,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `configuration` has been explicitly set. var hasConfiguration: Bool {return _storage._configuration != nil} /// Clears the value of `configuration`. Subsequent reads from it will return its default value. - mutating func clearConfiguration() {_storage._configuration = nil} + mutating func clearConfiguration() {_uniqueStorage()._configuration = nil} var padding: Data { get {return _storage._padding ?? SwiftProtobuf.Internal.emptyData} @@ -1387,7 +1387,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `padding` has been explicitly set. var hasPadding: Bool {return _storage._padding != nil} /// Clears the value of `padding`. Subsequent reads from it will return its default value. - mutating func clearPadding() {_storage._padding = nil} + mutating func clearPadding() {_uniqueStorage()._padding = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1403,7 +1403,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `destination` has been explicitly set. var hasDestination: Bool {return _storage._destination != nil} /// Clears the value of `destination`. Subsequent reads from it will return its default value. - mutating func clearDestination() {_storage._destination = nil} + mutating func clearDestination() {_uniqueStorage()._destination = nil} var timestamp: UInt64 { get {return _storage._timestamp ?? 0} @@ -1412,7 +1412,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `timestamp` has been explicitly set. var hasTimestamp: Bool {return _storage._timestamp != nil} /// Clears the value of `timestamp`. Subsequent reads from it will return its default value. - mutating func clearTimestamp() {_storage._timestamp = nil} + mutating func clearTimestamp() {_uniqueStorage()._timestamp = nil} var message: SignalServiceProtos_DataMessage { get {return _storage._message ?? SignalServiceProtos_DataMessage()} @@ -1421,7 +1421,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `message` has been explicitly set. var hasMessage: Bool {return _storage._message != nil} /// Clears the value of `message`. Subsequent reads from it will return its default value. - mutating func clearMessage() {_storage._message = nil} + mutating func clearMessage() {_uniqueStorage()._message = nil} var expirationStartTimestamp: UInt64 { get {return _storage._expirationStartTimestamp ?? 0} @@ -1430,10 +1430,46 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `expirationStartTimestamp` has been explicitly set. var hasExpirationStartTimestamp: Bool {return _storage._expirationStartTimestamp != nil} /// Clears the value of `expirationStartTimestamp`. Subsequent reads from it will return its default value. - mutating func clearExpirationStartTimestamp() {_storage._expirationStartTimestamp = nil} + mutating func clearExpirationStartTimestamp() {_uniqueStorage()._expirationStartTimestamp = nil} + + var unidentifiedStatus: [SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus] { + get {return _storage._unidentifiedStatus} + set {_uniqueStorage()._unidentifiedStatus = newValue} + } var unknownFields = SwiftProtobuf.UnknownStorage() + struct UnidentifiedDeliveryStatus { + // SwiftProtobuf.Message conformance is added in an extension below. See the + // `Message` and `Message+*Additions` files in the SwiftProtobuf library for + // methods supported on all messages. + + var destination: String { + get {return _destination ?? String()} + set {_destination = newValue} + } + /// Returns true if `destination` has been explicitly set. + var hasDestination: Bool {return self._destination != nil} + /// Clears the value of `destination`. Subsequent reads from it will return its default value. + mutating func clearDestination() {self._destination = nil} + + var unidentified: Bool { + get {return _unidentified ?? false} + set {_unidentified = newValue} + } + /// Returns true if `unidentified` has been explicitly set. + var hasUnidentified: Bool {return self._unidentified != nil} + /// Clears the value of `unidentified`. Subsequent reads from it will return its default value. + mutating func clearUnidentified() {self._unidentified = nil} + + var unknownFields = SwiftProtobuf.UnknownStorage() + + init() {} + + fileprivate var _destination: String? = nil + fileprivate var _unidentified: Bool? = nil + } + init() {} fileprivate var _storage = _StorageClass.defaultInstance @@ -1452,7 +1488,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `blob` has been explicitly set. var hasBlob: Bool {return _storage._blob != nil} /// Clears the value of `blob`. Subsequent reads from it will return its default value. - mutating func clearBlob() {_storage._blob = nil} + mutating func clearBlob() {_uniqueStorage()._blob = nil} /// Signal-iOS renamed this property. var isComplete: Bool { @@ -1462,7 +1498,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `isComplete` has been explicitly set. var hasIsComplete: Bool {return _storage._isComplete != nil} /// Clears the value of `isComplete`. Subsequent reads from it will return its default value. - mutating func clearIsComplete() {_storage._isComplete = nil} + mutating func clearIsComplete() {_uniqueStorage()._isComplete = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1483,7 +1519,7 @@ struct SignalServiceProtos_SyncMessage { /// Returns true if `blob` has been explicitly set. var hasBlob: Bool {return _storage._blob != nil} /// Clears the value of `blob`. Subsequent reads from it will return its default value. - mutating func clearBlob() {_storage._blob = nil} + mutating func clearBlob() {_uniqueStorage()._blob = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1778,7 +1814,7 @@ struct SignalServiceProtos_GroupContext { /// Returns true if `id` has been explicitly set. var hasID: Bool {return _storage._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. - mutating func clearID() {_storage._id = nil} + mutating func clearID() {_uniqueStorage()._id = nil} /// @required var type: SignalServiceProtos_GroupContext.TypeEnum { @@ -1788,7 +1824,7 @@ struct SignalServiceProtos_GroupContext { /// Returns true if `type` has been explicitly set. var hasType: Bool {return _storage._type != nil} /// Clears the value of `type`. Subsequent reads from it will return its default value. - mutating func clearType() {_storage._type = nil} + mutating func clearType() {_uniqueStorage()._type = nil} var name: String { get {return _storage._name ?? String()} @@ -1797,7 +1833,7 @@ struct SignalServiceProtos_GroupContext { /// Returns true if `name` has been explicitly set. var hasName: Bool {return _storage._name != nil} /// Clears the value of `name`. Subsequent reads from it will return its default value. - mutating func clearName() {_storage._name = nil} + mutating func clearName() {_uniqueStorage()._name = nil} var members: [String] { get {return _storage._members} @@ -1811,7 +1847,7 @@ struct SignalServiceProtos_GroupContext { /// Returns true if `avatar` has been explicitly set. var hasAvatar: Bool {return _storage._avatar != nil} /// Clears the value of `avatar`. Subsequent reads from it will return its default value. - mutating func clearAvatar() {_storage._avatar = nil} + mutating func clearAvatar() {_uniqueStorage()._avatar = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1876,7 +1912,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `number` has been explicitly set. var hasNumber: Bool {return _storage._number != nil} /// Clears the value of `number`. Subsequent reads from it will return its default value. - mutating func clearNumber() {_storage._number = nil} + mutating func clearNumber() {_uniqueStorage()._number = nil} var name: String { get {return _storage._name ?? String()} @@ -1885,7 +1921,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `name` has been explicitly set. var hasName: Bool {return _storage._name != nil} /// Clears the value of `name`. Subsequent reads from it will return its default value. - mutating func clearName() {_storage._name = nil} + mutating func clearName() {_uniqueStorage()._name = nil} var avatar: SignalServiceProtos_ContactDetails.Avatar { get {return _storage._avatar ?? SignalServiceProtos_ContactDetails.Avatar()} @@ -1894,7 +1930,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `avatar` has been explicitly set. var hasAvatar: Bool {return _storage._avatar != nil} /// Clears the value of `avatar`. Subsequent reads from it will return its default value. - mutating func clearAvatar() {_storage._avatar = nil} + mutating func clearAvatar() {_uniqueStorage()._avatar = nil} var color: String { get {return _storage._color ?? String()} @@ -1903,7 +1939,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `color` has been explicitly set. var hasColor: Bool {return _storage._color != nil} /// Clears the value of `color`. Subsequent reads from it will return its default value. - mutating func clearColor() {_storage._color = nil} + mutating func clearColor() {_uniqueStorage()._color = nil} var verified: SignalServiceProtos_Verified { get {return _storage._verified ?? SignalServiceProtos_Verified()} @@ -1912,7 +1948,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `verified` has been explicitly set. var hasVerified: Bool {return _storage._verified != nil} /// Clears the value of `verified`. Subsequent reads from it will return its default value. - mutating func clearVerified() {_storage._verified = nil} + mutating func clearVerified() {_uniqueStorage()._verified = nil} var profileKey: Data { get {return _storage._profileKey ?? SwiftProtobuf.Internal.emptyData} @@ -1921,7 +1957,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `profileKey` has been explicitly set. var hasProfileKey: Bool {return _storage._profileKey != nil} /// Clears the value of `profileKey`. Subsequent reads from it will return its default value. - mutating func clearProfileKey() {_storage._profileKey = nil} + mutating func clearProfileKey() {_uniqueStorage()._profileKey = nil} var blocked: Bool { get {return _storage._blocked ?? false} @@ -1930,7 +1966,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `blocked` has been explicitly set. var hasBlocked: Bool {return _storage._blocked != nil} /// Clears the value of `blocked`. Subsequent reads from it will return its default value. - mutating func clearBlocked() {_storage._blocked = nil} + mutating func clearBlocked() {_uniqueStorage()._blocked = nil} var expireTimer: UInt32 { get {return _storage._expireTimer ?? 0} @@ -1939,7 +1975,7 @@ struct SignalServiceProtos_ContactDetails { /// Returns true if `expireTimer` has been explicitly set. var hasExpireTimer: Bool {return _storage._expireTimer != nil} /// Clears the value of `expireTimer`. Subsequent reads from it will return its default value. - mutating func clearExpireTimer() {_storage._expireTimer = nil} + mutating func clearExpireTimer() {_uniqueStorage()._expireTimer = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -1992,7 +2028,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `id` has been explicitly set. var hasID: Bool {return _storage._id != nil} /// Clears the value of `id`. Subsequent reads from it will return its default value. - mutating func clearID() {_storage._id = nil} + mutating func clearID() {_uniqueStorage()._id = nil} var name: String { get {return _storage._name ?? String()} @@ -2001,7 +2037,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `name` has been explicitly set. var hasName: Bool {return _storage._name != nil} /// Clears the value of `name`. Subsequent reads from it will return its default value. - mutating func clearName() {_storage._name = nil} + mutating func clearName() {_uniqueStorage()._name = nil} var members: [String] { get {return _storage._members} @@ -2015,7 +2051,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `avatar` has been explicitly set. var hasAvatar: Bool {return _storage._avatar != nil} /// Clears the value of `avatar`. Subsequent reads from it will return its default value. - mutating func clearAvatar() {_storage._avatar = nil} + mutating func clearAvatar() {_uniqueStorage()._avatar = nil} var active: Bool { get {return _storage._active ?? true} @@ -2024,7 +2060,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `active` has been explicitly set. var hasActive: Bool {return _storage._active != nil} /// Clears the value of `active`. Subsequent reads from it will return its default value. - mutating func clearActive() {_storage._active = nil} + mutating func clearActive() {_uniqueStorage()._active = nil} var expireTimer: UInt32 { get {return _storage._expireTimer ?? 0} @@ -2033,7 +2069,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `expireTimer` has been explicitly set. var hasExpireTimer: Bool {return _storage._expireTimer != nil} /// Clears the value of `expireTimer`. Subsequent reads from it will return its default value. - mutating func clearExpireTimer() {_storage._expireTimer = nil} + mutating func clearExpireTimer() {_uniqueStorage()._expireTimer = nil} var color: String { get {return _storage._color ?? String()} @@ -2042,7 +2078,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `color` has been explicitly set. var hasColor: Bool {return _storage._color != nil} /// Clears the value of `color`. Subsequent reads from it will return its default value. - mutating func clearColor() {_storage._color = nil} + mutating func clearColor() {_uniqueStorage()._color = nil} var blocked: Bool { get {return _storage._blocked ?? false} @@ -2051,7 +2087,7 @@ struct SignalServiceProtos_GroupDetails { /// Returns true if `blocked` has been explicitly set. var hasBlocked: Bool {return _storage._blocked != nil} /// Clears the value of `blocked`. Subsequent reads from it will return its default value. - mutating func clearBlocked() {_storage._blocked = nil} + mutating func clearBlocked() {_uniqueStorage()._blocked = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -2157,17 +2193,17 @@ extension SignalServiceProtos_Envelope: SwiftProtobuf.Message, SwiftProtobuf._Me try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Envelope) -> Bool { - if self._type != other._type {return false} - if self._source != other._source {return false} - if self._sourceDevice != other._sourceDevice {return false} - if self._relay != other._relay {return false} - if self._timestamp != other._timestamp {return false} - if self._legacyMessage != other._legacyMessage {return false} - if self._content != other._content {return false} - if self._serverGuid != other._serverGuid {return false} - if self._serverTimestamp != other._serverTimestamp {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_Envelope, rhs: SignalServiceProtos_Envelope) -> Bool { + if lhs._type != rhs._type {return false} + if lhs._source != rhs._source {return false} + if lhs._sourceDevice != rhs._sourceDevice {return false} + if lhs._relay != rhs._relay {return false} + if lhs._timestamp != rhs._timestamp {return false} + if lhs._legacyMessage != rhs._legacyMessage {return false} + if lhs._content != rhs._content {return false} + if lhs._serverGuid != rhs._serverGuid {return false} + if lhs._serverTimestamp != rhs._serverTimestamp {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2257,21 +2293,21 @@ extension SignalServiceProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._Mes try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Content) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_Content, rhs: SignalServiceProtos_Content) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._dataMessage != other_storage._dataMessage {return false} - if _storage._syncMessage != other_storage._syncMessage {return false} - if _storage._callMessage != other_storage._callMessage {return false} - if _storage._nullMessage != other_storage._nullMessage {return false} - if _storage._receiptMessage != other_storage._receiptMessage {return false} + let rhs_storage = _args.1 + if _storage._dataMessage != rhs_storage._dataMessage {return false} + if _storage._syncMessage != rhs_storage._syncMessage {return false} + if _storage._callMessage != rhs_storage._callMessage {return false} + if _storage._nullMessage != rhs_storage._nullMessage {return false} + if _storage._receiptMessage != rhs_storage._receiptMessage {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2357,22 +2393,22 @@ extension SignalServiceProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_CallMessage, rhs: SignalServiceProtos_CallMessage) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._offer != other_storage._offer {return false} - if _storage._answer != other_storage._answer {return false} - if _storage._iceUpdate != other_storage._iceUpdate {return false} - if _storage._hangup != other_storage._hangup {return false} - if _storage._busy != other_storage._busy {return false} - if _storage._profileKey != other_storage._profileKey {return false} + let rhs_storage = _args.1 + if _storage._offer != rhs_storage._offer {return false} + if _storage._answer != rhs_storage._answer {return false} + if _storage._iceUpdate != rhs_storage._iceUpdate {return false} + if _storage._hangup != rhs_storage._hangup {return false} + if _storage._busy != rhs_storage._busy {return false} + if _storage._profileKey != rhs_storage._profileKey {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2404,10 +2440,10 @@ extension SignalServiceProtos_CallMessage.Offer: SwiftProtobuf.Message, SwiftPro try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Offer) -> Bool { - if self._id != other._id {return false} - if self._sessionDescription != other._sessionDescription {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_CallMessage.Offer, rhs: SignalServiceProtos_CallMessage.Offer) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._sessionDescription != rhs._sessionDescription {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2439,10 +2475,10 @@ extension SignalServiceProtos_CallMessage.Answer: SwiftProtobuf.Message, SwiftPr try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Answer) -> Bool { - if self._id != other._id {return false} - if self._sessionDescription != other._sessionDescription {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_CallMessage.Answer, rhs: SignalServiceProtos_CallMessage.Answer) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._sessionDescription != rhs._sessionDescription {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2484,12 +2520,12 @@ extension SignalServiceProtos_CallMessage.IceUpdate: SwiftProtobuf.Message, Swif try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.IceUpdate) -> Bool { - if self._id != other._id {return false} - if self._sdpMid != other._sdpMid {return false} - if self._sdpMlineIndex != other._sdpMlineIndex {return false} - if self._sdp != other._sdp {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_CallMessage.IceUpdate, rhs: SignalServiceProtos_CallMessage.IceUpdate) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._sdpMid != rhs._sdpMid {return false} + if lhs._sdpMlineIndex != rhs._sdpMlineIndex {return false} + if lhs._sdp != rhs._sdp {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2516,9 +2552,9 @@ extension SignalServiceProtos_CallMessage.Busy: SwiftProtobuf.Message, SwiftProt try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Busy) -> Bool { - if self._id != other._id {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_CallMessage.Busy, rhs: SignalServiceProtos_CallMessage.Busy) -> Bool { + if lhs._id != rhs._id {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2545,9 +2581,9 @@ extension SignalServiceProtos_CallMessage.Hangup: SwiftProtobuf.Message, SwiftPr try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_CallMessage.Hangup) -> Bool { - if self._id != other._id {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_CallMessage.Hangup, rhs: SignalServiceProtos_CallMessage.Hangup) -> Bool { + if lhs._id != rhs._id {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2654,25 +2690,25 @@ extension SignalServiceProtos_DataMessage: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_DataMessage, rhs: SignalServiceProtos_DataMessage) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._body != other_storage._body {return false} - if _storage._attachments != other_storage._attachments {return false} - if _storage._group != other_storage._group {return false} - if _storage._flags != other_storage._flags {return false} - if _storage._expireTimer != other_storage._expireTimer {return false} - if _storage._profileKey != other_storage._profileKey {return false} - if _storage._timestamp != other_storage._timestamp {return false} - if _storage._quote != other_storage._quote {return false} - if _storage._contact != other_storage._contact {return false} + let rhs_storage = _args.1 + if _storage._body != rhs_storage._body {return false} + if _storage._attachments != rhs_storage._attachments {return false} + if _storage._group != rhs_storage._group {return false} + if _storage._flags != rhs_storage._flags {return false} + if _storage._expireTimer != rhs_storage._expireTimer {return false} + if _storage._profileKey != rhs_storage._profileKey {return false} + if _storage._timestamp != rhs_storage._timestamp {return false} + if _storage._quote != rhs_storage._quote {return false} + if _storage._contact != rhs_storage._contact {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2722,12 +2758,12 @@ extension SignalServiceProtos_DataMessage.Quote: SwiftProtobuf.Message, SwiftPro try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Quote) -> Bool { - if self._id != other._id {return false} - if self._author != other._author {return false} - if self._text != other._text {return false} - if self.attachments != other.attachments {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_DataMessage.Quote, rhs: SignalServiceProtos_DataMessage.Quote) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._author != rhs._author {return false} + if lhs._text != rhs._text {return false} + if lhs.attachments != rhs.attachments {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2799,20 +2835,20 @@ extension SignalServiceProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Quote.QuotedAttachment) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_DataMessage.Quote.QuotedAttachment, rhs: SignalServiceProtos_DataMessage.Quote.QuotedAttachment) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._contentType != other_storage._contentType {return false} - if _storage._fileName != other_storage._fileName {return false} - if _storage._thumbnail != other_storage._thumbnail {return false} - if _storage._flags != other_storage._flags {return false} + let rhs_storage = _args.1 + if _storage._contentType != rhs_storage._contentType {return false} + if _storage._fileName != rhs_storage._fileName {return false} + if _storage._thumbnail != rhs_storage._thumbnail {return false} + if _storage._flags != rhs_storage._flags {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2904,22 +2940,22 @@ extension SignalServiceProtos_DataMessage.Contact: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_DataMessage.Contact, rhs: SignalServiceProtos_DataMessage.Contact) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._name != other_storage._name {return false} - if _storage._number != other_storage._number {return false} - if _storage._email != other_storage._email {return false} - if _storage._address != other_storage._address {return false} - if _storage._avatar != other_storage._avatar {return false} - if _storage._organization != other_storage._organization {return false} + let rhs_storage = _args.1 + if _storage._name != rhs_storage._name {return false} + if _storage._number != rhs_storage._number {return false} + if _storage._email != rhs_storage._email {return false} + if _storage._address != rhs_storage._address {return false} + if _storage._avatar != rhs_storage._avatar {return false} + if _storage._organization != rhs_storage._organization {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -2971,14 +3007,14 @@ extension SignalServiceProtos_DataMessage.Contact.Name: SwiftProtobuf.Message, S try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Name) -> Bool { - if self._givenName != other._givenName {return false} - if self._familyName != other._familyName {return false} - if self._prefix != other._prefix {return false} - if self._suffix != other._suffix {return false} - if self._middleName != other._middleName {return false} - if self._displayName != other._displayName {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_DataMessage.Contact.Name, rhs: SignalServiceProtos_DataMessage.Contact.Name) -> Bool { + if lhs._givenName != rhs._givenName {return false} + if lhs._familyName != rhs._familyName {return false} + if lhs._prefix != rhs._prefix {return false} + if lhs._suffix != rhs._suffix {return false} + if lhs._middleName != rhs._middleName {return false} + if lhs._displayName != rhs._displayName {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3015,11 +3051,11 @@ extension SignalServiceProtos_DataMessage.Contact.Phone: SwiftProtobuf.Message, try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Phone) -> Bool { - if self._value != other._value {return false} - if self._type != other._type {return false} - if self._label != other._label {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_DataMessage.Contact.Phone, rhs: SignalServiceProtos_DataMessage.Contact.Phone) -> Bool { + if lhs._value != rhs._value {return false} + if lhs._type != rhs._type {return false} + if lhs._label != rhs._label {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3065,11 +3101,11 @@ extension SignalServiceProtos_DataMessage.Contact.Email: SwiftProtobuf.Message, try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Email) -> Bool { - if self._value != other._value {return false} - if self._type != other._type {return false} - if self._label != other._label {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_DataMessage.Contact.Email, rhs: SignalServiceProtos_DataMessage.Contact.Email) -> Bool { + if lhs._value != rhs._value {return false} + if lhs._type != rhs._type {return false} + if lhs._label != rhs._label {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3145,17 +3181,17 @@ extension SignalServiceProtos_DataMessage.Contact.PostalAddress: SwiftProtobuf.M try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.PostalAddress) -> Bool { - if self._type != other._type {return false} - if self._label != other._label {return false} - if self._street != other._street {return false} - if self._pobox != other._pobox {return false} - if self._neighborhood != other._neighborhood {return false} - if self._city != other._city {return false} - if self._region != other._region {return false} - if self._postcode != other._postcode {return false} - if self._country != other._country {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_DataMessage.Contact.PostalAddress, rhs: SignalServiceProtos_DataMessage.Contact.PostalAddress) -> Bool { + if lhs._type != rhs._type {return false} + if lhs._label != rhs._label {return false} + if lhs._street != rhs._street {return false} + if lhs._pobox != rhs._pobox {return false} + if lhs._neighborhood != rhs._neighborhood {return false} + if lhs._city != rhs._city {return false} + if lhs._region != rhs._region {return false} + if lhs._postcode != rhs._postcode {return false} + if lhs._country != rhs._country {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3221,18 +3257,18 @@ extension SignalServiceProtos_DataMessage.Contact.Avatar: SwiftProtobuf.Message, try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_DataMessage.Contact.Avatar) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_DataMessage.Contact.Avatar, rhs: SignalServiceProtos_DataMessage.Contact.Avatar) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._avatar != other_storage._avatar {return false} - if _storage._isProfile != other_storage._isProfile {return false} + let rhs_storage = _args.1 + if _storage._avatar != rhs_storage._avatar {return false} + if _storage._isProfile != rhs_storage._isProfile {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3259,9 +3295,9 @@ extension SignalServiceProtos_NullMessage: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_NullMessage) -> Bool { - if self._padding != other._padding {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_NullMessage, rhs: SignalServiceProtos_NullMessage) -> Bool { + if lhs._padding != rhs._padding {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3293,10 +3329,10 @@ extension SignalServiceProtos_ReceiptMessage: SwiftProtobuf.Message, SwiftProtob try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ReceiptMessage) -> Bool { - if self._type != other._type {return false} - if self.timestamp != other.timestamp {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_ReceiptMessage, rhs: SignalServiceProtos_ReceiptMessage) -> Bool { + if lhs._type != rhs._type {return false} + if lhs.timestamp != rhs.timestamp {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3345,12 +3381,12 @@ extension SignalServiceProtos_Verified: SwiftProtobuf.Message, SwiftProtobuf._Me try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_Verified) -> Bool { - if self._destination != other._destination {return false} - if self._identityKey != other._identityKey {return false} - if self._state != other._state {return false} - if self._nullMessage != other._nullMessage {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_Verified, rhs: SignalServiceProtos_Verified) -> Bool { + if lhs._destination != rhs._destination {return false} + if lhs._identityKey != rhs._identityKey {return false} + if lhs._state != rhs._state {return false} + if lhs._nullMessage != rhs._nullMessage {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3465,25 +3501,25 @@ extension SignalServiceProtos_SyncMessage: SwiftProtobuf.Message, SwiftProtobuf. try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_SyncMessage, rhs: SignalServiceProtos_SyncMessage) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._sent != other_storage._sent {return false} - if _storage._contacts != other_storage._contacts {return false} - if _storage._groups != other_storage._groups {return false} - if _storage._request != other_storage._request {return false} - if _storage._read != other_storage._read {return false} - if _storage._blocked != other_storage._blocked {return false} - if _storage._verified != other_storage._verified {return false} - if _storage._configuration != other_storage._configuration {return false} - if _storage._padding != other_storage._padding {return false} + let rhs_storage = _args.1 + if _storage._sent != rhs_storage._sent {return false} + if _storage._contacts != rhs_storage._contacts {return false} + if _storage._groups != rhs_storage._groups {return false} + if _storage._request != rhs_storage._request {return false} + if _storage._read != rhs_storage._read {return false} + if _storage._blocked != rhs_storage._blocked {return false} + if _storage._verified != rhs_storage._verified {return false} + if _storage._configuration != rhs_storage._configuration {return false} + if _storage._padding != rhs_storage._padding {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3495,6 +3531,7 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt 2: .same(proto: "timestamp"), 3: .same(proto: "message"), 4: .same(proto: "expirationStartTimestamp"), + 5: .same(proto: "unidentifiedStatus"), ] fileprivate class _StorageClass { @@ -3502,6 +3539,7 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt var _timestamp: UInt64? = nil var _message: SignalServiceProtos_DataMessage? = nil var _expirationStartTimestamp: UInt64? = nil + var _unidentifiedStatus: [SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus] = [] static let defaultInstance = _StorageClass() @@ -3512,6 +3550,7 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt _timestamp = source._timestamp _message = source._message _expirationStartTimestamp = source._expirationStartTimestamp + _unidentifiedStatus = source._unidentifiedStatus } } @@ -3531,6 +3570,7 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt case 2: try decoder.decodeSingularUInt64Field(value: &_storage._timestamp) case 3: try decoder.decodeSingularMessageField(value: &_storage._message) case 4: try decoder.decodeSingularUInt64Field(value: &_storage._expirationStartTimestamp) + case 5: try decoder.decodeRepeatedMessageField(value: &_storage._unidentifiedStatus) default: break } } @@ -3551,24 +3591,63 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt if let v = _storage._expirationStartTimestamp { try visitor.visitSingularUInt64Field(value: v, fieldNumber: 4) } + if !_storage._unidentifiedStatus.isEmpty { + try visitor.visitRepeatedMessageField(value: _storage._unidentifiedStatus, fieldNumber: 5) + } } try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Sent) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_SyncMessage.Sent, rhs: SignalServiceProtos_SyncMessage.Sent) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._destination != other_storage._destination {return false} - if _storage._timestamp != other_storage._timestamp {return false} - if _storage._message != other_storage._message {return false} - if _storage._expirationStartTimestamp != other_storage._expirationStartTimestamp {return false} + let rhs_storage = _args.1 + if _storage._destination != rhs_storage._destination {return false} + if _storage._timestamp != rhs_storage._timestamp {return false} + if _storage._message != rhs_storage._message {return false} + if _storage._expirationStartTimestamp != rhs_storage._expirationStartTimestamp {return false} + if _storage._unidentifiedStatus != rhs_storage._unidentifiedStatus {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} + return true + } +} + +extension SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding { + static let protoMessageName: String = SignalServiceProtos_SyncMessage.Sent.protoMessageName + ".UnidentifiedDeliveryStatus" + static let _protobuf_nameMap: SwiftProtobuf._NameMap = [ + 1: .same(proto: "destination"), + 2: .same(proto: "unidentified"), + ] + + mutating func decodeMessage(decoder: inout D) throws { + while let fieldNumber = try decoder.nextFieldNumber() { + switch fieldNumber { + case 1: try decoder.decodeSingularStringField(value: &self._destination) + case 2: try decoder.decodeSingularBoolField(value: &self._unidentified) + default: break + } + } + } + + func traverse(visitor: inout V) throws { + if let v = self._destination { + try visitor.visitSingularStringField(value: v, fieldNumber: 1) + } + if let v = self._unidentified { + try visitor.visitSingularBoolField(value: v, fieldNumber: 2) + } + try unknownFields.traverse(visitor: &visitor) + } + + static func ==(lhs: SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus, rhs: SignalServiceProtos_SyncMessage.Sent.UnidentifiedDeliveryStatus) -> Bool { + if lhs._destination != rhs._destination {return false} + if lhs._unidentified != rhs._unidentified {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3626,18 +3705,18 @@ extension SignalServiceProtos_SyncMessage.Contacts: SwiftProtobuf.Message, Swift try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Contacts) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_SyncMessage.Contacts, rhs: SignalServiceProtos_SyncMessage.Contacts) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._blob != other_storage._blob {return false} - if _storage._isComplete != other_storage._isComplete {return false} + let rhs_storage = _args.1 + if _storage._blob != rhs_storage._blob {return false} + if _storage._isComplete != rhs_storage._isComplete {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3688,17 +3767,17 @@ extension SignalServiceProtos_SyncMessage.Groups: SwiftProtobuf.Message, SwiftPr try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Groups) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_SyncMessage.Groups, rhs: SignalServiceProtos_SyncMessage.Groups) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._blob != other_storage._blob {return false} + let rhs_storage = _args.1 + if _storage._blob != rhs_storage._blob {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3730,10 +3809,10 @@ extension SignalServiceProtos_SyncMessage.Blocked: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Blocked) -> Bool { - if self.numbers != other.numbers {return false} - if self.groupIds != other.groupIds {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_SyncMessage.Blocked, rhs: SignalServiceProtos_SyncMessage.Blocked) -> Bool { + if lhs.numbers != rhs.numbers {return false} + if lhs.groupIds != rhs.groupIds {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3760,9 +3839,9 @@ extension SignalServiceProtos_SyncMessage.Request: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Request) -> Bool { - if self._type != other._type {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_SyncMessage.Request, rhs: SignalServiceProtos_SyncMessage.Request) -> Bool { + if lhs._type != rhs._type {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3804,10 +3883,10 @@ extension SignalServiceProtos_SyncMessage.Read: SwiftProtobuf.Message, SwiftProt try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Read) -> Bool { - if self._sender != other._sender {return false} - if self._timestamp != other._timestamp {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_SyncMessage.Read, rhs: SignalServiceProtos_SyncMessage.Read) -> Bool { + if lhs._sender != rhs._sender {return false} + if lhs._timestamp != rhs._timestamp {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3834,9 +3913,9 @@ extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message, try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_SyncMessage.Configuration) -> Bool { - if self._readReceipts != other._readReceipts {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_SyncMessage.Configuration, rhs: SignalServiceProtos_SyncMessage.Configuration) -> Bool { + if lhs._readReceipts != rhs._readReceipts {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -3908,18 +3987,18 @@ extension SignalServiceProtos_AttachmentPointer: SwiftProtobuf.Message, SwiftPro try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_AttachmentPointer) -> Bool { - if self._id != other._id {return false} - if self._contentType != other._contentType {return false} - if self._key != other._key {return false} - if self._size != other._size {return false} - if self._thumbnail != other._thumbnail {return false} - if self._digest != other._digest {return false} - if self._fileName != other._fileName {return false} - if self._flags != other._flags {return false} - if self._width != other._width {return false} - if self._height != other._height {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_AttachmentPointer, rhs: SignalServiceProtos_AttachmentPointer) -> Bool { + if lhs._id != rhs._id {return false} + if lhs._contentType != rhs._contentType {return false} + if lhs._key != rhs._key {return false} + if lhs._size != rhs._size {return false} + if lhs._thumbnail != rhs._thumbnail {return false} + if lhs._digest != rhs._digest {return false} + if lhs._fileName != rhs._fileName {return false} + if lhs._flags != rhs._flags {return false} + if lhs._width != rhs._width {return false} + if lhs._height != rhs._height {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -4004,21 +4083,21 @@ extension SignalServiceProtos_GroupContext: SwiftProtobuf.Message, SwiftProtobuf try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupContext) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_GroupContext, rhs: SignalServiceProtos_GroupContext) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._id != other_storage._id {return false} - if _storage._type != other_storage._type {return false} - if _storage._name != other_storage._name {return false} - if _storage._members != other_storage._members {return false} - if _storage._avatar != other_storage._avatar {return false} + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._type != rhs_storage._type {return false} + if _storage._name != rhs_storage._name {return false} + if _storage._members != rhs_storage._members {return false} + if _storage._avatar != rhs_storage._avatar {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -4128,24 +4207,24 @@ extension SignalServiceProtos_ContactDetails: SwiftProtobuf.Message, SwiftProtob try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ContactDetails) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_ContactDetails, rhs: SignalServiceProtos_ContactDetails) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._number != other_storage._number {return false} - if _storage._name != other_storage._name {return false} - if _storage._avatar != other_storage._avatar {return false} - if _storage._color != other_storage._color {return false} - if _storage._verified != other_storage._verified {return false} - if _storage._profileKey != other_storage._profileKey {return false} - if _storage._blocked != other_storage._blocked {return false} - if _storage._expireTimer != other_storage._expireTimer {return false} + let rhs_storage = _args.1 + if _storage._number != rhs_storage._number {return false} + if _storage._name != rhs_storage._name {return false} + if _storage._avatar != rhs_storage._avatar {return false} + if _storage._color != rhs_storage._color {return false} + if _storage._verified != rhs_storage._verified {return false} + if _storage._profileKey != rhs_storage._profileKey {return false} + if _storage._blocked != rhs_storage._blocked {return false} + if _storage._expireTimer != rhs_storage._expireTimer {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -4177,10 +4256,10 @@ extension SignalServiceProtos_ContactDetails.Avatar: SwiftProtobuf.Message, Swif try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_ContactDetails.Avatar) -> Bool { - if self._contentType != other._contentType {return false} - if self._length != other._length {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_ContactDetails.Avatar, rhs: SignalServiceProtos_ContactDetails.Avatar) -> Bool { + if lhs._contentType != rhs._contentType {return false} + if lhs._length != rhs._length {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -4280,24 +4359,24 @@ extension SignalServiceProtos_GroupDetails: SwiftProtobuf.Message, SwiftProtobuf try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupDetails) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: SignalServiceProtos_GroupDetails, rhs: SignalServiceProtos_GroupDetails) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._id != other_storage._id {return false} - if _storage._name != other_storage._name {return false} - if _storage._members != other_storage._members {return false} - if _storage._avatar != other_storage._avatar {return false} - if _storage._active != other_storage._active {return false} - if _storage._expireTimer != other_storage._expireTimer {return false} - if _storage._color != other_storage._color {return false} - if _storage._blocked != other_storage._blocked {return false} + let rhs_storage = _args.1 + if _storage._id != rhs_storage._id {return false} + if _storage._name != rhs_storage._name {return false} + if _storage._members != rhs_storage._members {return false} + if _storage._avatar != rhs_storage._avatar {return false} + if _storage._active != rhs_storage._active {return false} + if _storage._expireTimer != rhs_storage._expireTimer {return false} + if _storage._color != rhs_storage._color {return false} + if _storage._blocked != rhs_storage._blocked {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -4329,10 +4408,10 @@ extension SignalServiceProtos_GroupDetails.Avatar: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: SignalServiceProtos_GroupDetails.Avatar) -> Bool { - if self._contentType != other._contentType {return false} - if self._length != other._length {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: SignalServiceProtos_GroupDetails.Avatar, rhs: SignalServiceProtos_GroupDetails.Avatar) -> Bool { + if lhs._contentType != rhs._contentType {return false} + if lhs._length != rhs._length {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } diff --git a/SignalServiceKit/src/Protos/Generated/WebSocketResources.pb.swift b/SignalServiceKit/src/Protos/Generated/WebSocketResources.pb.swift index e9f79bf87..9c483f53f 100644 --- a/SignalServiceKit/src/Protos/Generated/WebSocketResources.pb.swift +++ b/SignalServiceKit/src/Protos/Generated/WebSocketResources.pb.swift @@ -151,7 +151,7 @@ struct WebSocketProtos_WebSocketMessage { /// Returns true if `type` has been explicitly set. var hasType: Bool {return _storage._type != nil} /// Clears the value of `type`. Subsequent reads from it will return its default value. - mutating func clearType() {_storage._type = nil} + mutating func clearType() {_uniqueStorage()._type = nil} var request: WebSocketProtos_WebSocketRequestMessage { get {return _storage._request ?? WebSocketProtos_WebSocketRequestMessage()} @@ -160,7 +160,7 @@ struct WebSocketProtos_WebSocketMessage { /// Returns true if `request` has been explicitly set. var hasRequest: Bool {return _storage._request != nil} /// Clears the value of `request`. Subsequent reads from it will return its default value. - mutating func clearRequest() {_storage._request = nil} + mutating func clearRequest() {_uniqueStorage()._request = nil} var response: WebSocketProtos_WebSocketResponseMessage { get {return _storage._response ?? WebSocketProtos_WebSocketResponseMessage()} @@ -169,7 +169,7 @@ struct WebSocketProtos_WebSocketMessage { /// Returns true if `response` has been explicitly set. var hasResponse: Bool {return _storage._response != nil} /// Clears the value of `response`. Subsequent reads from it will return its default value. - mutating func clearResponse() {_storage._response = nil} + mutating func clearResponse() {_uniqueStorage()._response = nil} var unknownFields = SwiftProtobuf.UnknownStorage() @@ -261,13 +261,13 @@ extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftP try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: WebSocketProtos_WebSocketRequestMessage) -> Bool { - if self._verb != other._verb {return false} - if self._path != other._path {return false} - if self._body != other._body {return false} - if self.headers != other.headers {return false} - if self._requestID != other._requestID {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: WebSocketProtos_WebSocketRequestMessage, rhs: WebSocketProtos_WebSocketRequestMessage) -> Bool { + if lhs._verb != rhs._verb {return false} + if lhs._path != rhs._path {return false} + if lhs._body != rhs._body {return false} + if lhs.headers != rhs.headers {return false} + if lhs._requestID != rhs._requestID {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -314,13 +314,13 @@ extension WebSocketProtos_WebSocketResponseMessage: SwiftProtobuf.Message, Swift try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: WebSocketProtos_WebSocketResponseMessage) -> Bool { - if self._requestID != other._requestID {return false} - if self._status != other._status {return false} - if self._message != other._message {return false} - if self.headers != other.headers {return false} - if self._body != other._body {return false} - if unknownFields != other.unknownFields {return false} + static func ==(lhs: WebSocketProtos_WebSocketResponseMessage, rhs: WebSocketProtos_WebSocketResponseMessage) -> Bool { + if lhs._requestID != rhs._requestID {return false} + if lhs._status != rhs._status {return false} + if lhs._message != rhs._message {return false} + if lhs.headers != rhs.headers {return false} + if lhs._body != rhs._body {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } } @@ -385,19 +385,19 @@ extension WebSocketProtos_WebSocketMessage: SwiftProtobuf.Message, SwiftProtobuf try unknownFields.traverse(visitor: &visitor) } - func _protobuf_generated_isEqualTo(other: WebSocketProtos_WebSocketMessage) -> Bool { - if _storage !== other._storage { - let storagesAreEqual: Bool = withExtendedLifetime((_storage, other._storage)) { (_args: (_StorageClass, _StorageClass)) in + static func ==(lhs: WebSocketProtos_WebSocketMessage, rhs: WebSocketProtos_WebSocketMessage) -> Bool { + if lhs._storage !== rhs._storage { + let storagesAreEqual: Bool = withExtendedLifetime((lhs._storage, rhs._storage)) { (_args: (_StorageClass, _StorageClass)) in let _storage = _args.0 - let other_storage = _args.1 - if _storage._type != other_storage._type {return false} - if _storage._request != other_storage._request {return false} - if _storage._response != other_storage._response {return false} + let rhs_storage = _args.1 + if _storage._type != rhs_storage._type {return false} + if _storage._request != rhs_storage._request {return false} + if _storage._response != rhs_storage._response {return false} return true } if !storagesAreEqual {return false} } - if unknownFields != other.unknownFields {return false} + if lhs.unknownFields != rhs.unknownFields {return false} return true } }