Modify proto wrapper builders to require required fields.
This commit is contained in:
parent
0da5a73957
commit
74e456f90e
|
@ -664,10 +664,26 @@ public func serializedData() throws -> Data {
|
|||
|
||||
writer.add('// MARK: - %s' % self.swift_builder_name)
|
||||
writer.newline()
|
||||
|
||||
# Required Fields
|
||||
required_fields = [field for field in self.fields() if field.is_required]
|
||||
required_init_params = []
|
||||
required_init_args = []
|
||||
if len(required_fields) > 0:
|
||||
for field in required_fields:
|
||||
if field.rules == 'repeated':
|
||||
param_type = '[' + self.base_swift_type_for_field(field) + ']'
|
||||
else:
|
||||
param_type = self.base_swift_type_for_field(field)
|
||||
required_init_params.append('%s: %s' % ( field.name_swift, param_type) )
|
||||
required_init_args.append('%s: %s' % ( field.name_swift, field.name_swift) )
|
||||
|
||||
# Convenience accessor.
|
||||
with writer.braced('@objc public class func builder() -> %s' % self.swift_builder_name) as writer:
|
||||
writer.add('return %s()' % (self.swift_builder_name, ))
|
||||
with writer.braced('@objc public class func builder(%s) -> %s' % (
|
||||
', '.join(required_init_params),
|
||||
self.swift_builder_name,
|
||||
)) as writer:
|
||||
writer.add('return %s(%s)' % (self.swift_builder_name, ', '.join(required_init_args), ))
|
||||
writer.newline()
|
||||
|
||||
writer.add('@objc public class %s: NSObject {' % self.swift_builder_name)
|
||||
|
@ -679,21 +695,14 @@ public func serializedData() throws -> Data {
|
|||
writer.newline()
|
||||
|
||||
# Initializer
|
||||
writer.add('@objc public override init() {}')
|
||||
writer.add('@objc fileprivate override init() {}')
|
||||
writer.newline()
|
||||
|
||||
# Required-Field Initializer
|
||||
required_fields = [field for field in self.fields() if field.is_required]
|
||||
# if True:
|
||||
if len(required_fields) > 0:
|
||||
required_init_params = []
|
||||
for field in required_fields:
|
||||
if field.rules == 'repeated':
|
||||
param_type = '[' + self.base_swift_type_for_field(field) + ']'
|
||||
else:
|
||||
param_type = self.base_swift_type_for_field(field)
|
||||
required_init_params.append('%s: %s' % ( field.name_swift, param_type) )
|
||||
writer.add('// Initializer for required fields')
|
||||
writer.add('@objc public init(%s) {' % ', '.join(required_init_params))
|
||||
# writer.add('// Initializer for required fields')
|
||||
writer.add('@objc fileprivate init(%s) {' % ', '.join(required_init_params))
|
||||
writer.push_indent()
|
||||
writer.add('super.init()')
|
||||
writer.newline()
|
||||
|
|
|
@ -16,18 +16,17 @@ public enum WebRTCProtoError: Error {
|
|||
|
||||
// MARK: - WebRTCProtoConnectedBuilder
|
||||
|
||||
@objc public class func builder() -> WebRTCProtoConnectedBuilder {
|
||||
return WebRTCProtoConnectedBuilder()
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoConnectedBuilder {
|
||||
return WebRTCProtoConnectedBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoConnectedBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_Connected()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -104,18 +103,17 @@ extension WebRTCProtoConnected.WebRTCProtoConnectedBuilder {
|
|||
|
||||
// MARK: - WebRTCProtoHangupBuilder
|
||||
|
||||
@objc public class func builder() -> WebRTCProtoHangupBuilder {
|
||||
return WebRTCProtoHangupBuilder()
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoHangupBuilder {
|
||||
return WebRTCProtoHangupBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoHangupBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_Hangup()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -192,18 +190,17 @@ extension WebRTCProtoHangup.WebRTCProtoHangupBuilder {
|
|||
|
||||
// MARK: - WebRTCProtoVideoStreamingStatusBuilder
|
||||
|
||||
@objc public class func builder() -> WebRTCProtoVideoStreamingStatusBuilder {
|
||||
return WebRTCProtoVideoStreamingStatusBuilder()
|
||||
@objc public class func builder(id: UInt64) -> WebRTCProtoVideoStreamingStatusBuilder {
|
||||
return WebRTCProtoVideoStreamingStatusBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class WebRTCProtoVideoStreamingStatusBuilder: NSObject {
|
||||
|
||||
private var proto = WebRTCProtos_VideoStreamingStatus()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -299,7 +296,7 @@ extension WebRTCProtoVideoStreamingStatus.WebRTCProtoVideoStreamingStatusBuilder
|
|||
|
||||
private var proto = WebRTCProtos_Data()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setConnected(_ valueParam: WebRTCProtoConnected) {
|
||||
proto.connected = valueParam.proto
|
||||
|
@ -351,17 +348,17 @@ extension WebRTCProtoVideoStreamingStatus.WebRTCProtoVideoStreamingStatusBuilder
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: WebRTCProtos_Data) throws -> WebRTCProtoData {
|
||||
var connected: WebRTCProtoConnected?
|
||||
var connected: WebRTCProtoConnected? = nil
|
||||
if proto.hasConnected {
|
||||
connected = try WebRTCProtoConnected.parseProto(proto.connected)
|
||||
}
|
||||
|
||||
var hangup: WebRTCProtoHangup?
|
||||
var hangup: WebRTCProtoHangup? = nil
|
||||
if proto.hasHangup {
|
||||
hangup = try WebRTCProtoHangup.parseProto(proto.hangup)
|
||||
}
|
||||
|
||||
var videoStreamingStatus: WebRTCProtoVideoStreamingStatus?
|
||||
var videoStreamingStatus: WebRTCProtoVideoStreamingStatus? = nil
|
||||
if proto.hasVideoStreamingStatus {
|
||||
videoStreamingStatus = try WebRTCProtoVideoStreamingStatus.parseProto(proto.videoStreamingStatus)
|
||||
}
|
||||
|
|
|
@ -16,18 +16,17 @@ public enum FingerprintProtoError: Error {
|
|||
|
||||
// MARK: - FingerprintProtoLogicalFingerprintBuilder
|
||||
|
||||
@objc public class func builder() -> FingerprintProtoLogicalFingerprintBuilder {
|
||||
return FingerprintProtoLogicalFingerprintBuilder()
|
||||
@objc public class func builder(identityData: Data) -> FingerprintProtoLogicalFingerprintBuilder {
|
||||
return FingerprintProtoLogicalFingerprintBuilder(identityData: identityData)
|
||||
}
|
||||
|
||||
@objc public class FingerprintProtoLogicalFingerprintBuilder: NSObject {
|
||||
|
||||
private var proto = FingerprintProtos_LogicalFingerprint()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(identityData: Data) {
|
||||
@objc fileprivate init(identityData: Data) {
|
||||
super.init()
|
||||
|
||||
setIdentityData(identityData)
|
||||
|
@ -104,18 +103,17 @@ extension FingerprintProtoLogicalFingerprint.FingerprintProtoLogicalFingerprintB
|
|||
|
||||
// MARK: - FingerprintProtoLogicalFingerprintsBuilder
|
||||
|
||||
@objc public class func builder() -> FingerprintProtoLogicalFingerprintsBuilder {
|
||||
return FingerprintProtoLogicalFingerprintsBuilder()
|
||||
@objc public class func builder(version: UInt32, localFingerprint: FingerprintProtoLogicalFingerprint, remoteFingerprint: FingerprintProtoLogicalFingerprint) -> FingerprintProtoLogicalFingerprintsBuilder {
|
||||
return FingerprintProtoLogicalFingerprintsBuilder(version: version, localFingerprint: localFingerprint, remoteFingerprint: remoteFingerprint)
|
||||
}
|
||||
|
||||
@objc public class FingerprintProtoLogicalFingerprintsBuilder: NSObject {
|
||||
|
||||
private var proto = FingerprintProtos_LogicalFingerprints()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(version: UInt32, localFingerprint: FingerprintProtoLogicalFingerprint, remoteFingerprint: FingerprintProtoLogicalFingerprint) {
|
||||
@objc fileprivate init(version: UInt32, localFingerprint: FingerprintProtoLogicalFingerprint, remoteFingerprint: FingerprintProtoLogicalFingerprint) {
|
||||
super.init()
|
||||
|
||||
setVersion(version)
|
||||
|
|
|
@ -16,18 +16,17 @@ public enum ProvisioningProtoError: Error {
|
|||
|
||||
// MARK: - ProvisioningProtoProvisionEnvelopeBuilder
|
||||
|
||||
@objc public class func builder() -> ProvisioningProtoProvisionEnvelopeBuilder {
|
||||
return ProvisioningProtoProvisionEnvelopeBuilder()
|
||||
@objc public class func builder(publicKey: Data, body: Data) -> ProvisioningProtoProvisionEnvelopeBuilder {
|
||||
return ProvisioningProtoProvisionEnvelopeBuilder(publicKey: publicKey, body: body)
|
||||
}
|
||||
|
||||
@objc public class ProvisioningProtoProvisionEnvelopeBuilder: NSObject {
|
||||
|
||||
private var proto = ProvisioningProtos_ProvisionEnvelope()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(publicKey: Data, body: Data) {
|
||||
@objc fileprivate init(publicKey: Data, body: Data) {
|
||||
super.init()
|
||||
|
||||
setPublicKey(publicKey)
|
||||
|
@ -119,18 +118,17 @@ extension ProvisioningProtoProvisionEnvelope.ProvisioningProtoProvisionEnvelopeB
|
|||
|
||||
// MARK: - ProvisioningProtoProvisionMessageBuilder
|
||||
|
||||
@objc public class func builder() -> ProvisioningProtoProvisionMessageBuilder {
|
||||
return ProvisioningProtoProvisionMessageBuilder()
|
||||
@objc public class func builder(identityKeyPublic: Data, identityKeyPrivate: Data, number: String, provisioningCode: String, userAgent: String, profileKey: Data, readReceipts: Bool) -> ProvisioningProtoProvisionMessageBuilder {
|
||||
return ProvisioningProtoProvisionMessageBuilder(identityKeyPublic: identityKeyPublic, identityKeyPrivate: identityKeyPrivate, number: number, provisioningCode: provisioningCode, userAgent: userAgent, profileKey: profileKey, readReceipts: readReceipts)
|
||||
}
|
||||
|
||||
@objc public class ProvisioningProtoProvisionMessageBuilder: NSObject {
|
||||
|
||||
private var proto = ProvisioningProtos_ProvisionMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(identityKeyPublic: Data, identityKeyPrivate: Data, number: String, provisioningCode: String, userAgent: String, profileKey: Data, readReceipts: Bool) {
|
||||
@objc fileprivate init(identityKeyPublic: Data, identityKeyPrivate: Data, number: String, provisioningCode: String, userAgent: String, profileKey: Data, readReceipts: Bool) {
|
||||
super.init()
|
||||
|
||||
setIdentityKeyPublic(identityKeyPublic)
|
||||
|
|
|
@ -46,18 +46,17 @@ public enum SSKProtoError: Error {
|
|||
|
||||
// MARK: - SSKProtoEnvelopeBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoEnvelopeBuilder {
|
||||
return SSKProtoEnvelopeBuilder()
|
||||
@objc public class func builder(type: SSKProtoEnvelopeType, source: String, sourceDevice: UInt32, timestamp: UInt64) -> SSKProtoEnvelopeBuilder {
|
||||
return SSKProtoEnvelopeBuilder(type: type, source: source, sourceDevice: sourceDevice, timestamp: timestamp)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoEnvelopeBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_Envelope()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(type: SSKProtoEnvelopeType, source: String, sourceDevice: UInt32, timestamp: UInt64) {
|
||||
@objc fileprivate init(type: SSKProtoEnvelopeType, source: String, sourceDevice: UInt32, timestamp: UInt64) {
|
||||
super.init()
|
||||
|
||||
setType(type)
|
||||
|
@ -229,7 +228,7 @@ extension SSKProtoEnvelope.SSKProtoEnvelopeBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_Content()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setDataMessage(_ valueParam: SSKProtoDataMessage) {
|
||||
proto.dataMessage = valueParam.proto
|
||||
|
@ -297,27 +296,27 @@ extension SSKProtoEnvelope.SSKProtoEnvelopeBuilder {
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_Content) throws -> SSKProtoContent {
|
||||
var dataMessage: SSKProtoDataMessage?
|
||||
var dataMessage: SSKProtoDataMessage? = nil
|
||||
if proto.hasDataMessage {
|
||||
dataMessage = try SSKProtoDataMessage.parseProto(proto.dataMessage)
|
||||
}
|
||||
|
||||
var syncMessage: SSKProtoSyncMessage?
|
||||
var syncMessage: SSKProtoSyncMessage? = nil
|
||||
if proto.hasSyncMessage {
|
||||
syncMessage = try SSKProtoSyncMessage.parseProto(proto.syncMessage)
|
||||
}
|
||||
|
||||
var callMessage: SSKProtoCallMessage?
|
||||
var callMessage: SSKProtoCallMessage? = nil
|
||||
if proto.hasCallMessage {
|
||||
callMessage = try SSKProtoCallMessage.parseProto(proto.callMessage)
|
||||
}
|
||||
|
||||
var nullMessage: SSKProtoNullMessage?
|
||||
var nullMessage: SSKProtoNullMessage? = nil
|
||||
if proto.hasNullMessage {
|
||||
nullMessage = try SSKProtoNullMessage.parseProto(proto.nullMessage)
|
||||
}
|
||||
|
||||
var receiptMessage: SSKProtoReceiptMessage?
|
||||
var receiptMessage: SSKProtoReceiptMessage? = nil
|
||||
if proto.hasReceiptMessage {
|
||||
receiptMessage = try SSKProtoReceiptMessage.parseProto(proto.receiptMessage)
|
||||
}
|
||||
|
@ -358,18 +357,17 @@ extension SSKProtoContent.SSKProtoContentBuilder {
|
|||
|
||||
// MARK: - SSKProtoCallMessageOfferBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoCallMessageOfferBuilder {
|
||||
return SSKProtoCallMessageOfferBuilder()
|
||||
@objc public class func builder(id: UInt64, sessionDescription: String) -> SSKProtoCallMessageOfferBuilder {
|
||||
return SSKProtoCallMessageOfferBuilder(id: id, sessionDescription: sessionDescription)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoCallMessageOfferBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_CallMessage.Offer()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64, sessionDescription: String) {
|
||||
@objc fileprivate init(id: UInt64, sessionDescription: String) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -461,18 +459,17 @@ extension SSKProtoCallMessageOffer.SSKProtoCallMessageOfferBuilder {
|
|||
|
||||
// MARK: - SSKProtoCallMessageAnswerBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoCallMessageAnswerBuilder {
|
||||
return SSKProtoCallMessageAnswerBuilder()
|
||||
@objc public class func builder(id: UInt64, sessionDescription: String) -> SSKProtoCallMessageAnswerBuilder {
|
||||
return SSKProtoCallMessageAnswerBuilder(id: id, sessionDescription: sessionDescription)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoCallMessageAnswerBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_CallMessage.Answer()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64, sessionDescription: String) {
|
||||
@objc fileprivate init(id: UInt64, sessionDescription: String) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -564,18 +561,17 @@ extension SSKProtoCallMessageAnswer.SSKProtoCallMessageAnswerBuilder {
|
|||
|
||||
// MARK: - SSKProtoCallMessageIceUpdateBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoCallMessageIceUpdateBuilder {
|
||||
return SSKProtoCallMessageIceUpdateBuilder()
|
||||
@objc public class func builder(id: UInt64, sdpMid: String, sdpMlineIndex: UInt32, sdp: String) -> SSKProtoCallMessageIceUpdateBuilder {
|
||||
return SSKProtoCallMessageIceUpdateBuilder(id: id, sdpMid: sdpMid, sdpMlineIndex: sdpMlineIndex, sdp: sdp)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoCallMessageIceUpdateBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_CallMessage.IceUpdate()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64, sdpMid: String, sdpMlineIndex: UInt32, sdp: String) {
|
||||
@objc fileprivate init(id: UInt64, sdpMid: String, sdpMlineIndex: UInt32, sdp: String) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -697,18 +693,17 @@ extension SSKProtoCallMessageIceUpdate.SSKProtoCallMessageIceUpdateBuilder {
|
|||
|
||||
// MARK: - SSKProtoCallMessageBusyBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoCallMessageBusyBuilder {
|
||||
return SSKProtoCallMessageBusyBuilder()
|
||||
@objc public class func builder(id: UInt64) -> SSKProtoCallMessageBusyBuilder {
|
||||
return SSKProtoCallMessageBusyBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoCallMessageBusyBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_CallMessage.Busy()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -785,18 +780,17 @@ extension SSKProtoCallMessageBusy.SSKProtoCallMessageBusyBuilder {
|
|||
|
||||
// MARK: - SSKProtoCallMessageHangupBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoCallMessageHangupBuilder {
|
||||
return SSKProtoCallMessageHangupBuilder()
|
||||
@objc public class func builder(id: UInt64) -> SSKProtoCallMessageHangupBuilder {
|
||||
return SSKProtoCallMessageHangupBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoCallMessageHangupBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_CallMessage.Hangup()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -881,7 +875,7 @@ extension SSKProtoCallMessageHangup.SSKProtoCallMessageHangupBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_CallMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setOffer(_ valueParam: SSKProtoCallMessageOffer) {
|
||||
proto.offer = valueParam.proto
|
||||
|
@ -969,12 +963,12 @@ extension SSKProtoCallMessageHangup.SSKProtoCallMessageHangupBuilder {
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_CallMessage) throws -> SSKProtoCallMessage {
|
||||
var offer: SSKProtoCallMessageOffer?
|
||||
var offer: SSKProtoCallMessageOffer? = nil
|
||||
if proto.hasOffer {
|
||||
offer = try SSKProtoCallMessageOffer.parseProto(proto.offer)
|
||||
}
|
||||
|
||||
var answer: SSKProtoCallMessageAnswer?
|
||||
var answer: SSKProtoCallMessageAnswer? = nil
|
||||
if proto.hasAnswer {
|
||||
answer = try SSKProtoCallMessageAnswer.parseProto(proto.answer)
|
||||
}
|
||||
|
@ -982,12 +976,12 @@ extension SSKProtoCallMessageHangup.SSKProtoCallMessageHangupBuilder {
|
|||
var iceUpdate: [SSKProtoCallMessageIceUpdate] = []
|
||||
iceUpdate = try proto.iceUpdate.map { try SSKProtoCallMessageIceUpdate.parseProto($0) }
|
||||
|
||||
var hangup: SSKProtoCallMessageHangup?
|
||||
var hangup: SSKProtoCallMessageHangup? = nil
|
||||
if proto.hasHangup {
|
||||
hangup = try SSKProtoCallMessageHangup.parseProto(proto.hangup)
|
||||
}
|
||||
|
||||
var busy: SSKProtoCallMessageBusy?
|
||||
var busy: SSKProtoCallMessageBusy? = nil
|
||||
if proto.hasBusy {
|
||||
busy = try SSKProtoCallMessageBusy.parseProto(proto.busy)
|
||||
}
|
||||
|
@ -1054,7 +1048,7 @@ extension SSKProtoCallMessage.SSKProtoCallMessageBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Quote.QuotedAttachment()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setContentType(_ valueParam: String) {
|
||||
proto.contentType = valueParam
|
||||
|
@ -1129,7 +1123,7 @@ extension SSKProtoCallMessage.SSKProtoCallMessageBuilder {
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_DataMessage.Quote.QuotedAttachment) throws -> SSKProtoDataMessageQuoteQuotedAttachment {
|
||||
var thumbnail: SSKProtoAttachmentPointer?
|
||||
var thumbnail: SSKProtoAttachmentPointer? = nil
|
||||
if proto.hasThumbnail {
|
||||
thumbnail = try SSKProtoAttachmentPointer.parseProto(proto.thumbnail)
|
||||
}
|
||||
|
@ -1166,18 +1160,17 @@ extension SSKProtoDataMessageQuoteQuotedAttachment.SSKProtoDataMessageQuoteQuote
|
|||
|
||||
// MARK: - SSKProtoDataMessageQuoteBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoDataMessageQuoteBuilder {
|
||||
return SSKProtoDataMessageQuoteBuilder()
|
||||
@objc public class func builder(id: UInt64, author: String) -> SSKProtoDataMessageQuoteBuilder {
|
||||
return SSKProtoDataMessageQuoteBuilder(id: id, author: author)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoDataMessageQuoteBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_DataMessage.Quote()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64, author: String) {
|
||||
@objc fileprivate init(id: UInt64, author: String) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -1309,7 +1302,7 @@ extension SSKProtoDataMessageQuote.SSKProtoDataMessageQuoteBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact.Name()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setGivenName(_ valueParam: String) {
|
||||
proto.givenName = valueParam
|
||||
|
@ -1487,7 +1480,7 @@ extension SSKProtoDataMessageContactName.SSKProtoDataMessageContactNameBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact.Phone()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setValue(_ valueParam: String) {
|
||||
proto.value = valueParam
|
||||
|
@ -1620,7 +1613,7 @@ extension SSKProtoDataMessageContactPhone.SSKProtoDataMessageContactPhoneBuilder
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact.Email()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setValue(_ valueParam: String) {
|
||||
proto.value = valueParam
|
||||
|
@ -1750,7 +1743,7 @@ extension SSKProtoDataMessageContactEmail.SSKProtoDataMessageContactEmailBuilder
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact.PostalAddress()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setType(_ valueParam: SSKProtoDataMessageContactPostalAddressType) {
|
||||
proto.type = SSKProtoDataMessageContactPostalAddressTypeUnwrap(valueParam)
|
||||
|
@ -1940,7 +1933,7 @@ extension SSKProtoDataMessageContactPostalAddress.SSKProtoDataMessageContactPost
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact.Avatar()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setAvatar(_ valueParam: SSKProtoAttachmentPointer) {
|
||||
proto.avatar = valueParam.proto
|
||||
|
@ -1987,7 +1980,7 @@ extension SSKProtoDataMessageContactPostalAddress.SSKProtoDataMessageContactPost
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_DataMessage.Contact.Avatar) throws -> SSKProtoDataMessageContactAvatar {
|
||||
var avatar: SSKProtoAttachmentPointer?
|
||||
var avatar: SSKProtoAttachmentPointer? = nil
|
||||
if proto.hasAvatar {
|
||||
avatar = try SSKProtoAttachmentPointer.parseProto(proto.avatar)
|
||||
}
|
||||
|
@ -2032,7 +2025,7 @@ extension SSKProtoDataMessageContactAvatar.SSKProtoDataMessageContactAvatarBuild
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage.Contact()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setName(_ valueParam: SSKProtoDataMessageContactName) {
|
||||
proto.name = valueParam.proto
|
||||
|
@ -2132,7 +2125,7 @@ extension SSKProtoDataMessageContactAvatar.SSKProtoDataMessageContactAvatarBuild
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_DataMessage.Contact) throws -> SSKProtoDataMessageContact {
|
||||
var name: SSKProtoDataMessageContactName?
|
||||
var name: SSKProtoDataMessageContactName? = nil
|
||||
if proto.hasName {
|
||||
name = try SSKProtoDataMessageContactName.parseProto(proto.name)
|
||||
}
|
||||
|
@ -2146,7 +2139,7 @@ extension SSKProtoDataMessageContactAvatar.SSKProtoDataMessageContactAvatarBuild
|
|||
var address: [SSKProtoDataMessageContactPostalAddress] = []
|
||||
address = try proto.address.map { try SSKProtoDataMessageContactPostalAddress.parseProto($0) }
|
||||
|
||||
var avatar: SSKProtoDataMessageContactAvatar?
|
||||
var avatar: SSKProtoDataMessageContactAvatar? = nil
|
||||
if proto.hasAvatar {
|
||||
avatar = try SSKProtoDataMessageContactAvatar.parseProto(proto.avatar)
|
||||
}
|
||||
|
@ -2219,7 +2212,7 @@ extension SSKProtoDataMessageContact.SSKProtoDataMessageContactBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_DataMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setBody(_ valueParam: String) {
|
||||
proto.body = valueParam
|
||||
|
@ -2355,12 +2348,12 @@ extension SSKProtoDataMessageContact.SSKProtoDataMessageContactBuilder {
|
|||
var attachments: [SSKProtoAttachmentPointer] = []
|
||||
attachments = try proto.attachments.map { try SSKProtoAttachmentPointer.parseProto($0) }
|
||||
|
||||
var group: SSKProtoGroupContext?
|
||||
var group: SSKProtoGroupContext? = nil
|
||||
if proto.hasGroup {
|
||||
group = try SSKProtoGroupContext.parseProto(proto.group)
|
||||
}
|
||||
|
||||
var quote: SSKProtoDataMessageQuote?
|
||||
var quote: SSKProtoDataMessageQuote? = nil
|
||||
if proto.hasQuote {
|
||||
quote = try SSKProtoDataMessageQuote.parseProto(proto.quote)
|
||||
}
|
||||
|
@ -2411,7 +2404,7 @@ extension SSKProtoDataMessage.SSKProtoDataMessageBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_NullMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setPadding(_ valueParam: Data) {
|
||||
proto.padding = valueParam
|
||||
|
@ -2505,18 +2498,17 @@ extension SSKProtoNullMessage.SSKProtoNullMessageBuilder {
|
|||
|
||||
// MARK: - SSKProtoReceiptMessageBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoReceiptMessageBuilder {
|
||||
return SSKProtoReceiptMessageBuilder()
|
||||
@objc public class func builder(type: SSKProtoReceiptMessageType) -> SSKProtoReceiptMessageBuilder {
|
||||
return SSKProtoReceiptMessageBuilder(type: type)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoReceiptMessageBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_ReceiptMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(type: SSKProtoReceiptMessageType) {
|
||||
@objc fileprivate init(type: SSKProtoReceiptMessageType) {
|
||||
super.init()
|
||||
|
||||
setType(type)
|
||||
|
@ -2631,18 +2623,17 @@ extension SSKProtoReceiptMessage.SSKProtoReceiptMessageBuilder {
|
|||
|
||||
// MARK: - SSKProtoVerifiedBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoVerifiedBuilder {
|
||||
return SSKProtoVerifiedBuilder()
|
||||
@objc public class func builder(destination: String) -> SSKProtoVerifiedBuilder {
|
||||
return SSKProtoVerifiedBuilder(destination: destination)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoVerifiedBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_Verified()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(destination: String) {
|
||||
@objc fileprivate init(destination: String) {
|
||||
super.init()
|
||||
|
||||
setDestination(destination)
|
||||
|
@ -2766,7 +2757,7 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Sent()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setDestination(_ valueParam: String) {
|
||||
proto.destination = valueParam
|
||||
|
@ -2838,7 +2829,7 @@ extension SSKProtoVerified.SSKProtoVerifiedBuilder {
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_SyncMessage.Sent) throws -> SSKProtoSyncMessageSent {
|
||||
var message: SSKProtoDataMessage?
|
||||
var message: SSKProtoDataMessage? = nil
|
||||
if proto.hasMessage {
|
||||
message = try SSKProtoDataMessage.parseProto(proto.message)
|
||||
}
|
||||
|
@ -2875,18 +2866,17 @@ extension SSKProtoSyncMessageSent.SSKProtoSyncMessageSentBuilder {
|
|||
|
||||
// MARK: - SSKProtoSyncMessageContactsBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoSyncMessageContactsBuilder {
|
||||
return SSKProtoSyncMessageContactsBuilder()
|
||||
@objc public class func builder(blob: SSKProtoAttachmentPointer) -> SSKProtoSyncMessageContactsBuilder {
|
||||
return SSKProtoSyncMessageContactsBuilder(blob: blob)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoSyncMessageContactsBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Contacts()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(blob: SSKProtoAttachmentPointer) {
|
||||
@objc fileprivate init(blob: SSKProtoAttachmentPointer) {
|
||||
super.init()
|
||||
|
||||
setBlob(blob)
|
||||
|
@ -2982,7 +2972,7 @@ extension SSKProtoSyncMessageContacts.SSKProtoSyncMessageContactsBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Groups()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setBlob(_ valueParam: SSKProtoAttachmentPointer) {
|
||||
proto.blob = valueParam.proto
|
||||
|
@ -3018,7 +3008,7 @@ extension SSKProtoSyncMessageContacts.SSKProtoSyncMessageContactsBuilder {
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_SyncMessage.Groups) throws -> SSKProtoSyncMessageGroups {
|
||||
var blob: SSKProtoAttachmentPointer?
|
||||
var blob: SSKProtoAttachmentPointer? = nil
|
||||
if proto.hasBlob {
|
||||
blob = try SSKProtoAttachmentPointer.parseProto(proto.blob)
|
||||
}
|
||||
|
@ -3063,7 +3053,7 @@ extension SSKProtoSyncMessageGroups.SSKProtoSyncMessageGroupsBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Blocked()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func addNumbers(_ valueParam: String) {
|
||||
var items = proto.numbers
|
||||
|
@ -3180,18 +3170,17 @@ extension SSKProtoSyncMessageBlocked.SSKProtoSyncMessageBlockedBuilder {
|
|||
|
||||
// MARK: - SSKProtoSyncMessageRequestBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoSyncMessageRequestBuilder {
|
||||
return SSKProtoSyncMessageRequestBuilder()
|
||||
@objc public class func builder(type: SSKProtoSyncMessageRequestType) -> SSKProtoSyncMessageRequestBuilder {
|
||||
return SSKProtoSyncMessageRequestBuilder(type: type)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoSyncMessageRequestBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Request()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(type: SSKProtoSyncMessageRequestType) {
|
||||
@objc fileprivate init(type: SSKProtoSyncMessageRequestType) {
|
||||
super.init()
|
||||
|
||||
setType(type)
|
||||
|
@ -3268,18 +3257,17 @@ extension SSKProtoSyncMessageRequest.SSKProtoSyncMessageRequestBuilder {
|
|||
|
||||
// MARK: - SSKProtoSyncMessageReadBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoSyncMessageReadBuilder {
|
||||
return SSKProtoSyncMessageReadBuilder()
|
||||
@objc public class func builder(sender: String, timestamp: UInt64) -> SSKProtoSyncMessageReadBuilder {
|
||||
return SSKProtoSyncMessageReadBuilder(sender: sender, timestamp: timestamp)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoSyncMessageReadBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Read()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(sender: String, timestamp: UInt64) {
|
||||
@objc fileprivate init(sender: String, timestamp: UInt64) {
|
||||
super.init()
|
||||
|
||||
setSender(sender)
|
||||
|
@ -3379,7 +3367,7 @@ extension SSKProtoSyncMessageRead.SSKProtoSyncMessageReadBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_SyncMessage.Configuration()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setReadReceipts(_ valueParam: Bool) {
|
||||
proto.readReceipts = valueParam
|
||||
|
@ -3457,7 +3445,7 @@ extension SSKProtoSyncMessageConfiguration.SSKProtoSyncMessageConfigurationBuild
|
|||
|
||||
private var proto = SignalServiceProtos_SyncMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setSent(_ valueParam: SSKProtoSyncMessageSent) {
|
||||
proto.sent = valueParam.proto
|
||||
|
@ -3569,22 +3557,22 @@ extension SSKProtoSyncMessageConfiguration.SSKProtoSyncMessageConfigurationBuild
|
|||
}
|
||||
|
||||
fileprivate class func parseProto(_ proto: SignalServiceProtos_SyncMessage) throws -> SSKProtoSyncMessage {
|
||||
var sent: SSKProtoSyncMessageSent?
|
||||
var sent: SSKProtoSyncMessageSent? = nil
|
||||
if proto.hasSent {
|
||||
sent = try SSKProtoSyncMessageSent.parseProto(proto.sent)
|
||||
}
|
||||
|
||||
var contacts: SSKProtoSyncMessageContacts?
|
||||
var contacts: SSKProtoSyncMessageContacts? = nil
|
||||
if proto.hasContacts {
|
||||
contacts = try SSKProtoSyncMessageContacts.parseProto(proto.contacts)
|
||||
}
|
||||
|
||||
var groups: SSKProtoSyncMessageGroups?
|
||||
var groups: SSKProtoSyncMessageGroups? = nil
|
||||
if proto.hasGroups {
|
||||
groups = try SSKProtoSyncMessageGroups.parseProto(proto.groups)
|
||||
}
|
||||
|
||||
var request: SSKProtoSyncMessageRequest?
|
||||
var request: SSKProtoSyncMessageRequest? = nil
|
||||
if proto.hasRequest {
|
||||
request = try SSKProtoSyncMessageRequest.parseProto(proto.request)
|
||||
}
|
||||
|
@ -3592,17 +3580,17 @@ extension SSKProtoSyncMessageConfiguration.SSKProtoSyncMessageConfigurationBuild
|
|||
var read: [SSKProtoSyncMessageRead] = []
|
||||
read = try proto.read.map { try SSKProtoSyncMessageRead.parseProto($0) }
|
||||
|
||||
var blocked: SSKProtoSyncMessageBlocked?
|
||||
var blocked: SSKProtoSyncMessageBlocked? = nil
|
||||
if proto.hasBlocked {
|
||||
blocked = try SSKProtoSyncMessageBlocked.parseProto(proto.blocked)
|
||||
}
|
||||
|
||||
var verified: SSKProtoVerified?
|
||||
var verified: SSKProtoVerified? = nil
|
||||
if proto.hasVerified {
|
||||
verified = try SSKProtoVerified.parseProto(proto.verified)
|
||||
}
|
||||
|
||||
var configuration: SSKProtoSyncMessageConfiguration?
|
||||
var configuration: SSKProtoSyncMessageConfiguration? = nil
|
||||
if proto.hasConfiguration {
|
||||
configuration = try SSKProtoSyncMessageConfiguration.parseProto(proto.configuration)
|
||||
}
|
||||
|
@ -3664,18 +3652,17 @@ extension SSKProtoSyncMessage.SSKProtoSyncMessageBuilder {
|
|||
|
||||
// MARK: - SSKProtoAttachmentPointerBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoAttachmentPointerBuilder {
|
||||
return SSKProtoAttachmentPointerBuilder()
|
||||
@objc public class func builder(id: UInt64) -> SSKProtoAttachmentPointerBuilder {
|
||||
return SSKProtoAttachmentPointerBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoAttachmentPointerBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_AttachmentPointer()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: UInt64) {
|
||||
@objc fileprivate init(id: UInt64) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -3896,18 +3883,17 @@ extension SSKProtoAttachmentPointer.SSKProtoAttachmentPointerBuilder {
|
|||
|
||||
// MARK: - SSKProtoGroupContextBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoGroupContextBuilder {
|
||||
return SSKProtoGroupContextBuilder()
|
||||
@objc public class func builder(id: Data, type: SSKProtoGroupContextType) -> SSKProtoGroupContextBuilder {
|
||||
return SSKProtoGroupContextBuilder(id: id, type: type)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoGroupContextBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_GroupContext()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: Data, type: SSKProtoGroupContextType) {
|
||||
@objc fileprivate init(id: Data, type: SSKProtoGroupContextType) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -4002,7 +3988,7 @@ extension SSKProtoAttachmentPointer.SSKProtoAttachmentPointerBuilder {
|
|||
}
|
||||
let type = SSKProtoGroupContextTypeWrap(proto.type)
|
||||
|
||||
var avatar: SSKProtoAttachmentPointer?
|
||||
var avatar: SSKProtoAttachmentPointer? = nil
|
||||
if proto.hasAvatar {
|
||||
avatar = try SSKProtoAttachmentPointer.parseProto(proto.avatar)
|
||||
}
|
||||
|
@ -4049,7 +4035,7 @@ extension SSKProtoGroupContext.SSKProtoGroupContextBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_ContactDetails.Avatar()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setContentType(_ valueParam: String) {
|
||||
proto.contentType = valueParam
|
||||
|
@ -4133,18 +4119,17 @@ extension SSKProtoContactDetailsAvatar.SSKProtoContactDetailsAvatarBuilder {
|
|||
|
||||
// MARK: - SSKProtoContactDetailsBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoContactDetailsBuilder {
|
||||
return SSKProtoContactDetailsBuilder()
|
||||
@objc public class func builder(number: String) -> SSKProtoContactDetailsBuilder {
|
||||
return SSKProtoContactDetailsBuilder(number: number)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoContactDetailsBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_ContactDetails()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(number: String) {
|
||||
@objc fileprivate init(number: String) {
|
||||
super.init()
|
||||
|
||||
setNumber(number)
|
||||
|
@ -4269,12 +4254,12 @@ extension SSKProtoContactDetailsAvatar.SSKProtoContactDetailsAvatarBuilder {
|
|||
}
|
||||
let number = proto.number
|
||||
|
||||
var avatar: SSKProtoContactDetailsAvatar?
|
||||
var avatar: SSKProtoContactDetailsAvatar? = nil
|
||||
if proto.hasAvatar {
|
||||
avatar = try SSKProtoContactDetailsAvatar.parseProto(proto.avatar)
|
||||
}
|
||||
|
||||
var verified: SSKProtoVerified?
|
||||
var verified: SSKProtoVerified? = nil
|
||||
if proto.hasVerified {
|
||||
verified = try SSKProtoVerified.parseProto(proto.verified)
|
||||
}
|
||||
|
@ -4321,7 +4306,7 @@ extension SSKProtoContactDetails.SSKProtoContactDetailsBuilder {
|
|||
|
||||
private var proto = SignalServiceProtos_GroupDetails.Avatar()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func setContentType(_ valueParam: String) {
|
||||
proto.contentType = valueParam
|
||||
|
@ -4405,18 +4390,17 @@ extension SSKProtoGroupDetailsAvatar.SSKProtoGroupDetailsAvatarBuilder {
|
|||
|
||||
// MARK: - SSKProtoGroupDetailsBuilder
|
||||
|
||||
@objc public class func builder() -> SSKProtoGroupDetailsBuilder {
|
||||
return SSKProtoGroupDetailsBuilder()
|
||||
@objc public class func builder(id: Data) -> SSKProtoGroupDetailsBuilder {
|
||||
return SSKProtoGroupDetailsBuilder(id: id)
|
||||
}
|
||||
|
||||
@objc public class SSKProtoGroupDetailsBuilder: NSObject {
|
||||
|
||||
private var proto = SignalServiceProtos_GroupDetails()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(id: Data) {
|
||||
@objc fileprivate init(id: Data) {
|
||||
super.init()
|
||||
|
||||
setId(id)
|
||||
|
@ -4544,7 +4528,7 @@ extension SSKProtoGroupDetailsAvatar.SSKProtoGroupDetailsAvatarBuilder {
|
|||
}
|
||||
let id = proto.id
|
||||
|
||||
var avatar: SSKProtoGroupDetailsAvatar?
|
||||
var avatar: SSKProtoGroupDetailsAvatar? = nil
|
||||
if proto.hasAvatar {
|
||||
avatar = try SSKProtoGroupDetailsAvatar.parseProto(proto.avatar)
|
||||
}
|
||||
|
|
|
@ -46,18 +46,17 @@ public enum SignalIOSProtoError: Error {
|
|||
|
||||
// MARK: - SignalIOSProtoBackupSnapshotBackupEntityBuilder
|
||||
|
||||
@objc public class func builder() -> SignalIOSProtoBackupSnapshotBackupEntityBuilder {
|
||||
return SignalIOSProtoBackupSnapshotBackupEntityBuilder()
|
||||
@objc public class func builder(type: SignalIOSProtoBackupSnapshotBackupEntityType, entityData: Data) -> SignalIOSProtoBackupSnapshotBackupEntityBuilder {
|
||||
return SignalIOSProtoBackupSnapshotBackupEntityBuilder(type: type, entityData: entityData)
|
||||
}
|
||||
|
||||
@objc public class SignalIOSProtoBackupSnapshotBackupEntityBuilder: NSObject {
|
||||
|
||||
private var proto = IOSProtos_BackupSnapshot.BackupEntity()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(type: SignalIOSProtoBackupSnapshotBackupEntityType, entityData: Data) {
|
||||
@objc fileprivate init(type: SignalIOSProtoBackupSnapshotBackupEntityType, entityData: Data) {
|
||||
super.init()
|
||||
|
||||
setType(type)
|
||||
|
@ -157,7 +156,7 @@ extension SignalIOSProtoBackupSnapshotBackupEntity.SignalIOSProtoBackupSnapshotB
|
|||
|
||||
private var proto = IOSProtos_BackupSnapshot()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
@objc public func addEntity(_ valueParam: SignalIOSProtoBackupSnapshotBackupEntity) {
|
||||
var items = proto.entity
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
// DO NOT EDIT.
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: SignalService.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documenation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
//*
|
||||
// Copyright (C) 2014-2016 Open Whisper Systems
|
||||
|
@ -18,7 +22,7 @@ import SwiftProtobuf
|
|||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that your are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
private struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
@ -136,13 +140,13 @@ struct SignalServiceProtos_Envelope {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _type: SignalServiceProtos_Envelope.TypeEnum?
|
||||
fileprivate var _source: String?
|
||||
fileprivate var _sourceDevice: UInt32?
|
||||
fileprivate var _relay: String?
|
||||
fileprivate var _timestamp: UInt64?
|
||||
fileprivate var _legacyMessage: Data?
|
||||
fileprivate var _content: Data?
|
||||
fileprivate var _type: SignalServiceProtos_Envelope.TypeEnum? = nil
|
||||
fileprivate var _source: String? = nil
|
||||
fileprivate var _sourceDevice: UInt32? = nil
|
||||
fileprivate var _relay: String? = nil
|
||||
fileprivate var _timestamp: UInt64? = nil
|
||||
fileprivate var _legacyMessage: Data? = nil
|
||||
fileprivate var _content: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
@ -300,8 +304,8 @@ struct SignalServiceProtos_CallMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _sessionDescription: String?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _sessionDescription: String? = nil
|
||||
}
|
||||
|
||||
struct Answer {
|
||||
|
@ -335,8 +339,8 @@ struct SignalServiceProtos_CallMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _sessionDescription: String?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _sessionDescription: String? = nil
|
||||
}
|
||||
|
||||
struct IceUpdate {
|
||||
|
@ -388,10 +392,10 @@ struct SignalServiceProtos_CallMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _sdpMid: String?
|
||||
fileprivate var _sdpMlineIndex: UInt32?
|
||||
fileprivate var _sdp: String?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _sdpMid: String? = nil
|
||||
fileprivate var _sdpMlineIndex: UInt32? = nil
|
||||
fileprivate var _sdp: String? = nil
|
||||
}
|
||||
|
||||
struct Busy {
|
||||
|
@ -413,7 +417,7 @@ struct SignalServiceProtos_CallMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
}
|
||||
|
||||
struct Hangup {
|
||||
|
@ -435,7 +439,7 @@ struct SignalServiceProtos_CallMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
@ -663,9 +667,9 @@ struct SignalServiceProtos_DataMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _author: String?
|
||||
fileprivate var _text: String?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _author: String? = nil
|
||||
fileprivate var _text: String? = nil
|
||||
}
|
||||
|
||||
struct Contact {
|
||||
|
@ -780,12 +784,12 @@ struct SignalServiceProtos_DataMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _givenName: String?
|
||||
fileprivate var _familyName: String?
|
||||
fileprivate var _prefix: String?
|
||||
fileprivate var _suffix: String?
|
||||
fileprivate var _middleName: String?
|
||||
fileprivate var _displayName: String?
|
||||
fileprivate var _givenName: String? = nil
|
||||
fileprivate var _familyName: String? = nil
|
||||
fileprivate var _prefix: String? = nil
|
||||
fileprivate var _suffix: String? = nil
|
||||
fileprivate var _middleName: String? = nil
|
||||
fileprivate var _displayName: String? = nil
|
||||
}
|
||||
|
||||
struct Phone {
|
||||
|
@ -856,9 +860,9 @@ struct SignalServiceProtos_DataMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _value: String?
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum?
|
||||
fileprivate var _label: String?
|
||||
fileprivate var _value: String? = nil
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum? = nil
|
||||
fileprivate var _label: String? = nil
|
||||
}
|
||||
|
||||
struct Email {
|
||||
|
@ -929,9 +933,9 @@ struct SignalServiceProtos_DataMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _value: String?
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Email.TypeEnum?
|
||||
fileprivate var _label: String?
|
||||
fileprivate var _value: String? = nil
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.Email.TypeEnum? = nil
|
||||
fileprivate var _label: String? = nil
|
||||
}
|
||||
|
||||
struct PostalAddress {
|
||||
|
@ -1053,15 +1057,15 @@ struct SignalServiceProtos_DataMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum?
|
||||
fileprivate var _label: String?
|
||||
fileprivate var _street: String?
|
||||
fileprivate var _pobox: String?
|
||||
fileprivate var _neighborhood: String?
|
||||
fileprivate var _city: String?
|
||||
fileprivate var _region: String?
|
||||
fileprivate var _postcode: String?
|
||||
fileprivate var _country: String?
|
||||
fileprivate var _type: SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum? = nil
|
||||
fileprivate var _label: String? = nil
|
||||
fileprivate var _street: String? = nil
|
||||
fileprivate var _pobox: String? = nil
|
||||
fileprivate var _neighborhood: String? = nil
|
||||
fileprivate var _city: String? = nil
|
||||
fileprivate var _region: String? = nil
|
||||
fileprivate var _postcode: String? = nil
|
||||
fileprivate var _country: String? = nil
|
||||
}
|
||||
|
||||
struct Avatar {
|
||||
|
@ -1130,7 +1134,7 @@ struct SignalServiceProtos_NullMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _padding: Data?
|
||||
fileprivate var _padding: Data? = nil
|
||||
}
|
||||
|
||||
struct SignalServiceProtos_ReceiptMessage {
|
||||
|
@ -1180,7 +1184,7 @@ struct SignalServiceProtos_ReceiptMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _type: SignalServiceProtos_ReceiptMessage.TypeEnum?
|
||||
fileprivate var _type: SignalServiceProtos_ReceiptMessage.TypeEnum? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
@ -1266,10 +1270,10 @@ struct SignalServiceProtos_Verified {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _destination: String?
|
||||
fileprivate var _identityKey: Data?
|
||||
fileprivate var _state: SignalServiceProtos_Verified.State?
|
||||
fileprivate var _nullMessage: Data?
|
||||
fileprivate var _destination: String? = nil
|
||||
fileprivate var _identityKey: Data? = nil
|
||||
fileprivate var _state: SignalServiceProtos_Verified.State? = nil
|
||||
fileprivate var _nullMessage: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
@ -1533,7 +1537,7 @@ struct SignalServiceProtos_SyncMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _type: SignalServiceProtos_SyncMessage.Request.TypeEnum?
|
||||
fileprivate var _type: SignalServiceProtos_SyncMessage.Request.TypeEnum? = nil
|
||||
}
|
||||
|
||||
struct Read {
|
||||
|
@ -1565,8 +1569,8 @@ struct SignalServiceProtos_SyncMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _sender: String?
|
||||
fileprivate var _timestamp: UInt64?
|
||||
fileprivate var _sender: String? = nil
|
||||
fileprivate var _timestamp: UInt64? = nil
|
||||
}
|
||||
|
||||
struct Configuration {
|
||||
|
@ -1587,7 +1591,7 @@ struct SignalServiceProtos_SyncMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _readReceipts: Bool?
|
||||
fileprivate var _readReceipts: Bool? = nil
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
@ -1718,16 +1722,16 @@ struct SignalServiceProtos_AttachmentPointer {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _id: UInt64?
|
||||
fileprivate var _contentType: String?
|
||||
fileprivate var _key: Data?
|
||||
fileprivate var _size: UInt32?
|
||||
fileprivate var _thumbnail: Data?
|
||||
fileprivate var _digest: Data?
|
||||
fileprivate var _fileName: String?
|
||||
fileprivate var _flags: UInt32?
|
||||
fileprivate var _width: UInt32?
|
||||
fileprivate var _height: UInt32?
|
||||
fileprivate var _id: UInt64? = nil
|
||||
fileprivate var _contentType: String? = nil
|
||||
fileprivate var _key: Data? = nil
|
||||
fileprivate var _size: UInt32? = nil
|
||||
fileprivate var _thumbnail: Data? = nil
|
||||
fileprivate var _digest: Data? = nil
|
||||
fileprivate var _fileName: String? = nil
|
||||
fileprivate var _flags: UInt32? = nil
|
||||
fileprivate var _width: UInt32? = nil
|
||||
fileprivate var _height: UInt32? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
@ -1943,8 +1947,8 @@ struct SignalServiceProtos_ContactDetails {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _contentType: String?
|
||||
fileprivate var _length: UInt32?
|
||||
fileprivate var _contentType: String? = nil
|
||||
fileprivate var _length: UInt32? = nil
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
@ -2055,8 +2059,8 @@ struct SignalServiceProtos_GroupDetails {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _contentType: String?
|
||||
fileprivate var _length: UInt32?
|
||||
fileprivate var _contentType: String? = nil
|
||||
fileprivate var _length: UInt32? = nil
|
||||
}
|
||||
|
||||
init() {}
|
||||
|
@ -2066,7 +2070,7 @@ struct SignalServiceProtos_GroupDetails {
|
|||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
private let _protobuf_package = "SignalServiceProtos"
|
||||
fileprivate let _protobuf_package = "SignalServiceProtos"
|
||||
|
||||
extension SignalServiceProtos_Envelope: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Envelope"
|
||||
|
@ -2077,7 +2081,7 @@ extension SignalServiceProtos_Envelope: SwiftProtobuf.Message, SwiftProtobuf._Me
|
|||
3: .same(proto: "relay"),
|
||||
5: .same(proto: "timestamp"),
|
||||
6: .same(proto: "legacyMessage"),
|
||||
8: .same(proto: "content")
|
||||
8: .same(proto: "content"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2139,7 +2143,7 @@ extension SignalServiceProtos_Envelope.TypeEnum: SwiftProtobuf._ProtoNameProvidi
|
|||
1: .same(proto: "CIPHERTEXT"),
|
||||
2: .same(proto: "KEY_EXCHANGE"),
|
||||
3: .same(proto: "PREKEY_BUNDLE"),
|
||||
5: .same(proto: "RECEIPT")
|
||||
5: .same(proto: "RECEIPT"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -2150,15 +2154,15 @@ extension SignalServiceProtos_Content: SwiftProtobuf.Message, SwiftProtobuf._Mes
|
|||
2: .same(proto: "syncMessage"),
|
||||
3: .same(proto: "callMessage"),
|
||||
4: .same(proto: "nullMessage"),
|
||||
5: .same(proto: "receiptMessage")
|
||||
5: .same(proto: "receiptMessage"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _dataMessage: SignalServiceProtos_DataMessage?
|
||||
var _syncMessage: SignalServiceProtos_SyncMessage?
|
||||
var _callMessage: SignalServiceProtos_CallMessage?
|
||||
var _nullMessage: SignalServiceProtos_NullMessage?
|
||||
var _receiptMessage: SignalServiceProtos_ReceiptMessage?
|
||||
var _dataMessage: SignalServiceProtos_DataMessage? = nil
|
||||
var _syncMessage: SignalServiceProtos_SyncMessage? = nil
|
||||
var _callMessage: SignalServiceProtos_CallMessage? = nil
|
||||
var _nullMessage: SignalServiceProtos_NullMessage? = nil
|
||||
var _receiptMessage: SignalServiceProtos_ReceiptMessage? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -2244,16 +2248,16 @@ extension SignalServiceProtos_CallMessage: SwiftProtobuf.Message, SwiftProtobuf.
|
|||
3: .same(proto: "iceUpdate"),
|
||||
4: .same(proto: "hangup"),
|
||||
5: .same(proto: "busy"),
|
||||
6: .same(proto: "profileKey")
|
||||
6: .same(proto: "profileKey"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _offer: SignalServiceProtos_CallMessage.Offer?
|
||||
var _answer: SignalServiceProtos_CallMessage.Answer?
|
||||
var _offer: SignalServiceProtos_CallMessage.Offer? = nil
|
||||
var _answer: SignalServiceProtos_CallMessage.Answer? = nil
|
||||
var _iceUpdate: [SignalServiceProtos_CallMessage.IceUpdate] = []
|
||||
var _hangup: SignalServiceProtos_CallMessage.Hangup?
|
||||
var _busy: SignalServiceProtos_CallMessage.Busy?
|
||||
var _profileKey: Data?
|
||||
var _hangup: SignalServiceProtos_CallMessage.Hangup? = nil
|
||||
var _busy: SignalServiceProtos_CallMessage.Busy? = nil
|
||||
var _profileKey: Data? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -2341,7 +2345,7 @@ extension SignalServiceProtos_CallMessage.Offer: SwiftProtobuf.Message, SwiftPro
|
|||
static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Offer"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "id"),
|
||||
2: .same(proto: "sessionDescription")
|
||||
2: .same(proto: "sessionDescription"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2376,7 +2380,7 @@ extension SignalServiceProtos_CallMessage.Answer: SwiftProtobuf.Message, SwiftPr
|
|||
static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Answer"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "id"),
|
||||
2: .same(proto: "sessionDescription")
|
||||
2: .same(proto: "sessionDescription"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2413,7 +2417,7 @@ extension SignalServiceProtos_CallMessage.IceUpdate: SwiftProtobuf.Message, Swif
|
|||
1: .same(proto: "id"),
|
||||
2: .same(proto: "sdpMid"),
|
||||
3: .same(proto: "sdpMLineIndex"),
|
||||
4: .same(proto: "sdp")
|
||||
4: .same(proto: "sdp"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2457,7 +2461,7 @@ extension SignalServiceProtos_CallMessage.IceUpdate: SwiftProtobuf.Message, Swif
|
|||
extension SignalServiceProtos_CallMessage.Busy: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Busy"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "id")
|
||||
1: .same(proto: "id"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2486,7 +2490,7 @@ extension SignalServiceProtos_CallMessage.Busy: SwiftProtobuf.Message, SwiftProt
|
|||
extension SignalServiceProtos_CallMessage.Hangup: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = SignalServiceProtos_CallMessage.protoMessageName + ".Hangup"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "id")
|
||||
1: .same(proto: "id"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2523,18 +2527,18 @@ extension SignalServiceProtos_DataMessage: SwiftProtobuf.Message, SwiftProtobuf.
|
|||
6: .same(proto: "profileKey"),
|
||||
7: .same(proto: "timestamp"),
|
||||
8: .same(proto: "quote"),
|
||||
9: .same(proto: "contact")
|
||||
9: .same(proto: "contact"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _body: String?
|
||||
var _body: String? = nil
|
||||
var _attachments: [SignalServiceProtos_AttachmentPointer] = []
|
||||
var _group: SignalServiceProtos_GroupContext?
|
||||
var _flags: UInt32?
|
||||
var _expireTimer: UInt32?
|
||||
var _profileKey: Data?
|
||||
var _timestamp: UInt64?
|
||||
var _quote: SignalServiceProtos_DataMessage.Quote?
|
||||
var _group: SignalServiceProtos_GroupContext? = nil
|
||||
var _flags: UInt32? = nil
|
||||
var _expireTimer: UInt32? = nil
|
||||
var _profileKey: Data? = nil
|
||||
var _timestamp: UInt64? = nil
|
||||
var _quote: SignalServiceProtos_DataMessage.Quote? = nil
|
||||
var _contact: [SignalServiceProtos_DataMessage.Contact] = []
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
@ -2641,7 +2645,7 @@ extension SignalServiceProtos_DataMessage.Flags: SwiftProtobuf._ProtoNameProvidi
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "END_SESSION"),
|
||||
2: .same(proto: "EXPIRATION_TIMER_UPDATE"),
|
||||
4: .same(proto: "PROFILE_KEY_UPDATE")
|
||||
4: .same(proto: "PROFILE_KEY_UPDATE"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -2651,7 +2655,7 @@ extension SignalServiceProtos_DataMessage.Quote: SwiftProtobuf.Message, SwiftPro
|
|||
1: .same(proto: "id"),
|
||||
2: .same(proto: "author"),
|
||||
3: .same(proto: "text"),
|
||||
4: .same(proto: "attachments")
|
||||
4: .same(proto: "attachments"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2698,14 +2702,14 @@ extension SignalServiceProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf.
|
|||
1: .same(proto: "contentType"),
|
||||
2: .same(proto: "fileName"),
|
||||
3: .same(proto: "thumbnail"),
|
||||
4: .same(proto: "flags")
|
||||
4: .same(proto: "flags"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _contentType: String?
|
||||
var _fileName: String?
|
||||
var _thumbnail: SignalServiceProtos_AttachmentPointer?
|
||||
var _flags: UInt32?
|
||||
var _contentType: String? = nil
|
||||
var _fileName: String? = nil
|
||||
var _thumbnail: SignalServiceProtos_AttachmentPointer? = nil
|
||||
var _flags: UInt32? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -2779,7 +2783,7 @@ extension SignalServiceProtos_DataMessage.Quote.QuotedAttachment: SwiftProtobuf.
|
|||
|
||||
extension SignalServiceProtos_DataMessage.Quote.QuotedAttachment.Flags: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "VOICE_MESSAGE")
|
||||
1: .same(proto: "VOICE_MESSAGE"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -2791,16 +2795,16 @@ extension SignalServiceProtos_DataMessage.Contact: SwiftProtobuf.Message, SwiftP
|
|||
4: .same(proto: "email"),
|
||||
5: .same(proto: "address"),
|
||||
6: .same(proto: "avatar"),
|
||||
7: .same(proto: "organization")
|
||||
7: .same(proto: "organization"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _name: SignalServiceProtos_DataMessage.Contact.Name?
|
||||
var _name: SignalServiceProtos_DataMessage.Contact.Name? = nil
|
||||
var _number: [SignalServiceProtos_DataMessage.Contact.Phone] = []
|
||||
var _email: [SignalServiceProtos_DataMessage.Contact.Email] = []
|
||||
var _address: [SignalServiceProtos_DataMessage.Contact.PostalAddress] = []
|
||||
var _avatar: SignalServiceProtos_DataMessage.Contact.Avatar?
|
||||
var _organization: String?
|
||||
var _avatar: SignalServiceProtos_DataMessage.Contact.Avatar? = nil
|
||||
var _organization: String? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -2892,7 +2896,7 @@ extension SignalServiceProtos_DataMessage.Contact.Name: SwiftProtobuf.Message, S
|
|||
3: .same(proto: "prefix"),
|
||||
4: .same(proto: "suffix"),
|
||||
5: .same(proto: "middleName"),
|
||||
6: .same(proto: "displayName")
|
||||
6: .same(proto: "displayName"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2948,7 +2952,7 @@ extension SignalServiceProtos_DataMessage.Contact.Phone: SwiftProtobuf.Message,
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "value"),
|
||||
2: .same(proto: "type"),
|
||||
3: .same(proto: "label")
|
||||
3: .same(proto: "label"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -2989,7 +2993,7 @@ extension SignalServiceProtos_DataMessage.Contact.Phone.TypeEnum: SwiftProtobuf.
|
|||
1: .same(proto: "HOME"),
|
||||
2: .same(proto: "MOBILE"),
|
||||
3: .same(proto: "WORK"),
|
||||
4: .same(proto: "CUSTOM")
|
||||
4: .same(proto: "CUSTOM"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -2998,7 +3002,7 @@ extension SignalServiceProtos_DataMessage.Contact.Email: SwiftProtobuf.Message,
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "value"),
|
||||
2: .same(proto: "type"),
|
||||
3: .same(proto: "label")
|
||||
3: .same(proto: "label"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3039,7 +3043,7 @@ extension SignalServiceProtos_DataMessage.Contact.Email.TypeEnum: SwiftProtobuf.
|
|||
1: .same(proto: "HOME"),
|
||||
2: .same(proto: "MOBILE"),
|
||||
3: .same(proto: "WORK"),
|
||||
4: .same(proto: "CUSTOM")
|
||||
4: .same(proto: "CUSTOM"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3054,7 +3058,7 @@ extension SignalServiceProtos_DataMessage.Contact.PostalAddress: SwiftProtobuf.M
|
|||
6: .same(proto: "city"),
|
||||
7: .same(proto: "region"),
|
||||
8: .same(proto: "postcode"),
|
||||
9: .same(proto: "country")
|
||||
9: .same(proto: "country"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3124,7 +3128,7 @@ extension SignalServiceProtos_DataMessage.Contact.PostalAddress.TypeEnum: SwiftP
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "HOME"),
|
||||
2: .same(proto: "WORK"),
|
||||
3: .same(proto: "CUSTOM")
|
||||
3: .same(proto: "CUSTOM"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3132,12 +3136,12 @@ extension SignalServiceProtos_DataMessage.Contact.Avatar: SwiftProtobuf.Message,
|
|||
static let protoMessageName: String = SignalServiceProtos_DataMessage.Contact.protoMessageName + ".Avatar"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "avatar"),
|
||||
2: .same(proto: "isProfile")
|
||||
2: .same(proto: "isProfile"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _avatar: SignalServiceProtos_AttachmentPointer?
|
||||
var _isProfile: Bool?
|
||||
var _avatar: SignalServiceProtos_AttachmentPointer? = nil
|
||||
var _isProfile: Bool? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3200,7 +3204,7 @@ extension SignalServiceProtos_DataMessage.Contact.Avatar: SwiftProtobuf.Message,
|
|||
extension SignalServiceProtos_NullMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".NullMessage"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "padding")
|
||||
1: .same(proto: "padding"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3230,7 +3234,7 @@ extension SignalServiceProtos_ReceiptMessage: SwiftProtobuf.Message, SwiftProtob
|
|||
static let protoMessageName: String = _protobuf_package + ".ReceiptMessage"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .same(proto: "timestamp")
|
||||
2: .same(proto: "timestamp"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3264,7 +3268,7 @@ extension SignalServiceProtos_ReceiptMessage: SwiftProtobuf.Message, SwiftProtob
|
|||
extension SignalServiceProtos_ReceiptMessage.TypeEnum: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "DELIVERY"),
|
||||
1: .same(proto: "READ")
|
||||
1: .same(proto: "READ"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3274,7 +3278,7 @@ extension SignalServiceProtos_Verified: SwiftProtobuf.Message, SwiftProtobuf._Me
|
|||
1: .same(proto: "destination"),
|
||||
2: .same(proto: "identityKey"),
|
||||
3: .same(proto: "state"),
|
||||
4: .same(proto: "nullMessage")
|
||||
4: .same(proto: "nullMessage"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3319,7 +3323,7 @@ extension SignalServiceProtos_Verified.State: SwiftProtobuf._ProtoNameProviding
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "DEFAULT"),
|
||||
1: .same(proto: "VERIFIED"),
|
||||
2: .same(proto: "UNVERIFIED")
|
||||
2: .same(proto: "UNVERIFIED"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3334,19 +3338,19 @@ extension SignalServiceProtos_SyncMessage: SwiftProtobuf.Message, SwiftProtobuf.
|
|||
6: .same(proto: "blocked"),
|
||||
7: .same(proto: "verified"),
|
||||
9: .same(proto: "configuration"),
|
||||
8: .same(proto: "padding")
|
||||
8: .same(proto: "padding"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _sent: SignalServiceProtos_SyncMessage.Sent?
|
||||
var _contacts: SignalServiceProtos_SyncMessage.Contacts?
|
||||
var _groups: SignalServiceProtos_SyncMessage.Groups?
|
||||
var _request: SignalServiceProtos_SyncMessage.Request?
|
||||
var _sent: SignalServiceProtos_SyncMessage.Sent? = nil
|
||||
var _contacts: SignalServiceProtos_SyncMessage.Contacts? = nil
|
||||
var _groups: SignalServiceProtos_SyncMessage.Groups? = nil
|
||||
var _request: SignalServiceProtos_SyncMessage.Request? = nil
|
||||
var _read: [SignalServiceProtos_SyncMessage.Read] = []
|
||||
var _blocked: SignalServiceProtos_SyncMessage.Blocked?
|
||||
var _verified: SignalServiceProtos_Verified?
|
||||
var _configuration: SignalServiceProtos_SyncMessage.Configuration?
|
||||
var _padding: Data?
|
||||
var _blocked: SignalServiceProtos_SyncMessage.Blocked? = nil
|
||||
var _verified: SignalServiceProtos_Verified? = nil
|
||||
var _configuration: SignalServiceProtos_SyncMessage.Configuration? = nil
|
||||
var _padding: Data? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3454,14 +3458,14 @@ extension SignalServiceProtos_SyncMessage.Sent: SwiftProtobuf.Message, SwiftProt
|
|||
1: .same(proto: "destination"),
|
||||
2: .same(proto: "timestamp"),
|
||||
3: .same(proto: "message"),
|
||||
4: .same(proto: "expirationStartTimestamp")
|
||||
4: .same(proto: "expirationStartTimestamp"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _destination: String?
|
||||
var _timestamp: UInt64?
|
||||
var _message: SignalServiceProtos_DataMessage?
|
||||
var _expirationStartTimestamp: UInt64?
|
||||
var _destination: String? = nil
|
||||
var _timestamp: UInt64? = nil
|
||||
var _message: SignalServiceProtos_DataMessage? = nil
|
||||
var _expirationStartTimestamp: UInt64? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3537,12 +3541,12 @@ extension SignalServiceProtos_SyncMessage.Contacts: SwiftProtobuf.Message, Swift
|
|||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Contacts"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "blob"),
|
||||
2: .same(proto: "isComplete")
|
||||
2: .same(proto: "isComplete"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _blob: SignalServiceProtos_AttachmentPointer?
|
||||
var _isComplete: Bool?
|
||||
var _blob: SignalServiceProtos_AttachmentPointer? = nil
|
||||
var _isComplete: Bool? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3605,11 +3609,11 @@ extension SignalServiceProtos_SyncMessage.Contacts: SwiftProtobuf.Message, Swift
|
|||
extension SignalServiceProtos_SyncMessage.Groups: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Groups"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "blob")
|
||||
1: .same(proto: "blob"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _blob: SignalServiceProtos_AttachmentPointer?
|
||||
var _blob: SignalServiceProtos_AttachmentPointer? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3667,7 +3671,7 @@ extension SignalServiceProtos_SyncMessage.Blocked: SwiftProtobuf.Message, SwiftP
|
|||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Blocked"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "numbers"),
|
||||
2: .same(proto: "groupIds")
|
||||
2: .same(proto: "groupIds"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3701,7 +3705,7 @@ extension SignalServiceProtos_SyncMessage.Blocked: SwiftProtobuf.Message, SwiftP
|
|||
extension SignalServiceProtos_SyncMessage.Request: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Request"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type")
|
||||
1: .same(proto: "type"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3733,7 +3737,7 @@ extension SignalServiceProtos_SyncMessage.Request.TypeEnum: SwiftProtobuf._Proto
|
|||
1: .same(proto: "CONTACTS"),
|
||||
2: .same(proto: "GROUPS"),
|
||||
3: .same(proto: "BLOCKED"),
|
||||
4: .same(proto: "CONFIGURATION")
|
||||
4: .same(proto: "CONFIGURATION"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3741,7 +3745,7 @@ extension SignalServiceProtos_SyncMessage.Read: SwiftProtobuf.Message, SwiftProt
|
|||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Read"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "sender"),
|
||||
2: .same(proto: "timestamp")
|
||||
2: .same(proto: "timestamp"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3775,7 +3779,7 @@ extension SignalServiceProtos_SyncMessage.Read: SwiftProtobuf.Message, SwiftProt
|
|||
extension SignalServiceProtos_SyncMessage.Configuration: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = SignalServiceProtos_SyncMessage.protoMessageName + ".Configuration"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "readReceipts")
|
||||
1: .same(proto: "readReceipts"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3813,7 +3817,7 @@ extension SignalServiceProtos_AttachmentPointer: SwiftProtobuf.Message, SwiftPro
|
|||
7: .same(proto: "fileName"),
|
||||
8: .same(proto: "flags"),
|
||||
9: .same(proto: "width"),
|
||||
10: .same(proto: "height")
|
||||
10: .same(proto: "height"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -3886,7 +3890,7 @@ extension SignalServiceProtos_AttachmentPointer: SwiftProtobuf.Message, SwiftPro
|
|||
|
||||
extension SignalServiceProtos_AttachmentPointer.Flags: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "VOICE_MESSAGE")
|
||||
1: .same(proto: "VOICE_MESSAGE"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -3897,15 +3901,15 @@ extension SignalServiceProtos_GroupContext: SwiftProtobuf.Message, SwiftProtobuf
|
|||
2: .same(proto: "type"),
|
||||
3: .same(proto: "name"),
|
||||
4: .same(proto: "members"),
|
||||
5: .same(proto: "avatar")
|
||||
5: .same(proto: "avatar"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _id: Data?
|
||||
var _type: SignalServiceProtos_GroupContext.TypeEnum?
|
||||
var _name: String?
|
||||
var _id: Data? = nil
|
||||
var _type: SignalServiceProtos_GroupContext.TypeEnum? = nil
|
||||
var _name: String? = nil
|
||||
var _members: [String] = []
|
||||
var _avatar: SignalServiceProtos_AttachmentPointer?
|
||||
var _avatar: SignalServiceProtos_AttachmentPointer? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -3989,7 +3993,7 @@ extension SignalServiceProtos_GroupContext.TypeEnum: SwiftProtobuf._ProtoNamePro
|
|||
1: .same(proto: "UPDATE"),
|
||||
2: .same(proto: "DELIVER"),
|
||||
3: .same(proto: "QUIT"),
|
||||
4: .same(proto: "REQUEST_INFO")
|
||||
4: .same(proto: "REQUEST_INFO"),
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -4003,18 +4007,18 @@ extension SignalServiceProtos_ContactDetails: SwiftProtobuf.Message, SwiftProtob
|
|||
5: .same(proto: "verified"),
|
||||
6: .same(proto: "profileKey"),
|
||||
7: .same(proto: "blocked"),
|
||||
8: .same(proto: "expireTimer")
|
||||
8: .same(proto: "expireTimer"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _number: String?
|
||||
var _name: String?
|
||||
var _avatar: SignalServiceProtos_ContactDetails.Avatar?
|
||||
var _color: String?
|
||||
var _verified: SignalServiceProtos_Verified?
|
||||
var _profileKey: Data?
|
||||
var _blocked: Bool?
|
||||
var _expireTimer: UInt32?
|
||||
var _number: String? = nil
|
||||
var _name: String? = nil
|
||||
var _avatar: SignalServiceProtos_ContactDetails.Avatar? = nil
|
||||
var _color: String? = nil
|
||||
var _verified: SignalServiceProtos_Verified? = nil
|
||||
var _profileKey: Data? = nil
|
||||
var _blocked: Bool? = nil
|
||||
var _expireTimer: UInt32? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -4114,7 +4118,7 @@ extension SignalServiceProtos_ContactDetails.Avatar: SwiftProtobuf.Message, Swif
|
|||
static let protoMessageName: String = SignalServiceProtos_ContactDetails.protoMessageName + ".Avatar"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "contentType"),
|
||||
2: .same(proto: "length")
|
||||
2: .same(proto: "length"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -4155,18 +4159,18 @@ extension SignalServiceProtos_GroupDetails: SwiftProtobuf.Message, SwiftProtobuf
|
|||
5: .same(proto: "active"),
|
||||
6: .same(proto: "expireTimer"),
|
||||
7: .same(proto: "color"),
|
||||
8: .same(proto: "blocked")
|
||||
8: .same(proto: "blocked"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _id: Data?
|
||||
var _name: String?
|
||||
var _id: Data? = nil
|
||||
var _name: String? = nil
|
||||
var _members: [String] = []
|
||||
var _avatar: SignalServiceProtos_GroupDetails.Avatar?
|
||||
var _active: Bool?
|
||||
var _expireTimer: UInt32?
|
||||
var _color: String?
|
||||
var _blocked: Bool?
|
||||
var _avatar: SignalServiceProtos_GroupDetails.Avatar? = nil
|
||||
var _active: Bool? = nil
|
||||
var _expireTimer: UInt32? = nil
|
||||
var _color: String? = nil
|
||||
var _blocked: Bool? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -4266,7 +4270,7 @@ extension SignalServiceProtos_GroupDetails.Avatar: SwiftProtobuf.Message, SwiftP
|
|||
static let protoMessageName: String = SignalServiceProtos_GroupDetails.protoMessageName + ".Avatar"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "contentType"),
|
||||
2: .same(proto: "length")
|
||||
2: .same(proto: "length"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
|
|
@ -16,18 +16,17 @@ public enum WebSocketProtoError: Error {
|
|||
|
||||
// MARK: - WebSocketProtoWebSocketRequestMessageBuilder
|
||||
|
||||
@objc public class func builder() -> WebSocketProtoWebSocketRequestMessageBuilder {
|
||||
return WebSocketProtoWebSocketRequestMessageBuilder()
|
||||
@objc public class func builder(verb: String, path: String, requestID: UInt64) -> WebSocketProtoWebSocketRequestMessageBuilder {
|
||||
return WebSocketProtoWebSocketRequestMessageBuilder(verb: verb, path: path, requestID: requestID)
|
||||
}
|
||||
|
||||
@objc public class WebSocketProtoWebSocketRequestMessageBuilder: NSObject {
|
||||
|
||||
private var proto = WebSocketProtos_WebSocketRequestMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(verb: String, path: String, requestID: UInt64) {
|
||||
@objc fileprivate init(verb: String, path: String, requestID: UInt64) {
|
||||
super.init()
|
||||
|
||||
setVerb(verb)
|
||||
|
@ -162,18 +161,17 @@ extension WebSocketProtoWebSocketRequestMessage.WebSocketProtoWebSocketRequestMe
|
|||
|
||||
// MARK: - WebSocketProtoWebSocketResponseMessageBuilder
|
||||
|
||||
@objc public class func builder() -> WebSocketProtoWebSocketResponseMessageBuilder {
|
||||
return WebSocketProtoWebSocketResponseMessageBuilder()
|
||||
@objc public class func builder(requestID: UInt64, status: UInt32) -> WebSocketProtoWebSocketResponseMessageBuilder {
|
||||
return WebSocketProtoWebSocketResponseMessageBuilder(requestID: requestID, status: status)
|
||||
}
|
||||
|
||||
@objc public class WebSocketProtoWebSocketResponseMessageBuilder: NSObject {
|
||||
|
||||
private var proto = WebSocketProtos_WebSocketResponseMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(requestID: UInt64, status: UInt32) {
|
||||
@objc fileprivate init(requestID: UInt64, status: UInt32) {
|
||||
super.init()
|
||||
|
||||
setRequestID(requestID)
|
||||
|
@ -331,18 +329,17 @@ extension WebSocketProtoWebSocketResponseMessage.WebSocketProtoWebSocketResponse
|
|||
|
||||
// MARK: - WebSocketProtoWebSocketMessageBuilder
|
||||
|
||||
@objc public class func builder() -> WebSocketProtoWebSocketMessageBuilder {
|
||||
return WebSocketProtoWebSocketMessageBuilder()
|
||||
@objc public class func builder(type: WebSocketProtoWebSocketMessageType) -> WebSocketProtoWebSocketMessageBuilder {
|
||||
return WebSocketProtoWebSocketMessageBuilder(type: type)
|
||||
}
|
||||
|
||||
@objc public class WebSocketProtoWebSocketMessageBuilder: NSObject {
|
||||
|
||||
private var proto = WebSocketProtos_WebSocketMessage()
|
||||
|
||||
@objc public override init() {}
|
||||
@objc fileprivate override init() {}
|
||||
|
||||
// Initializer for required fields
|
||||
@objc public init(type: WebSocketProtoWebSocketMessageType) {
|
||||
@objc fileprivate init(type: WebSocketProtoWebSocketMessageType) {
|
||||
super.init()
|
||||
|
||||
setType(type)
|
||||
|
@ -403,12 +400,12 @@ extension WebSocketProtoWebSocketResponseMessage.WebSocketProtoWebSocketResponse
|
|||
}
|
||||
let type = WebSocketProtoWebSocketMessageTypeWrap(proto.type)
|
||||
|
||||
var request: WebSocketProtoWebSocketRequestMessage?
|
||||
var request: WebSocketProtoWebSocketRequestMessage? = nil
|
||||
if proto.hasRequest {
|
||||
request = try WebSocketProtoWebSocketRequestMessage.parseProto(proto.request)
|
||||
}
|
||||
|
||||
var response: WebSocketProtoWebSocketResponseMessage?
|
||||
var response: WebSocketProtoWebSocketResponseMessage? = nil
|
||||
if proto.hasResponse {
|
||||
response = try WebSocketProtoWebSocketResponseMessage.parseProto(proto.response)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
// DO NOT EDIT.
|
||||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: WebSocketResources.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documenation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
//*
|
||||
// Copyright (C) 2014-2016 Open Whisper Systems
|
||||
|
@ -18,7 +22,7 @@ import SwiftProtobuf
|
|||
// incompatible with the version of SwiftProtobuf to which you are linking.
|
||||
// Please ensure that your are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
private struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
@ -73,10 +77,10 @@ struct WebSocketProtos_WebSocketRequestMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _verb: String?
|
||||
fileprivate var _path: String?
|
||||
fileprivate var _body: Data?
|
||||
fileprivate var _requestID: UInt64?
|
||||
fileprivate var _verb: String? = nil
|
||||
fileprivate var _path: String? = nil
|
||||
fileprivate var _body: Data? = nil
|
||||
fileprivate var _requestID: UInt64? = nil
|
||||
}
|
||||
|
||||
struct WebSocketProtos_WebSocketResponseMessage {
|
||||
|
@ -128,10 +132,10 @@ struct WebSocketProtos_WebSocketResponseMessage {
|
|||
|
||||
init() {}
|
||||
|
||||
fileprivate var _requestID: UInt64?
|
||||
fileprivate var _status: UInt32?
|
||||
fileprivate var _message: String?
|
||||
fileprivate var _body: Data?
|
||||
fileprivate var _requestID: UInt64? = nil
|
||||
fileprivate var _status: UInt32? = nil
|
||||
fileprivate var _message: String? = nil
|
||||
fileprivate var _body: Data? = nil
|
||||
}
|
||||
|
||||
struct WebSocketProtos_WebSocketMessage {
|
||||
|
@ -213,7 +217,7 @@ extension WebSocketProtos_WebSocketMessage.TypeEnum: CaseIterable {
|
|||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
private let _protobuf_package = "WebSocketProtos"
|
||||
fileprivate let _protobuf_package = "WebSocketProtos"
|
||||
|
||||
extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".WebSocketRequestMessage"
|
||||
|
@ -222,7 +226,7 @@ extension WebSocketProtos_WebSocketRequestMessage: SwiftProtobuf.Message, SwiftP
|
|||
2: .same(proto: "path"),
|
||||
3: .same(proto: "body"),
|
||||
5: .same(proto: "headers"),
|
||||
4: .same(proto: "requestId")
|
||||
4: .same(proto: "requestId"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -275,7 +279,7 @@ extension WebSocketProtos_WebSocketResponseMessage: SwiftProtobuf.Message, Swift
|
|||
2: .same(proto: "status"),
|
||||
3: .same(proto: "message"),
|
||||
5: .same(proto: "headers"),
|
||||
4: .same(proto: "body")
|
||||
4: .same(proto: "body"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
|
@ -326,13 +330,13 @@ extension WebSocketProtos_WebSocketMessage: SwiftProtobuf.Message, SwiftProtobuf
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .same(proto: "request"),
|
||||
3: .same(proto: "response")
|
||||
3: .same(proto: "response"),
|
||||
]
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _type: WebSocketProtos_WebSocketMessage.TypeEnum?
|
||||
var _request: WebSocketProtos_WebSocketRequestMessage?
|
||||
var _response: WebSocketProtos_WebSocketResponseMessage?
|
||||
var _type: WebSocketProtos_WebSocketMessage.TypeEnum? = nil
|
||||
var _request: WebSocketProtos_WebSocketRequestMessage? = nil
|
||||
var _response: WebSocketProtos_WebSocketResponseMessage? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
|
||||
|
@ -402,6 +406,6 @@ extension WebSocketProtos_WebSocketMessage.TypeEnum: SwiftProtobuf._ProtoNamePro
|
|||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN"),
|
||||
1: .same(proto: "REQUEST"),
|
||||
2: .same(proto: "RESPONSE")
|
||||
2: .same(proto: "RESPONSE"),
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue