diff --git a/Scripts/ProtoWrappers.py b/Scripts/ProtoWrappers.py index 83e91349b..a7beba77b 100755 --- a/Scripts/ProtoWrappers.py +++ b/Scripts/ProtoWrappers.py @@ -616,6 +616,7 @@ public func serializedData() throws -> Data { # Setters for field in self.fields(): if field.rules == 'repeated': + # Add accessor_name = field.name_swift accessor_name = 'add' + accessor_name[0].upper() + accessor_name[1:] writer.add('@objc public func %s(_ valueParam: %s) {' % ( accessor_name, self.base_swift_type_for_field(field), )) @@ -633,6 +634,37 @@ public func serializedData() throws -> Data { writer.pop_indent() writer.add('}') writer.newline() + + # Set + accessor_name = field.name_swift + accessor_name = 'set' + accessor_name[0].upper() + accessor_name[1:] + writer.add('@objc public func %s(_ wrappedItems: [%s]) {' % ( accessor_name, self.base_swift_type_for_field(field), )) + writer.push_indent() + list_wrapped_swift_name = None + if self.is_field_a_proto(field): + message_context = self.context_for_proto_type(field) + list_wrapped_swift_name = message_context.derive_wrapped_swift_name() + else: + # TODO: Assert not an enum. + list_wrapped_swift_name = self.base_swift_type_for_field(field) + writer.add('var unwrappedItems = [%s]()' % list_wrapped_swift_name) + writer.add('for wrappedItem in wrappedItems {') + writer.push_indent() + + if self.is_field_an_enum(field): + enum_context = self.context_for_proto_type(field) + writer.add('unwrappedItems.append(%sUnwrap(wrappedItem))' % enum_context.swift_name ) + elif self.is_field_a_proto(field): + writer.add('unwrappedItems.append(wrappedItem.proto)') + else: + writer.add('unwrappedItems.append(wrappedItem)') + + writer.pop_indent() + writer.add('}') + writer.add('proto.%s = unwrappedItems' % ( field.name_swift, ) ) + writer.pop_indent() + writer.add('}') + writer.newline() else: accessor_name = field.name_swift accessor_name = 'set' + accessor_name[0].upper() + accessor_name[1:] diff --git a/SignalServiceKit/src/Devices/OWSBlockedPhoneNumbersMessage.m b/SignalServiceKit/src/Devices/OWSBlockedPhoneNumbersMessage.m index 20e96a194..f608eea91 100644 --- a/SignalServiceKit/src/Devices/OWSBlockedPhoneNumbersMessage.m +++ b/SignalServiceKit/src/Devices/OWSBlockedPhoneNumbersMessage.m @@ -32,14 +32,19 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { - SSKProtoSyncMessageBlockedBuilder *blockedPhoneNumbersBuilder = - [SSKProtoSyncMessageBlockedBuilder new]; - [blockedPhoneNumbersBuilder setNumbersArray:_phoneNumbers]; - SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; - [syncMessageBuilder setBlocked:[blockedPhoneNumbersBuilder build]]; + SSKProtoSyncMessageBlockedBuilder *blockedBuilder = [SSKProtoSyncMessageBlockedBuilder new]; + [blockedBuilder setNumbers:_phoneNumbers]; + NSError *error; + SSKProtoSyncMessageBlocked *_Nullable blockedProto = [blockedBuilder buildAndReturnError:&error]; + if (error || !blockedProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; + [syncMessageBuilder setBlocked:blockedProto]; return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Devices/OWSContactsOutputStream.m b/SignalServiceKit/src/Devices/OWSContactsOutputStream.m index c772f3c11..4baf91b57 100644 --- a/SignalServiceKit/src/Devices/OWSContactsOutputStream.m +++ b/SignalServiceKit/src/Devices/OWSContactsOutputStream.m @@ -43,7 +43,15 @@ disappearingMessagesConfiguration:(nullable OWSDisappearingMessagesConfiguration verifiedBuilder.destination = recipientIdentity.recipientId; verifiedBuilder.identityKey = [recipientIdentity.identityKey prependKeyType]; verifiedBuilder.state = OWSVerificationStateToProtoState(recipientIdentity.verificationState); - contactBuilder.verifiedBuilder = verifiedBuilder; + + NSError *error; + SSKProtoVerified *_Nullable verified = [verifiedBuilder buildAndReturnError:&error]; + if (error || !verified) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return; + } + + contactBuilder.verified = verified; } UIImage *_Nullable rawAvatar = [contactsManager avatarImageForCNContactId:signalAccount.contact.cnContactId]; @@ -53,10 +61,16 @@ disappearingMessagesConfiguration:(nullable OWSDisappearingMessagesConfiguration if (avatarPng) { SSKProtoContactDetailsAvatarBuilder *avatarBuilder = [SSKProtoContactDetailsAvatarBuilder new]; - [avatarBuilder setContentType:OWSMimeTypeImagePng]; [avatarBuilder setLength:(uint32_t)avatarPng.length]; - [contactBuilder setAvatarBuilder:avatarBuilder]; + + NSError *error; + SSKProtoContactDetailsAvatar *_Nullable avatar = [avatarBuilder buildAndReturnError:&error]; + if (error || !avatar) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return; + } + [contactBuilder setAvatar:avatar]; } } @@ -78,7 +92,17 @@ disappearingMessagesConfiguration:(nullable OWSDisappearingMessagesConfiguration [contactBuilder setBlocked:YES]; } - NSData *contactData = [[contactBuilder build] data]; + NSError *error; + SSKProtoContactDetails *_Nullable contactProto = [contactBuilder buildAndReturnError:&error]; + if (error || !contactProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return; + } + NSData *_Nullable contactData = [contactProto serializedDataAndReturnError:&error]; + if (error || !contactData) { + OWSFail(@"%@ could not serialize protobuf: %@", self.logTag, error); + return; + } uint32_t contactDataLength = (uint32_t)contactData.length; [self.delegateStream writeRawVarint32:contactDataLength]; diff --git a/SignalServiceKit/src/Devices/OWSReadReceiptsForLinkedDevicesMessage.m b/SignalServiceKit/src/Devices/OWSReadReceiptsForLinkedDevicesMessage.m index 0aece176b..5be2702e1 100644 --- a/SignalServiceKit/src/Devices/OWSReadReceiptsForLinkedDevicesMessage.m +++ b/SignalServiceKit/src/Devices/OWSReadReceiptsForLinkedDevicesMessage.m @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; for (OWSLinkedDeviceReadReceipt *readReceipt in self.readReceipts) { @@ -41,9 +41,15 @@ NS_ASSUME_NONNULL_BEGIN [SSKProtoSyncMessageReadBuilder new]; [readProtoBuilder setSender:readReceipt.senderId]; [readProtoBuilder setTimestamp:readReceipt.messageIdTimestamp]; - [syncMessageBuilder addRead:[readProtoBuilder build]]; - } + NSError *error; + SSKProtoSyncMessageRead *_Nullable readProto = [readProtoBuilder buildAndReturnError:&error]; + if (error || !readProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [syncMessageBuilder addRead:readProto]; + } return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Devices/OWSVerificationStateSyncMessage.m b/SignalServiceKit/src/Devices/OWSVerificationStateSyncMessage.m index ad0083b81..44a16a930 100644 --- a/SignalServiceKit/src/Devices/OWSVerificationStateSyncMessage.m +++ b/SignalServiceKit/src/Devices/OWSVerificationStateSyncMessage.m @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { OWSAssert(self.identityKey.length == kIdentityKeyLength); OWSAssert(self.verificationForRecipientId.length > 0); @@ -63,8 +63,6 @@ NS_ASSUME_NONNULL_BEGIN // will figure that out on it's own. OWSAssert(self.verificationState != OWSVerificationStateNoLongerVerified); - SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; - SSKProtoVerifiedBuilder *verifiedBuilder = [SSKProtoVerifiedBuilder new]; verifiedBuilder.destination = self.verificationForRecipientId; verifiedBuilder.identityKey = self.identityKey; @@ -78,9 +76,16 @@ NS_ASSUME_NONNULL_BEGIN // padded by the superclass while being sent. The end result is we send a NullMessage of a non-distinct size, and a // verification sync which is ~1-512 bytes larger then that. verifiedBuilder.nullMessage = [Cryptography generateRandomBytes:self.paddingBytesLength]; - - syncMessageBuilder.verifiedBuilder = verifiedBuilder; - + + NSError *error; + SSKProtoVerified *_Nullable verifiedProto = [verifiedBuilder buildAndReturnError:&error]; + if (error || !verifiedProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + + SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; + [syncMessageBuilder setVerified:verifiedProto]; return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Messages/Attachments/TSAttachmentPointer.h b/SignalServiceKit/src/Messages/Attachments/TSAttachmentPointer.h index 3baa16022..35632db02 100644 --- a/SignalServiceKit/src/Messages/Attachments/TSAttachmentPointer.h +++ b/SignalServiceKit/src/Messages/Attachments/TSAttachmentPointer.h @@ -2,11 +2,12 @@ // Copyright (c) 2018 Open Whisper Systems. All rights reserved. // -#import "SignalServiceKit-Swift.h" #import "TSAttachment.h" NS_ASSUME_NONNULL_BEGIN +@class SSKProtoAttachmentPointer; + typedef NS_ENUM(NSUInteger, TSAttachmentPointerState) { TSAttachmentPointerStateEnqueued = 0, TSAttachmentPointerStateDownloading = 1, diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m index fcfc55aa7..b2ec9a9b2 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSentMessageTranscript.m @@ -53,19 +53,23 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { - SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; - SSKProtoSyncMessageSentBuilder *sentBuilder = [SSKProtoSyncMessageSentBuilder new]; [sentBuilder setTimestamp:self.message.timestamp]; - [sentBuilder setDestination:self.sentRecipientId]; [sentBuilder setMessage:[self.message buildDataMessage:self.sentRecipientId]]; [sentBuilder setExpirationStartTimestamp:self.message.timestamp]; - [syncMessageBuilder setSentBuilder:sentBuilder]; + NSError *error; + SSKProtoSyncMessageSent *_Nullable sentProto = [sentBuilder buildAndReturnError:&error]; + if (error || !sentProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; + [syncMessageBuilder setSent:sentProto]; return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSyncMessage.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSyncMessage.m index 6e03fefc2..b5596ac91 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSyncMessage.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSOutgoingSyncMessage.m @@ -48,28 +48,57 @@ NS_ASSUME_NONNULL_BEGIN } // This method should not be overridden, since we want to add random padding to *every* sync message -- (SSKProtoSyncMessage *)buildSyncMessage +- (nullable SSKProtoSyncMessage *)buildSyncMessage { - SSKProtoSyncMessageBuilder *builder = [self syncMessageBuilder]; - + SSKProtoSyncMessageBuilder *_Nullable builder = [self syncMessageBuilder]; + if (!builder) { + return nil; + } + // Add a random 1-512 bytes to obscure sync message type size_t paddingBytesLength = arc4random_uniform(512) + 1; builder.padding = [Cryptography generateRandomBytes:paddingBytesLength]; - return [builder build]; + NSError *error; + SSKProtoSyncMessage *_Nullable proto = [builder buildAndReturnError:&error]; + if (error || !proto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + return proto; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { - OWSFail(@"Abstract method should be overridden in subclass."); + OWS_ABSTRACT_METHOD(); + return [SSKProtoSyncMessageBuilder new]; } - (nullable NSData *)buildPlainTextData:(SignalRecipient *)recipient { + SSKProtoSyncMessage *_Nullable syncMessage = [self buildSyncMessage]; + if (!syncMessage) { + return nil; + } + SSKProtoContentBuilder *contentBuilder = [SSKProtoContentBuilder new]; - [contentBuilder setSyncMessage:[self buildSyncMessage]]; - return [[contentBuilder build] data]; + [contentBuilder setSyncMessage:syncMessage]; + + NSError *error; + SSKProtoContent *_Nullable contentProto = [contentBuilder buildAndReturnError:&error]; + if (error || !contentProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + + NSData *_Nullable data = [contentProto serializedDataAndReturnError:&error]; + if (error || !data) { + OWSFail(@"%@ could not serialize protobuf: %@", self.logTag, error); + return nil; + } + + return data; } @end diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncConfigurationMessage.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncConfigurationMessage.m index 5f18517b0..831fa9f87 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncConfigurationMessage.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncConfigurationMessage.m @@ -32,17 +32,21 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { - SSKProtoSyncMessageConfigurationBuilder *configurationBuilder = [SSKProtoSyncMessageConfigurationBuilder new]; configurationBuilder.readReceipts = self.areReadReceiptsEnabled; + NSError *error; + SSKProtoSyncMessageConfiguration *_Nullable configurationProto = [configurationBuilder buildAndReturnError:&error]; + if (error || !configurationProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + SSKProtoSyncMessageBuilder *builder = [SSKProtoSyncMessageBuilder new]; - - builder.configurationBuilder = configurationBuilder; - + builder.configuration = configurationProto; return builder; } diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m index c91326e2a..4eca88bce 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncContactsMessage.m @@ -49,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { if (self.attachmentIds.count != 1) { DDLogError(@"expected sync contact message to have exactly one attachment, but found %lu", @@ -61,12 +61,16 @@ NS_ASSUME_NONNULL_BEGIN SSKProtoSyncMessageContactsBuilder *contactsBuilder = [SSKProtoSyncMessageContactsBuilder new]; - [contactsBuilder setBlob:attachmentProto]; [contactsBuilder setIsComplete:YES]; - SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; - [syncMessageBuilder setContactsBuilder:contactsBuilder]; + NSError *error; + SSKProtoSyncMessageContacts *_Nullable contactsProto = [contactsBuilder buildAndReturnError:&error]; + if (error || !contactsProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [syncMessageBuilder setContacts:contactsProto]; return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncGroupsMessage.m b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncGroupsMessage.m index 513cf6525..a964eb25a 100644 --- a/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncGroupsMessage.m +++ b/SignalServiceKit/src/Messages/DeviceSyncing/OWSSyncGroupsMessage.m @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN return [super initWithCoder:coder]; } -- (SSKProtoSyncMessageBuilder *)syncMessageBuilder +- (nullable SSKProtoSyncMessageBuilder *)syncMessageBuilder { if (self.attachmentIds.count != 1) { @@ -37,11 +37,17 @@ NS_ASSUME_NONNULL_BEGIN SSKProtoSyncMessageGroupsBuilder *groupsBuilder = [SSKProtoSyncMessageGroupsBuilder new]; - [groupsBuilder setBlob:attachmentProto]; + NSError *error; + SSKProtoSyncMessageGroups *_Nullable groupsProto = [groupsBuilder buildAndReturnError:&error]; + if (error || !groupsProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + SSKProtoSyncMessageBuilder *syncMessageBuilder = [SSKProtoSyncMessageBuilder new]; - [syncMessageBuilder setGroupsBuilder:groupsBuilder]; + [syncMessageBuilder setGroups:groupsProto]; return syncMessageBuilder; } diff --git a/SignalServiceKit/src/Messages/Interactions/OWSContact.m b/SignalServiceKit/src/Messages/Interactions/OWSContact.m index 9518acc4c..13f67c3b1 100644 --- a/SignalServiceKit/src/Messages/Interactions/OWSContact.m +++ b/SignalServiceKit/src/Messages/Interactions/OWSContact.m @@ -796,7 +796,14 @@ NSString *NSStringForContactAddressType(OWSContactAddressType value) contactBuilder.organization = contactName.organizationName.ows_stripped; } nameBuilder.displayName = contactName.displayName; - [contactBuilder setNameBuilder:nameBuilder]; + + NSError *error; + SSKProtoDataMessageContactName *_Nullable nameProto = [nameBuilder buildAndReturnError:&error]; + if (error || !nameProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [contactBuilder setName:nameProto]; for (OWSContactPhoneNumber *phoneNumber in contact.phoneNumbers) { SSKProtoDataMessageContactPhoneBuilder *phoneBuilder = @@ -819,7 +826,12 @@ NSString *NSStringForContactAddressType(OWSContactAddressType value) phoneBuilder.type = SSKProtoDataMessageContactPhoneTypeCustom; break; } - [contactBuilder addNumber:phoneBuilder.build]; + SSKProtoDataMessageContactPhone *_Nullable numberProto = [phoneBuilder buildAndReturnError:&error]; + if (error || !numberProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [contactBuilder addNumber:numberProto]; } for (OWSContactEmail *email in contact.emails) { @@ -843,7 +855,12 @@ NSString *NSStringForContactAddressType(OWSContactAddressType value) emailBuilder.type = SSKProtoDataMessageContactEmailTypeCustom; break; } - [contactBuilder addEmail:emailBuilder.build]; + SSKProtoDataMessageContactEmail *_Nullable emailProto = [emailBuilder buildAndReturnError:&error]; + if (error || !emailProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [contactBuilder addEmail:emailProto]; } for (OWSContactAddress *address in contact.addresses) { @@ -873,7 +890,12 @@ NSString *NSStringForContactAddressType(OWSContactAddressType value) if (address.country.ows_stripped.length > 0) { addressBuilder.country = address.country.ows_stripped; } - [contactBuilder addAddress:addressBuilder.build]; + SSKProtoDataMessageContactPostalAddress *_Nullable addressProto = [addressBuilder buildAndReturnError:&error]; + if (error || !addressProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + [contactBuilder addAddress:addressProto]; } if (contact.avatarAttachmentId != nil) { @@ -881,10 +903,19 @@ NSString *NSStringForContactAddressType(OWSContactAddressType value) [SSKProtoDataMessageContactAvatarBuilder new]; avatarBuilder.avatar = [TSAttachmentStream buildProtoForAttachmentId:contact.avatarAttachmentId]; - contactBuilder.avatar = [avatarBuilder build]; + SSKProtoDataMessageContactAvatar *_Nullable avatarProto = [avatarBuilder buildAndReturnError:&error]; + if (error || !avatarProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } + contactBuilder.avatar = avatarProto; } - SSKProtoDataMessageContact *contactProto = [contactBuilder build]; + SSKProtoDataMessageContact *_Nullable contactProto = [contactBuilder buildAndReturnError:&error]; + if (error || !contactProto) { + OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + return nil; + } if (contactProto.number.count < 1 && contactProto.email.count < 1 && contactProto.address.count < 1) { OWSProdLogAndFail(@"%@ contact has neither phone, email or address.", self.logTag); return nil; diff --git a/SignalServiceKit/src/Messages/OWSOutgoingCallMessage.m b/SignalServiceKit/src/Messages/OWSOutgoingCallMessage.m index b51e7beb7..c7c5fe5b9 100644 --- a/SignalServiceKit/src/Messages/OWSOutgoingCallMessage.m +++ b/SignalServiceKit/src/Messages/OWSOutgoingCallMessage.m @@ -134,14 +134,14 @@ NS_ASSUME_NONNULL_BEGIN [builder setCallMessage:[self buildCallMessage:recipient.recipientId]]; NSError *error; - SSKProtoCallMessage *_Nullable result = [builder buildAndReturnError:&error]; + SSKProtoContent *_Nullable result = [builder buildAndReturnError:&error]; if (error || !result) { OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); return nil; } NSData *_Nullable data = [result serializedDataAndReturnError:&error]; - if (error || !result) { - OWSFail(@"%@ could not build protobuf: %@", self.logTag, error); + if (error || !data) { + OWSFail(@"%@ could not serialize protobuf: %@", self.logTag, error); return nil; } return data; @@ -152,25 +152,45 @@ NS_ASSUME_NONNULL_BEGIN SSKProtoCallMessageBuilder *builder = [SSKProtoCallMessageBuilder new]; if (self.offerMessage) { - [builder setOffer:[self.offerMessage asProtobuf]]; + SSKProtoCallMessageOffer *_Nullable proto = [self.offerMessage asProtobuf]; + if (!proto) { + return nil; + } + [builder setOffer:proto]; } if (self.answerMessage) { - [builder setAnswer:[self.answerMessage asProtobuf]]; + SSKProtoCallMessageAnswer *_Nullable proto = [self.answerMessage asProtobuf]; + if (!proto) { + return nil; + } + [builder setAnswer:proto]; } if (self.iceUpdateMessages) { for (OWSCallIceUpdateMessage *iceUpdateMessage in self.iceUpdateMessages) { - [builder addIceUpdate:[iceUpdateMessage asProtobuf]]; + SSKProtoCallMessageIceUpdate *_Nullable proto = [iceUpdateMessage asProtobuf]; + if (!proto) { + return nil; + } + [builder addIceUpdate:proto]; } } if (self.hangupMessage) { - [builder setHangup:[self.hangupMessage asProtobuf]]; + SSKProtoCallMessageHangup *_Nullable proto = [self.hangupMessage asProtobuf]; + if (!proto) { + return nil; + } + [builder setHangup:proto]; } if (self.busyMessage) { - [builder setBusy:[self.busyMessage asProtobuf]]; + SSKProtoCallMessageBusy *_Nullable proto = [self.busyMessage asProtobuf]; + if (!proto) { + return nil; + } + [builder setBusy:proto]; } [builder addLocalProfileKeyIfNecessary:self.thread recipientId:recipientId]; diff --git a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h deleted file mode 100644 index ce2a2ec8a..000000000 --- a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h +++ /dev/null @@ -1,3011 +0,0 @@ -// -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. -// - -#import - -// @@protoc_insertion_point(imports) - -@class ObjectiveCFileOptions; -@class ObjectiveCFileOptionsBuilder; -@class PBDescriptorProto; -@class PBDescriptorProtoBuilder; -@class PBDescriptorProtoExtensionRange; -@class PBDescriptorProtoExtensionRangeBuilder; -@class PBEnumDescriptorProto; -@class PBEnumDescriptorProtoBuilder; -@class PBEnumOptions; -@class PBEnumOptionsBuilder; -@class PBEnumValueDescriptorProto; -@class PBEnumValueDescriptorProtoBuilder; -@class PBEnumValueOptions; -@class PBEnumValueOptionsBuilder; -@class PBFieldDescriptorProto; -@class PBFieldDescriptorProtoBuilder; -@class PBFieldOptions; -@class PBFieldOptionsBuilder; -@class PBFileDescriptorProto; -@class PBFileDescriptorProtoBuilder; -@class PBFileDescriptorSet; -@class PBFileDescriptorSetBuilder; -@class PBFileOptions; -@class PBFileOptionsBuilder; -@class PBMessageOptions; -@class PBMessageOptionsBuilder; -@class PBMethodDescriptorProto; -@class PBMethodDescriptorProtoBuilder; -@class PBMethodOptions; -@class PBMethodOptionsBuilder; -@class PBOneofDescriptorProto; -@class PBOneofDescriptorProtoBuilder; -@class PBServiceDescriptorProto; -@class PBServiceDescriptorProtoBuilder; -@class PBServiceOptions; -@class PBServiceOptionsBuilder; -@class PBSourceCodeInfo; -@class PBSourceCodeInfoBuilder; -@class PBSourceCodeInfoLocation; -@class PBSourceCodeInfoLocationBuilder; -@class PBUninterpretedOption; -@class PBUninterpretedOptionBuilder; -@class PBUninterpretedOptionNamePart; -@class PBUninterpretedOptionNamePartBuilder; -@class SSKProtoAttachmentPointer; -@class SSKProtoAttachmentPointerBuilder; -@class SSKProtoCallMessage; -@class SSKProtoCallMessageAnswer; -@class SSKProtoCallMessageAnswerBuilder; -@class SSKProtoCallMessageBuilder; -@class SSKProtoCallMessageBusy; -@class SSKProtoCallMessageBusyBuilder; -@class SSKProtoCallMessageHangup; -@class SSKProtoCallMessageHangupBuilder; -@class SSKProtoCallMessageIceUpdate; -@class SSKProtoCallMessageIceUpdateBuilder; -@class SSKProtoCallMessageOffer; -@class SSKProtoCallMessageOfferBuilder; -@class SSKProtoContactDetails; -@class SSKProtoContactDetailsAvatar; -@class SSKProtoContactDetailsAvatarBuilder; -@class SSKProtoContactDetailsBuilder; -@class SSKProtoContent; -@class SSKProtoContentBuilder; -@class SSKProtoDataMessage; -@class SSKProtoDataMessageBuilder; -@class SSKProtoDataMessageContact; -@class SSKProtoDataMessageContactAvatar; -@class SSKProtoDataMessageContactAvatarBuilder; -@class SSKProtoDataMessageContactBuilder; -@class SSKProtoDataMessageContactEmail; -@class SSKProtoDataMessageContactEmailBuilder; -@class SSKProtoDataMessageContactName; -@class SSKProtoDataMessageContactNameBuilder; -@class SSKProtoDataMessageContactPhone; -@class SSKProtoDataMessageContactPhoneBuilder; -@class SSKProtoDataMessageContactPostalAddress; -@class SSKProtoDataMessageContactPostalAddressBuilder; -@class SSKProtoDataMessageQuote; -@class SSKProtoDataMessageQuoteBuilder; -@class SSKProtoDataMessageQuoteQuotedAttachment; -@class SSKProtoDataMessageQuoteQuotedAttachmentBuilder; -@class SSKProtoEnvelope; -@class SSKProtoEnvelopeBuilder; -@class SSKProtoGroupContext; -@class SSKProtoGroupContextBuilder; -@class SSKProtoGroupDetails; -@class SSKProtoGroupDetailsAvatar; -@class SSKProtoGroupDetailsAvatarBuilder; -@class SSKProtoGroupDetailsBuilder; -@class SSKProtoNullMessage; -@class SSKProtoNullMessageBuilder; -@class SSKProtoReceiptMessage; -@class SSKProtoReceiptMessageBuilder; -@class SSKProtoSyncMessage; -@class SSKProtoSyncMessageBlocked; -@class SSKProtoSyncMessageBlockedBuilder; -@class SSKProtoSyncMessageBuilder; -@class SSKProtoSyncMessageConfiguration; -@class SSKProtoSyncMessageConfigurationBuilder; -@class SSKProtoSyncMessageContacts; -@class SSKProtoSyncMessageContactsBuilder; -@class SSKProtoSyncMessageGroups; -@class SSKProtoSyncMessageGroupsBuilder; -@class SSKProtoSyncMessageRead; -@class SSKProtoSyncMessageReadBuilder; -@class SSKProtoSyncMessageRequest; -@class SSKProtoSyncMessageRequestBuilder; -@class SSKProtoSyncMessageSent; -@class SSKProtoSyncMessageSentBuilder; -@class SSKProtoVerified; -@class SSKProtoVerifiedBuilder; - -typedef NS_ENUM(SInt32, SSKProtoEnvelopeType) { - SSKProtoEnvelopeTypeUnknown = 0, - SSKProtoEnvelopeTypeCiphertext = 1, - SSKProtoEnvelopeTypeKeyExchange = 2, - SSKProtoEnvelopeTypePrekeyBundle = 3, - SSKProtoEnvelopeTypeReceipt = 5, -}; - -BOOL SSKProtoEnvelopeTypeIsValidValue(SSKProtoEnvelopeType value); -NSString *NSStringFromSSKProtoEnvelopeType(SSKProtoEnvelopeType value); - -typedef NS_ENUM(SInt32, SSKProtoDataMessageFlags) { - SSKProtoDataMessageFlagsEndSession = 1, - SSKProtoDataMessageFlagsExpirationTimerUpdate = 2, - SSKProtoDataMessageFlagsProfileKeyUpdate = 4, -}; - -BOOL SSKProtoDataMessageFlagsIsValidValue(SSKProtoDataMessageFlags value); -NSString *NSStringFromSSKProtoDataMessageFlags(SSKProtoDataMessageFlags value); - -typedef NS_ENUM(SInt32, SSKProtoDataMessageQuoteQuotedAttachmentFlags) { - SSKProtoDataMessageQuoteQuotedAttachmentFlagsVoiceMessage = 1, -}; - -BOOL SSKProtoDataMessageQuoteQuotedAttachmentFlagsIsValidValue(SSKProtoDataMessageQuoteQuotedAttachmentFlags value); -NSString *NSStringFromSSKProtoDataMessageQuoteQuotedAttachmentFlags(SSKProtoDataMessageQuoteQuotedAttachmentFlags value); - -typedef NS_ENUM(SInt32, SSKProtoDataMessageContactPhoneType) { - SSKProtoDataMessageContactPhoneTypeHome = 1, - SSKProtoDataMessageContactPhoneTypeMobile = 2, - SSKProtoDataMessageContactPhoneTypeWork = 3, - SSKProtoDataMessageContactPhoneTypeCustom = 4, -}; - -BOOL SSKProtoDataMessageContactPhoneTypeIsValidValue(SSKProtoDataMessageContactPhoneType value); -NSString *NSStringFromSSKProtoDataMessageContactPhoneType(SSKProtoDataMessageContactPhoneType value); - -typedef NS_ENUM(SInt32, SSKProtoDataMessageContactEmailType) { - SSKProtoDataMessageContactEmailTypeHome = 1, - SSKProtoDataMessageContactEmailTypeMobile = 2, - SSKProtoDataMessageContactEmailTypeWork = 3, - SSKProtoDataMessageContactEmailTypeCustom = 4, -}; - -BOOL SSKProtoDataMessageContactEmailTypeIsValidValue(SSKProtoDataMessageContactEmailType value); -NSString *NSStringFromSSKProtoDataMessageContactEmailType(SSKProtoDataMessageContactEmailType value); - -typedef NS_ENUM(SInt32, SSKProtoDataMessageContactPostalAddressType) { - SSKProtoDataMessageContactPostalAddressTypeHome = 1, - SSKProtoDataMessageContactPostalAddressTypeWork = 2, - SSKProtoDataMessageContactPostalAddressTypeCustom = 3, -}; - -BOOL SSKProtoDataMessageContactPostalAddressTypeIsValidValue(SSKProtoDataMessageContactPostalAddressType value); -NSString *NSStringFromSSKProtoDataMessageContactPostalAddressType(SSKProtoDataMessageContactPostalAddressType value); - -typedef NS_ENUM(SInt32, SSKProtoReceiptMessageType) { - SSKProtoReceiptMessageTypeDelivery = 0, - SSKProtoReceiptMessageTypeRead = 1, -}; - -BOOL SSKProtoReceiptMessageTypeIsValidValue(SSKProtoReceiptMessageType value); -NSString *NSStringFromSSKProtoReceiptMessageType(SSKProtoReceiptMessageType value); - -typedef NS_ENUM(SInt32, SSKProtoVerifiedState) { - SSKProtoVerifiedStateDefault = 0, - SSKProtoVerifiedStateVerified = 1, - SSKProtoVerifiedStateUnverified = 2, -}; - -BOOL SSKProtoVerifiedStateIsValidValue(SSKProtoVerifiedState value); -NSString *NSStringFromSSKProtoVerifiedState(SSKProtoVerifiedState value); - -typedef NS_ENUM(SInt32, SSKProtoSyncMessageRequestType) { - SSKProtoSyncMessageRequestTypeUnknown = 0, - SSKProtoSyncMessageRequestTypeContacts = 1, - SSKProtoSyncMessageRequestTypeGroups = 2, - SSKProtoSyncMessageRequestTypeBlocked = 3, - SSKProtoSyncMessageRequestTypeConfiguration = 4, -}; - -BOOL SSKProtoSyncMessageRequestTypeIsValidValue(SSKProtoSyncMessageRequestType value); -NSString *NSStringFromSSKProtoSyncMessageRequestType(SSKProtoSyncMessageRequestType value); - -typedef NS_ENUM(SInt32, SSKProtoAttachmentPointerFlags) { - SSKProtoAttachmentPointerFlagsVoiceMessage = 1, -}; - -BOOL SSKProtoAttachmentPointerFlagsIsValidValue(SSKProtoAttachmentPointerFlags value); -NSString *NSStringFromSSKProtoAttachmentPointerFlags(SSKProtoAttachmentPointerFlags value); - -typedef NS_ENUM(SInt32, SSKProtoGroupContextType) { - SSKProtoGroupContextTypeUnknown = 0, - SSKProtoGroupContextTypeUpdate = 1, - SSKProtoGroupContextTypeDeliver = 2, - SSKProtoGroupContextTypeQuit = 3, - SSKProtoGroupContextTypeRequestInfo = 4, -}; - -BOOL SSKProtoGroupContextTypeIsValidValue(SSKProtoGroupContextType value); -NSString *NSStringFromSSKProtoGroupContextType(SSKProtoGroupContextType value); - - -@interface OWSSignalServiceProtosSSKProtoRoot : NSObject { -} -+ (PBExtensionRegistry*) extensionRegistry; -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry; -@end - -#define Envelope_type @"type" -#define Envelope_source @"source" -#define Envelope_sourceDevice @"sourceDevice" -#define Envelope_relay @"relay" -#define Envelope_timestamp @"timestamp" -#define Envelope_legacyMessage @"legacyMessage" -#define Envelope_content @"content" -@interface SSKProtoEnvelope : PBGeneratedMessage { -@private - BOOL hasTimestamp_:1; - BOOL hasSource_:1; - BOOL hasRelay_:1; - BOOL hasLegacyMessage_:1; - BOOL hasContent_:1; - BOOL hasSourceDevice_:1; - BOOL hasType_:1; - UInt64 timestamp; - NSString* source; - NSString* relay; - NSData* legacyMessage; - NSData* content; - UInt32 sourceDevice; - SSKProtoEnvelopeType type; -} -- (BOOL) hasType; -- (BOOL) hasSource; -- (BOOL) hasSourceDevice; -- (BOOL) hasRelay; -- (BOOL) hasTimestamp; -- (BOOL) hasLegacyMessage; -- (BOOL) hasContent; -@property (readonly) SSKProtoEnvelopeType type; -@property (readonly, strong) NSString* source; -@property (readonly) UInt32 sourceDevice; -@property (readonly, strong) NSString* relay; -@property (readonly) UInt64 timestamp; -@property (readonly, strong) NSData* legacyMessage; -@property (readonly, strong) NSData* content; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoEnvelopeBuilder*) builder; -+ (SSKProtoEnvelopeBuilder*) builder; -+ (SSKProtoEnvelopeBuilder*) builderWithPrototype:(SSKProtoEnvelope*) prototype; -- (SSKProtoEnvelopeBuilder*) toBuilder; - -+ (SSKProtoEnvelope*) parseFromData:(NSData*) data; -+ (SSKProtoEnvelope*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoEnvelope*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoEnvelope*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoEnvelope*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoEnvelope*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoEnvelopeBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoEnvelope* resultEnvelope; -} - -- (SSKProtoEnvelope*) defaultInstance; - -- (SSKProtoEnvelopeBuilder*) clear; -- (SSKProtoEnvelopeBuilder*) clone; - -- (SSKProtoEnvelope*) build; -- (SSKProtoEnvelope*) buildPartial; - -- (SSKProtoEnvelopeBuilder*) mergeFrom:(SSKProtoEnvelope*) other; -- (SSKProtoEnvelopeBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoEnvelopeBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasType; -- (SSKProtoEnvelopeType) type; -- (SSKProtoEnvelopeBuilder*) setType:(SSKProtoEnvelopeType) value; -- (SSKProtoEnvelopeBuilder*) clearType; - -- (BOOL) hasSource; -- (NSString*) source; -- (SSKProtoEnvelopeBuilder*) setSource:(NSString*) value; -- (SSKProtoEnvelopeBuilder*) clearSource; - -- (BOOL) hasSourceDevice; -- (UInt32) sourceDevice; -- (SSKProtoEnvelopeBuilder*) setSourceDevice:(UInt32) value; -- (SSKProtoEnvelopeBuilder*) clearSourceDevice; - -- (BOOL) hasRelay; -- (NSString*) relay; -- (SSKProtoEnvelopeBuilder*) setRelay:(NSString*) value; -- (SSKProtoEnvelopeBuilder*) clearRelay; - -- (BOOL) hasTimestamp; -- (UInt64) timestamp; -- (SSKProtoEnvelopeBuilder*) setTimestamp:(UInt64) value; -- (SSKProtoEnvelopeBuilder*) clearTimestamp; - -- (BOOL) hasLegacyMessage; -- (NSData*) legacyMessage; -- (SSKProtoEnvelopeBuilder*) setLegacyMessage:(NSData*) value; -- (SSKProtoEnvelopeBuilder*) clearLegacyMessage; - -- (BOOL) hasContent; -- (NSData*) content; -- (SSKProtoEnvelopeBuilder*) setContent:(NSData*) value; -- (SSKProtoEnvelopeBuilder*) clearContent; -@end - -#define Content_dataMessage @"dataMessage" -#define Content_syncMessage @"syncMessage" -#define Content_callMessage @"callMessage" -#define Content_nullMessage @"nullMessage" -#define Content_receiptMessage @"receiptMessage" -@interface SSKProtoContent : PBGeneratedMessage { -@private - BOOL hasDataMessage_:1; - BOOL hasSyncMessage_:1; - BOOL hasCallMessage_:1; - BOOL hasNullMessage_:1; - BOOL hasReceiptMessage_:1; - SSKProtoDataMessage* dataMessage; - SSKProtoSyncMessage* syncMessage; - SSKProtoCallMessage* callMessage; - SSKProtoNullMessage* nullMessage; - SSKProtoReceiptMessage* receiptMessage; -} -- (BOOL) hasDataMessage; -- (BOOL) hasSyncMessage; -- (BOOL) hasCallMessage; -- (BOOL) hasNullMessage; -- (BOOL) hasReceiptMessage; -@property (readonly, strong) SSKProtoDataMessage* dataMessage; -@property (readonly, strong) SSKProtoSyncMessage* syncMessage; -@property (readonly, strong) SSKProtoCallMessage* callMessage; -@property (readonly, strong) SSKProtoNullMessage* nullMessage; -@property (readonly, strong) SSKProtoReceiptMessage* receiptMessage; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoContentBuilder*) builder; -+ (SSKProtoContentBuilder*) builder; -+ (SSKProtoContentBuilder*) builderWithPrototype:(SSKProtoContent*) prototype; -- (SSKProtoContentBuilder*) toBuilder; - -+ (SSKProtoContent*) parseFromData:(NSData*) data; -+ (SSKProtoContent*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContent*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoContent*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContent*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoContent*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoContentBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoContent* resultContent; -} - -- (SSKProtoContent*) defaultInstance; - -- (SSKProtoContentBuilder*) clear; -- (SSKProtoContentBuilder*) clone; - -- (SSKProtoContent*) build; -- (SSKProtoContent*) buildPartial; - -- (SSKProtoContentBuilder*) mergeFrom:(SSKProtoContent*) other; -- (SSKProtoContentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoContentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasDataMessage; -- (SSKProtoDataMessage*) dataMessage; -- (SSKProtoContentBuilder*) setDataMessage:(SSKProtoDataMessage*) value; -- (SSKProtoContentBuilder*) setDataMessageBuilder:(SSKProtoDataMessageBuilder*) builderForValue; -- (SSKProtoContentBuilder*) mergeDataMessage:(SSKProtoDataMessage*) value; -- (SSKProtoContentBuilder*) clearDataMessage; - -- (BOOL) hasSyncMessage; -- (SSKProtoSyncMessage*) syncMessage; -- (SSKProtoContentBuilder*) setSyncMessage:(SSKProtoSyncMessage*) value; -- (SSKProtoContentBuilder*) setSyncMessageBuilder:(SSKProtoSyncMessageBuilder*) builderForValue; -- (SSKProtoContentBuilder*) mergeSyncMessage:(SSKProtoSyncMessage*) value; -- (SSKProtoContentBuilder*) clearSyncMessage; - -- (BOOL) hasCallMessage; -- (SSKProtoCallMessage*) callMessage; -- (SSKProtoContentBuilder*) setCallMessage:(SSKProtoCallMessage*) value; -- (SSKProtoContentBuilder*) setCallMessageBuilder:(SSKProtoCallMessageBuilder*) builderForValue; -- (SSKProtoContentBuilder*) mergeCallMessage:(SSKProtoCallMessage*) value; -- (SSKProtoContentBuilder*) clearCallMessage; - -- (BOOL) hasNullMessage; -- (SSKProtoNullMessage*) nullMessage; -- (SSKProtoContentBuilder*) setNullMessage:(SSKProtoNullMessage*) value; -- (SSKProtoContentBuilder*) setNullMessageBuilder:(SSKProtoNullMessageBuilder*) builderForValue; -- (SSKProtoContentBuilder*) mergeNullMessage:(SSKProtoNullMessage*) value; -- (SSKProtoContentBuilder*) clearNullMessage; - -- (BOOL) hasReceiptMessage; -- (SSKProtoReceiptMessage*) receiptMessage; -- (SSKProtoContentBuilder*) setReceiptMessage:(SSKProtoReceiptMessage*) value; -- (SSKProtoContentBuilder*) setReceiptMessageBuilder:(SSKProtoReceiptMessageBuilder*) builderForValue; -- (SSKProtoContentBuilder*) mergeReceiptMessage:(SSKProtoReceiptMessage*) value; -- (SSKProtoContentBuilder*) clearReceiptMessage; -@end - -#define CallMessage_offer @"offer" -#define CallMessage_answer @"answer" -#define CallMessage_iceUpdate @"iceUpdate" -#define CallMessage_hangup @"hangup" -#define CallMessage_busy @"busy" -#define CallMessage_profileKey @"profileKey" -@interface SSKProtoCallMessage : PBGeneratedMessage { -@private - BOOL hasOffer_:1; - BOOL hasAnswer_:1; - BOOL hasHangup_:1; - BOOL hasBusy_:1; - BOOL hasProfileKey_:1; - SSKProtoCallMessageOffer* offer; - SSKProtoCallMessageAnswer* answer; - SSKProtoCallMessageHangup* hangup; - SSKProtoCallMessageBusy* busy; - NSData* profileKey; - NSMutableArray * iceUpdateArray; -} -- (BOOL) hasOffer; -- (BOOL) hasAnswer; -- (BOOL) hasHangup; -- (BOOL) hasBusy; -- (BOOL) hasProfileKey; -@property (readonly, strong) SSKProtoCallMessageOffer* offer; -@property (readonly, strong) SSKProtoCallMessageAnswer* answer; -@property (readonly, strong) NSArray * iceUpdate; -@property (readonly, strong) SSKProtoCallMessageHangup* hangup; -@property (readonly, strong) SSKProtoCallMessageBusy* busy; -@property (readonly, strong) NSData* profileKey; -- (SSKProtoCallMessageIceUpdate*)iceUpdateAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageBuilder*) builder; -+ (SSKProtoCallMessageBuilder*) builder; -+ (SSKProtoCallMessageBuilder*) builderWithPrototype:(SSKProtoCallMessage*) prototype; -- (SSKProtoCallMessageBuilder*) toBuilder; - -+ (SSKProtoCallMessage*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessage*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Offer_id @"id" -#define Offer_sessionDescription @"sessionDescription" -@interface SSKProtoCallMessageOffer : PBGeneratedMessage { -@private - BOOL hasId_:1; - BOOL hasSessionDescription_:1; - UInt64 id; - NSString* sessionDescription; -} -- (BOOL) hasId; -- (BOOL) hasSessionDescription; -@property (readonly) UInt64 id; -@property (readonly, strong) NSString* sessionDescription; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageOfferBuilder*) builder; -+ (SSKProtoCallMessageOfferBuilder*) builder; -+ (SSKProtoCallMessageOfferBuilder*) builderWithPrototype:(SSKProtoCallMessageOffer*) prototype; -- (SSKProtoCallMessageOfferBuilder*) toBuilder; - -+ (SSKProtoCallMessageOffer*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessageOffer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageOffer*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessageOffer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageOffer*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessageOffer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoCallMessageOfferBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessageOffer* resultOffer; -} - -- (SSKProtoCallMessageOffer*) defaultInstance; - -- (SSKProtoCallMessageOfferBuilder*) clear; -- (SSKProtoCallMessageOfferBuilder*) clone; - -- (SSKProtoCallMessageOffer*) build; -- (SSKProtoCallMessageOffer*) buildPartial; - -- (SSKProtoCallMessageOfferBuilder*) mergeFrom:(SSKProtoCallMessageOffer*) other; -- (SSKProtoCallMessageOfferBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageOfferBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoCallMessageOfferBuilder*) setId:(UInt64) value; -- (SSKProtoCallMessageOfferBuilder*) clearId; - -- (BOOL) hasSessionDescription; -- (NSString*) sessionDescription; -- (SSKProtoCallMessageOfferBuilder*) setSessionDescription:(NSString*) value; -- (SSKProtoCallMessageOfferBuilder*) clearSessionDescription; -@end - -#define Answer_id @"id" -#define Answer_sessionDescription @"sessionDescription" -@interface SSKProtoCallMessageAnswer : PBGeneratedMessage { -@private - BOOL hasId_:1; - BOOL hasSessionDescription_:1; - UInt64 id; - NSString* sessionDescription; -} -- (BOOL) hasId; -- (BOOL) hasSessionDescription; -@property (readonly) UInt64 id; -@property (readonly, strong) NSString* sessionDescription; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageAnswerBuilder*) builder; -+ (SSKProtoCallMessageAnswerBuilder*) builder; -+ (SSKProtoCallMessageAnswerBuilder*) builderWithPrototype:(SSKProtoCallMessageAnswer*) prototype; -- (SSKProtoCallMessageAnswerBuilder*) toBuilder; - -+ (SSKProtoCallMessageAnswer*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessageAnswer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageAnswer*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessageAnswer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageAnswer*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessageAnswer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoCallMessageAnswerBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessageAnswer* resultAnswer; -} - -- (SSKProtoCallMessageAnswer*) defaultInstance; - -- (SSKProtoCallMessageAnswerBuilder*) clear; -- (SSKProtoCallMessageAnswerBuilder*) clone; - -- (SSKProtoCallMessageAnswer*) build; -- (SSKProtoCallMessageAnswer*) buildPartial; - -- (SSKProtoCallMessageAnswerBuilder*) mergeFrom:(SSKProtoCallMessageAnswer*) other; -- (SSKProtoCallMessageAnswerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageAnswerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoCallMessageAnswerBuilder*) setId:(UInt64) value; -- (SSKProtoCallMessageAnswerBuilder*) clearId; - -- (BOOL) hasSessionDescription; -- (NSString*) sessionDescription; -- (SSKProtoCallMessageAnswerBuilder*) setSessionDescription:(NSString*) value; -- (SSKProtoCallMessageAnswerBuilder*) clearSessionDescription; -@end - -#define IceUpdate_id @"id" -#define IceUpdate_sdpMid @"sdpMid" -#define IceUpdate_sdpMLineIndex @"sdpMlineIndex" -#define IceUpdate_sdp @"sdp" -@interface SSKProtoCallMessageIceUpdate : PBGeneratedMessage { -@private - BOOL hasId_:1; - BOOL hasSdpMid_:1; - BOOL hasSdp_:1; - BOOL hasSdpMlineIndex_:1; - UInt64 id; - NSString* sdpMid; - NSString* sdp; - UInt32 sdpMlineIndex; -} -- (BOOL) hasId; -- (BOOL) hasSdpMid; -- (BOOL) hasSdpMlineIndex; -- (BOOL) hasSdp; -@property (readonly) UInt64 id; -@property (readonly, strong) NSString* sdpMid; -@property (readonly) UInt32 sdpMlineIndex; -@property (readonly, strong) NSString* sdp; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageIceUpdateBuilder*) builder; -+ (SSKProtoCallMessageIceUpdateBuilder*) builder; -+ (SSKProtoCallMessageIceUpdateBuilder*) builderWithPrototype:(SSKProtoCallMessageIceUpdate*) prototype; -- (SSKProtoCallMessageIceUpdateBuilder*) toBuilder; - -+ (SSKProtoCallMessageIceUpdate*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessageIceUpdate*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageIceUpdate*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessageIceUpdate*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageIceUpdate*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessageIceUpdate*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoCallMessageIceUpdateBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessageIceUpdate* resultIceUpdate; -} - -- (SSKProtoCallMessageIceUpdate*) defaultInstance; - -- (SSKProtoCallMessageIceUpdateBuilder*) clear; -- (SSKProtoCallMessageIceUpdateBuilder*) clone; - -- (SSKProtoCallMessageIceUpdate*) build; -- (SSKProtoCallMessageIceUpdate*) buildPartial; - -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFrom:(SSKProtoCallMessageIceUpdate*) other; -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoCallMessageIceUpdateBuilder*) setId:(UInt64) value; -- (SSKProtoCallMessageIceUpdateBuilder*) clearId; - -- (BOOL) hasSdpMid; -- (NSString*) sdpMid; -- (SSKProtoCallMessageIceUpdateBuilder*) setSdpMid:(NSString*) value; -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdpMid; - -- (BOOL) hasSdpMlineIndex; -- (UInt32) sdpMlineIndex; -- (SSKProtoCallMessageIceUpdateBuilder*) setSdpMlineIndex:(UInt32) value; -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdpMlineIndex; - -- (BOOL) hasSdp; -- (NSString*) sdp; -- (SSKProtoCallMessageIceUpdateBuilder*) setSdp:(NSString*) value; -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdp; -@end - -#define Busy_id @"id" -@interface SSKProtoCallMessageBusy : PBGeneratedMessage { -@private - BOOL hasId_:1; - UInt64 id; -} -- (BOOL) hasId; -@property (readonly) UInt64 id; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageBusyBuilder*) builder; -+ (SSKProtoCallMessageBusyBuilder*) builder; -+ (SSKProtoCallMessageBusyBuilder*) builderWithPrototype:(SSKProtoCallMessageBusy*) prototype; -- (SSKProtoCallMessageBusyBuilder*) toBuilder; - -+ (SSKProtoCallMessageBusy*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessageBusy*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageBusy*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessageBusy*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageBusy*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessageBusy*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoCallMessageBusyBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessageBusy* resultBusy; -} - -- (SSKProtoCallMessageBusy*) defaultInstance; - -- (SSKProtoCallMessageBusyBuilder*) clear; -- (SSKProtoCallMessageBusyBuilder*) clone; - -- (SSKProtoCallMessageBusy*) build; -- (SSKProtoCallMessageBusy*) buildPartial; - -- (SSKProtoCallMessageBusyBuilder*) mergeFrom:(SSKProtoCallMessageBusy*) other; -- (SSKProtoCallMessageBusyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageBusyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoCallMessageBusyBuilder*) setId:(UInt64) value; -- (SSKProtoCallMessageBusyBuilder*) clearId; -@end - -#define Hangup_id @"id" -@interface SSKProtoCallMessageHangup : PBGeneratedMessage { -@private - BOOL hasId_:1; - UInt64 id; -} -- (BOOL) hasId; -@property (readonly) UInt64 id; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoCallMessageHangupBuilder*) builder; -+ (SSKProtoCallMessageHangupBuilder*) builder; -+ (SSKProtoCallMessageHangupBuilder*) builderWithPrototype:(SSKProtoCallMessageHangup*) prototype; -- (SSKProtoCallMessageHangupBuilder*) toBuilder; - -+ (SSKProtoCallMessageHangup*) parseFromData:(NSData*) data; -+ (SSKProtoCallMessageHangup*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageHangup*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoCallMessageHangup*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoCallMessageHangup*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoCallMessageHangup*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoCallMessageHangupBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessageHangup* resultHangup; -} - -- (SSKProtoCallMessageHangup*) defaultInstance; - -- (SSKProtoCallMessageHangupBuilder*) clear; -- (SSKProtoCallMessageHangupBuilder*) clone; - -- (SSKProtoCallMessageHangup*) build; -- (SSKProtoCallMessageHangup*) buildPartial; - -- (SSKProtoCallMessageHangupBuilder*) mergeFrom:(SSKProtoCallMessageHangup*) other; -- (SSKProtoCallMessageHangupBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageHangupBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoCallMessageHangupBuilder*) setId:(UInt64) value; -- (SSKProtoCallMessageHangupBuilder*) clearId; -@end - -@interface SSKProtoCallMessageBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoCallMessage* resultCallMessage; -} - -- (SSKProtoCallMessage*) defaultInstance; - -- (SSKProtoCallMessageBuilder*) clear; -- (SSKProtoCallMessageBuilder*) clone; - -- (SSKProtoCallMessage*) build; -- (SSKProtoCallMessage*) buildPartial; - -- (SSKProtoCallMessageBuilder*) mergeFrom:(SSKProtoCallMessage*) other; -- (SSKProtoCallMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoCallMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasOffer; -- (SSKProtoCallMessageOffer*) offer; -- (SSKProtoCallMessageBuilder*) setOffer:(SSKProtoCallMessageOffer*) value; -- (SSKProtoCallMessageBuilder*) setOfferBuilder:(SSKProtoCallMessageOfferBuilder*) builderForValue; -- (SSKProtoCallMessageBuilder*) mergeOffer:(SSKProtoCallMessageOffer*) value; -- (SSKProtoCallMessageBuilder*) clearOffer; - -- (BOOL) hasAnswer; -- (SSKProtoCallMessageAnswer*) answer; -- (SSKProtoCallMessageBuilder*) setAnswer:(SSKProtoCallMessageAnswer*) value; -- (SSKProtoCallMessageBuilder*) setAnswerBuilder:(SSKProtoCallMessageAnswerBuilder*) builderForValue; -- (SSKProtoCallMessageBuilder*) mergeAnswer:(SSKProtoCallMessageAnswer*) value; -- (SSKProtoCallMessageBuilder*) clearAnswer; - -- (NSMutableArray *)iceUpdate; -- (SSKProtoCallMessageIceUpdate*)iceUpdateAtIndex:(NSUInteger)index; -- (SSKProtoCallMessageBuilder *)addIceUpdate:(SSKProtoCallMessageIceUpdate*)value; -- (SSKProtoCallMessageBuilder *)setIceUpdateArray:(NSArray *)array; -- (SSKProtoCallMessageBuilder *)clearIceUpdate; - -- (BOOL) hasHangup; -- (SSKProtoCallMessageHangup*) hangup; -- (SSKProtoCallMessageBuilder*) setHangup:(SSKProtoCallMessageHangup*) value; -- (SSKProtoCallMessageBuilder*) setHangupBuilder:(SSKProtoCallMessageHangupBuilder*) builderForValue; -- (SSKProtoCallMessageBuilder*) mergeHangup:(SSKProtoCallMessageHangup*) value; -- (SSKProtoCallMessageBuilder*) clearHangup; - -- (BOOL) hasBusy; -- (SSKProtoCallMessageBusy*) busy; -- (SSKProtoCallMessageBuilder*) setBusy:(SSKProtoCallMessageBusy*) value; -- (SSKProtoCallMessageBuilder*) setBusyBuilder:(SSKProtoCallMessageBusyBuilder*) builderForValue; -- (SSKProtoCallMessageBuilder*) mergeBusy:(SSKProtoCallMessageBusy*) value; -- (SSKProtoCallMessageBuilder*) clearBusy; - -- (BOOL) hasProfileKey; -- (NSData*) profileKey; -- (SSKProtoCallMessageBuilder*) setProfileKey:(NSData*) value; -- (SSKProtoCallMessageBuilder*) clearProfileKey; -@end - -#define DataMessage_body @"body" -#define DataMessage_attachments @"attachments" -#define DataMessage_group @"group" -#define DataMessage_flags @"flags" -#define DataMessage_expireTimer @"expireTimer" -#define DataMessage_profileKey @"profileKey" -#define DataMessage_timestamp @"timestamp" -#define DataMessage_quote @"quote" -#define DataMessage_contact @"contact" -@interface SSKProtoDataMessage : PBGeneratedMessage { -@private - BOOL hasTimestamp_:1; - BOOL hasBody_:1; - BOOL hasGroup_:1; - BOOL hasQuote_:1; - BOOL hasProfileKey_:1; - BOOL hasFlags_:1; - BOOL hasExpireTimer_:1; - UInt64 timestamp; - NSString* body; - SSKProtoGroupContext* group; - SSKProtoDataMessageQuote* quote; - NSData* profileKey; - UInt32 flags; - UInt32 expireTimer; - NSMutableArray * attachmentsArray; - NSMutableArray * contactArray; -} -- (BOOL) hasBody; -- (BOOL) hasGroup; -- (BOOL) hasFlags; -- (BOOL) hasExpireTimer; -- (BOOL) hasProfileKey; -- (BOOL) hasTimestamp; -- (BOOL) hasQuote; -@property (readonly, strong) NSString* body; -@property (readonly, strong) NSArray * attachments; -@property (readonly, strong) SSKProtoGroupContext* group; -@property (readonly) UInt32 flags; -@property (readonly) UInt32 expireTimer; -@property (readonly, strong) NSData* profileKey; -@property (readonly) UInt64 timestamp; -@property (readonly, strong) SSKProtoDataMessageQuote* quote; -@property (readonly, strong) NSArray * contact; -- (SSKProtoAttachmentPointer*)attachmentsAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContact*)contactAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageBuilder*) builder; -+ (SSKProtoDataMessageBuilder*) builder; -+ (SSKProtoDataMessageBuilder*) builderWithPrototype:(SSKProtoDataMessage*) prototype; -- (SSKProtoDataMessageBuilder*) toBuilder; - -+ (SSKProtoDataMessage*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessage*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Quote_id @"id" -#define Quote_author @"author" -#define Quote_text @"text" -#define Quote_attachments @"attachments" -@interface SSKProtoDataMessageQuote : PBGeneratedMessage { -@private - BOOL hasId_:1; - BOOL hasAuthor_:1; - BOOL hasText_:1; - UInt64 id; - NSString* author; - NSString* text; - NSMutableArray * attachmentsArray; -} -- (BOOL) hasId; -- (BOOL) hasAuthor; -- (BOOL) hasText; -@property (readonly) UInt64 id; -@property (readonly, strong) NSString* author; -@property (readonly, strong) NSString* text; -@property (readonly, strong) NSArray * attachments; -- (SSKProtoDataMessageQuoteQuotedAttachment*)attachmentsAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageQuoteBuilder*) builder; -+ (SSKProtoDataMessageQuoteBuilder*) builder; -+ (SSKProtoDataMessageQuoteBuilder*) builderWithPrototype:(SSKProtoDataMessageQuote*) prototype; -- (SSKProtoDataMessageQuoteBuilder*) toBuilder; - -+ (SSKProtoDataMessageQuote*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageQuote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageQuote*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageQuote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageQuote*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageQuote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define QuotedAttachment_contentType @"contentType" -#define QuotedAttachment_fileName @"fileName" -#define QuotedAttachment_thumbnail @"thumbnail" -#define QuotedAttachment_flags @"flags" -@interface SSKProtoDataMessageQuoteQuotedAttachment : PBGeneratedMessage { -@private - BOOL hasContentType_:1; - BOOL hasFileName_:1; - BOOL hasThumbnail_:1; - BOOL hasFlags_:1; - NSString* contentType; - NSString* fileName; - SSKProtoAttachmentPointer* thumbnail; - UInt32 flags; -} -- (BOOL) hasContentType; -- (BOOL) hasFileName; -- (BOOL) hasThumbnail; -- (BOOL) hasFlags; -@property (readonly, strong) NSString* contentType; -@property (readonly, strong) NSString* fileName; -@property (readonly, strong) SSKProtoAttachmentPointer* thumbnail; -@property (readonly) UInt32 flags; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builder; -+ (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builder; -+ (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builderWithPrototype:(SSKProtoDataMessageQuoteQuotedAttachment*) prototype; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) toBuilder; - -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageQuoteQuotedAttachmentBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageQuoteQuotedAttachment* resultQuotedAttachment; -} - -- (SSKProtoDataMessageQuoteQuotedAttachment*) defaultInstance; - -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clear; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clone; - -- (SSKProtoDataMessageQuoteQuotedAttachment*) build; -- (SSKProtoDataMessageQuoteQuotedAttachment*) buildPartial; - -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFrom:(SSKProtoDataMessageQuoteQuotedAttachment*) other; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasContentType; -- (NSString*) contentType; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setContentType:(NSString*) value; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearContentType; - -- (BOOL) hasFileName; -- (NSString*) fileName; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setFileName:(NSString*) value; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearFileName; - -- (BOOL) hasThumbnail; -- (SSKProtoAttachmentPointer*) thumbnail; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setThumbnail:(SSKProtoAttachmentPointer*) value; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setThumbnailBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeThumbnail:(SSKProtoAttachmentPointer*) value; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearThumbnail; - -- (BOOL) hasFlags; -- (UInt32) flags; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setFlags:(UInt32) value; -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearFlags; -@end - -@interface SSKProtoDataMessageQuoteBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageQuote* resultQuote; -} - -- (SSKProtoDataMessageQuote*) defaultInstance; - -- (SSKProtoDataMessageQuoteBuilder*) clear; -- (SSKProtoDataMessageQuoteBuilder*) clone; - -- (SSKProtoDataMessageQuote*) build; -- (SSKProtoDataMessageQuote*) buildPartial; - -- (SSKProtoDataMessageQuoteBuilder*) mergeFrom:(SSKProtoDataMessageQuote*) other; -- (SSKProtoDataMessageQuoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageQuoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoDataMessageQuoteBuilder*) setId:(UInt64) value; -- (SSKProtoDataMessageQuoteBuilder*) clearId; - -- (BOOL) hasAuthor; -- (NSString*) author; -- (SSKProtoDataMessageQuoteBuilder*) setAuthor:(NSString*) value; -- (SSKProtoDataMessageQuoteBuilder*) clearAuthor; - -- (BOOL) hasText; -- (NSString*) text; -- (SSKProtoDataMessageQuoteBuilder*) setText:(NSString*) value; -- (SSKProtoDataMessageQuoteBuilder*) clearText; - -- (NSMutableArray *)attachments; -- (SSKProtoDataMessageQuoteQuotedAttachment*)attachmentsAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageQuoteBuilder *)addAttachments:(SSKProtoDataMessageQuoteQuotedAttachment*)value; -- (SSKProtoDataMessageQuoteBuilder *)setAttachmentsArray:(NSArray *)array; -- (SSKProtoDataMessageQuoteBuilder *)clearAttachments; -@end - -#define Contact_name @"name" -#define Contact_number @"number" -#define Contact_email @"email" -#define Contact_address @"address" -#define Contact_avatar @"avatar" -#define Contact_organization @"organization" -@interface SSKProtoDataMessageContact : PBGeneratedMessage { -@private - BOOL hasOrganization_:1; - BOOL hasName_:1; - BOOL hasAvatar_:1; - NSString* organization; - SSKProtoDataMessageContactName* name; - SSKProtoDataMessageContactAvatar* avatar; - NSMutableArray * numberArray; - NSMutableArray * emailArray; - NSMutableArray * addressArray; -} -- (BOOL) hasName; -- (BOOL) hasAvatar; -- (BOOL) hasOrganization; -@property (readonly, strong) SSKProtoDataMessageContactName* name; -@property (readonly, strong) NSArray * number; -@property (readonly, strong) NSArray * email; -@property (readonly, strong) NSArray * address; -@property (readonly, strong) SSKProtoDataMessageContactAvatar* avatar; -@property (readonly, strong) NSString* organization; -- (SSKProtoDataMessageContactPhone*)numberAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContactEmail*)emailAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContactPostalAddress*)addressAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactBuilder*) builder; -+ (SSKProtoDataMessageContactBuilder*) builder; -+ (SSKProtoDataMessageContactBuilder*) builderWithPrototype:(SSKProtoDataMessageContact*) prototype; -- (SSKProtoDataMessageContactBuilder*) toBuilder; - -+ (SSKProtoDataMessageContact*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContact*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContact*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContact*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContact*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContact*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Name_givenName @"givenName" -#define Name_familyName @"familyName" -#define Name_prefix @"prefix" -#define Name_suffix @"suffix" -#define Name_middleName @"middleName" -#define Name_displayName @"displayName" -@interface SSKProtoDataMessageContactName : PBGeneratedMessage { -@private - BOOL hasGivenName_:1; - BOOL hasFamilyName_:1; - BOOL hasPrefix_:1; - BOOL hasSuffix_:1; - BOOL hasMiddleName_:1; - BOOL hasDisplayName_:1; - NSString* givenName; - NSString* familyName; - NSString* prefix; - NSString* suffix; - NSString* middleName; - NSString* displayName; -} -- (BOOL) hasGivenName; -- (BOOL) hasFamilyName; -- (BOOL) hasPrefix; -- (BOOL) hasSuffix; -- (BOOL) hasMiddleName; -- (BOOL) hasDisplayName; -@property (readonly, strong) NSString* givenName; -@property (readonly, strong) NSString* familyName; -@property (readonly, strong) NSString* prefix; -@property (readonly, strong) NSString* suffix; -@property (readonly, strong) NSString* middleName; -@property (readonly, strong) NSString* displayName; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactNameBuilder*) builder; -+ (SSKProtoDataMessageContactNameBuilder*) builder; -+ (SSKProtoDataMessageContactNameBuilder*) builderWithPrototype:(SSKProtoDataMessageContactName*) prototype; -- (SSKProtoDataMessageContactNameBuilder*) toBuilder; - -+ (SSKProtoDataMessageContactName*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContactName*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactName*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContactName*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactName*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContactName*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageContactNameBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContactName* resultName; -} - -- (SSKProtoDataMessageContactName*) defaultInstance; - -- (SSKProtoDataMessageContactNameBuilder*) clear; -- (SSKProtoDataMessageContactNameBuilder*) clone; - -- (SSKProtoDataMessageContactName*) build; -- (SSKProtoDataMessageContactName*) buildPartial; - -- (SSKProtoDataMessageContactNameBuilder*) mergeFrom:(SSKProtoDataMessageContactName*) other; -- (SSKProtoDataMessageContactNameBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactNameBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasGivenName; -- (NSString*) givenName; -- (SSKProtoDataMessageContactNameBuilder*) setGivenName:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearGivenName; - -- (BOOL) hasFamilyName; -- (NSString*) familyName; -- (SSKProtoDataMessageContactNameBuilder*) setFamilyName:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearFamilyName; - -- (BOOL) hasPrefix; -- (NSString*) prefix; -- (SSKProtoDataMessageContactNameBuilder*) setPrefix:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearPrefix; - -- (BOOL) hasSuffix; -- (NSString*) suffix; -- (SSKProtoDataMessageContactNameBuilder*) setSuffix:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearSuffix; - -- (BOOL) hasMiddleName; -- (NSString*) middleName; -- (SSKProtoDataMessageContactNameBuilder*) setMiddleName:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearMiddleName; - -- (BOOL) hasDisplayName; -- (NSString*) displayName; -- (SSKProtoDataMessageContactNameBuilder*) setDisplayName:(NSString*) value; -- (SSKProtoDataMessageContactNameBuilder*) clearDisplayName; -@end - -#define Phone_value @"value" -#define Phone_type @"type" -#define Phone_label @"label" -@interface SSKProtoDataMessageContactPhone : PBGeneratedMessage { -@private - BOOL hasValue_:1; - BOOL hasLabel_:1; - BOOL hasType_:1; - NSString* value; - NSString* label; - SSKProtoDataMessageContactPhoneType type; -} -- (BOOL) hasValue; -- (BOOL) hasType; -- (BOOL) hasLabel; -@property (readonly, strong) NSString* value; -@property (readonly) SSKProtoDataMessageContactPhoneType type; -@property (readonly, strong) NSString* label; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactPhoneBuilder*) builder; -+ (SSKProtoDataMessageContactPhoneBuilder*) builder; -+ (SSKProtoDataMessageContactPhoneBuilder*) builderWithPrototype:(SSKProtoDataMessageContactPhone*) prototype; -- (SSKProtoDataMessageContactPhoneBuilder*) toBuilder; - -+ (SSKProtoDataMessageContactPhone*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContactPhone*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactPhone*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContactPhone*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactPhone*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContactPhone*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageContactPhoneBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContactPhone* resultPhone; -} - -- (SSKProtoDataMessageContactPhone*) defaultInstance; - -- (SSKProtoDataMessageContactPhoneBuilder*) clear; -- (SSKProtoDataMessageContactPhoneBuilder*) clone; - -- (SSKProtoDataMessageContactPhone*) build; -- (SSKProtoDataMessageContactPhone*) buildPartial; - -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFrom:(SSKProtoDataMessageContactPhone*) other; -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasValue; -- (NSString*) value; -- (SSKProtoDataMessageContactPhoneBuilder*) setValue:(NSString*) value; -- (SSKProtoDataMessageContactPhoneBuilder*) clearValue; - -- (BOOL) hasType; -- (SSKProtoDataMessageContactPhoneType) type; -- (SSKProtoDataMessageContactPhoneBuilder*) setType:(SSKProtoDataMessageContactPhoneType) value; -- (SSKProtoDataMessageContactPhoneBuilder*) clearType; - -- (BOOL) hasLabel; -- (NSString*) label; -- (SSKProtoDataMessageContactPhoneBuilder*) setLabel:(NSString*) value; -- (SSKProtoDataMessageContactPhoneBuilder*) clearLabel; -@end - -#define Email_value @"value" -#define Email_type @"type" -#define Email_label @"label" -@interface SSKProtoDataMessageContactEmail : PBGeneratedMessage { -@private - BOOL hasValue_:1; - BOOL hasLabel_:1; - BOOL hasType_:1; - NSString* value; - NSString* label; - SSKProtoDataMessageContactEmailType type; -} -- (BOOL) hasValue; -- (BOOL) hasType; -- (BOOL) hasLabel; -@property (readonly, strong) NSString* value; -@property (readonly) SSKProtoDataMessageContactEmailType type; -@property (readonly, strong) NSString* label; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactEmailBuilder*) builder; -+ (SSKProtoDataMessageContactEmailBuilder*) builder; -+ (SSKProtoDataMessageContactEmailBuilder*) builderWithPrototype:(SSKProtoDataMessageContactEmail*) prototype; -- (SSKProtoDataMessageContactEmailBuilder*) toBuilder; - -+ (SSKProtoDataMessageContactEmail*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContactEmail*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactEmail*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContactEmail*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactEmail*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContactEmail*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageContactEmailBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContactEmail* resultEmail; -} - -- (SSKProtoDataMessageContactEmail*) defaultInstance; - -- (SSKProtoDataMessageContactEmailBuilder*) clear; -- (SSKProtoDataMessageContactEmailBuilder*) clone; - -- (SSKProtoDataMessageContactEmail*) build; -- (SSKProtoDataMessageContactEmail*) buildPartial; - -- (SSKProtoDataMessageContactEmailBuilder*) mergeFrom:(SSKProtoDataMessageContactEmail*) other; -- (SSKProtoDataMessageContactEmailBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactEmailBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasValue; -- (NSString*) value; -- (SSKProtoDataMessageContactEmailBuilder*) setValue:(NSString*) value; -- (SSKProtoDataMessageContactEmailBuilder*) clearValue; - -- (BOOL) hasType; -- (SSKProtoDataMessageContactEmailType) type; -- (SSKProtoDataMessageContactEmailBuilder*) setType:(SSKProtoDataMessageContactEmailType) value; -- (SSKProtoDataMessageContactEmailBuilder*) clearType; - -- (BOOL) hasLabel; -- (NSString*) label; -- (SSKProtoDataMessageContactEmailBuilder*) setLabel:(NSString*) value; -- (SSKProtoDataMessageContactEmailBuilder*) clearLabel; -@end - -#define PostalAddress_type @"type" -#define PostalAddress_label @"label" -#define PostalAddress_street @"street" -#define PostalAddress_pobox @"pobox" -#define PostalAddress_neighborhood @"neighborhood" -#define PostalAddress_city @"city" -#define PostalAddress_region @"region" -#define PostalAddress_postcode @"postcode" -#define PostalAddress_country @"country" -@interface SSKProtoDataMessageContactPostalAddress : PBGeneratedMessage { -@private - BOOL hasLabel_:1; - BOOL hasStreet_:1; - BOOL hasPobox_:1; - BOOL hasNeighborhood_:1; - BOOL hasCity_:1; - BOOL hasRegion_:1; - BOOL hasPostcode_:1; - BOOL hasCountry_:1; - BOOL hasType_:1; - NSString* label; - NSString* street; - NSString* pobox; - NSString* neighborhood; - NSString* city; - NSString* region; - NSString* postcode; - NSString* country; - SSKProtoDataMessageContactPostalAddressType type; -} -- (BOOL) hasType; -- (BOOL) hasLabel; -- (BOOL) hasStreet; -- (BOOL) hasPobox; -- (BOOL) hasNeighborhood; -- (BOOL) hasCity; -- (BOOL) hasRegion; -- (BOOL) hasPostcode; -- (BOOL) hasCountry; -@property (readonly) SSKProtoDataMessageContactPostalAddressType type; -@property (readonly, strong) NSString* label; -@property (readonly, strong) NSString* street; -@property (readonly, strong) NSString* pobox; -@property (readonly, strong) NSString* neighborhood; -@property (readonly, strong) NSString* city; -@property (readonly, strong) NSString* region; -@property (readonly, strong) NSString* postcode; -@property (readonly, strong) NSString* country; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactPostalAddressBuilder*) builder; -+ (SSKProtoDataMessageContactPostalAddressBuilder*) builder; -+ (SSKProtoDataMessageContactPostalAddressBuilder*) builderWithPrototype:(SSKProtoDataMessageContactPostalAddress*) prototype; -- (SSKProtoDataMessageContactPostalAddressBuilder*) toBuilder; - -+ (SSKProtoDataMessageContactPostalAddress*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContactPostalAddress*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactPostalAddress*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContactPostalAddress*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactPostalAddress*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContactPostalAddress*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageContactPostalAddressBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContactPostalAddress* resultPostalAddress; -} - -- (SSKProtoDataMessageContactPostalAddress*) defaultInstance; - -- (SSKProtoDataMessageContactPostalAddressBuilder*) clear; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clone; - -- (SSKProtoDataMessageContactPostalAddress*) build; -- (SSKProtoDataMessageContactPostalAddress*) buildPartial; - -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFrom:(SSKProtoDataMessageContactPostalAddress*) other; -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasType; -- (SSKProtoDataMessageContactPostalAddressType) type; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setType:(SSKProtoDataMessageContactPostalAddressType) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearType; - -- (BOOL) hasLabel; -- (NSString*) label; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setLabel:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearLabel; - -- (BOOL) hasStreet; -- (NSString*) street; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setStreet:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearStreet; - -- (BOOL) hasPobox; -- (NSString*) pobox; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setPobox:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearPobox; - -- (BOOL) hasNeighborhood; -- (NSString*) neighborhood; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setNeighborhood:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearNeighborhood; - -- (BOOL) hasCity; -- (NSString*) city; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setCity:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearCity; - -- (BOOL) hasRegion; -- (NSString*) region; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setRegion:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearRegion; - -- (BOOL) hasPostcode; -- (NSString*) postcode; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setPostcode:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearPostcode; - -- (BOOL) hasCountry; -- (NSString*) country; -- (SSKProtoDataMessageContactPostalAddressBuilder*) setCountry:(NSString*) value; -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearCountry; -@end - -#define Avatar_avatar @"avatar" -#define Avatar_isProfile @"isProfile" -@interface SSKProtoDataMessageContactAvatar : PBGeneratedMessage { -@private - BOOL hasIsProfile_:1; - BOOL hasAvatar_:1; - BOOL isProfile_:1; - SSKProtoAttachmentPointer* avatar; -} -- (BOOL) hasAvatar; -- (BOOL) hasIsProfile; -@property (readonly, strong) SSKProtoAttachmentPointer* avatar; -- (BOOL) isProfile; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoDataMessageContactAvatarBuilder*) builder; -+ (SSKProtoDataMessageContactAvatarBuilder*) builder; -+ (SSKProtoDataMessageContactAvatarBuilder*) builderWithPrototype:(SSKProtoDataMessageContactAvatar*) prototype; -- (SSKProtoDataMessageContactAvatarBuilder*) toBuilder; - -+ (SSKProtoDataMessageContactAvatar*) parseFromData:(NSData*) data; -+ (SSKProtoDataMessageContactAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactAvatar*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoDataMessageContactAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoDataMessageContactAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoDataMessageContactAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoDataMessageContactAvatarBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContactAvatar* resultAvatar; -} - -- (SSKProtoDataMessageContactAvatar*) defaultInstance; - -- (SSKProtoDataMessageContactAvatarBuilder*) clear; -- (SSKProtoDataMessageContactAvatarBuilder*) clone; - -- (SSKProtoDataMessageContactAvatar*) build; -- (SSKProtoDataMessageContactAvatar*) buildPartial; - -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFrom:(SSKProtoDataMessageContactAvatar*) other; -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasAvatar; -- (SSKProtoAttachmentPointer*) avatar; -- (SSKProtoDataMessageContactAvatarBuilder*) setAvatar:(SSKProtoAttachmentPointer*) value; -- (SSKProtoDataMessageContactAvatarBuilder*) setAvatarBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue; -- (SSKProtoDataMessageContactAvatarBuilder*) mergeAvatar:(SSKProtoAttachmentPointer*) value; -- (SSKProtoDataMessageContactAvatarBuilder*) clearAvatar; - -- (BOOL) hasIsProfile; -- (BOOL) isProfile; -- (SSKProtoDataMessageContactAvatarBuilder*) setIsProfile:(BOOL) value; -- (SSKProtoDataMessageContactAvatarBuilder*) clearIsProfile; -@end - -@interface SSKProtoDataMessageContactBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessageContact* resultContact; -} - -- (SSKProtoDataMessageContact*) defaultInstance; - -- (SSKProtoDataMessageContactBuilder*) clear; -- (SSKProtoDataMessageContactBuilder*) clone; - -- (SSKProtoDataMessageContact*) build; -- (SSKProtoDataMessageContact*) buildPartial; - -- (SSKProtoDataMessageContactBuilder*) mergeFrom:(SSKProtoDataMessageContact*) other; -- (SSKProtoDataMessageContactBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageContactBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasName; -- (SSKProtoDataMessageContactName*) name; -- (SSKProtoDataMessageContactBuilder*) setName:(SSKProtoDataMessageContactName*) value; -- (SSKProtoDataMessageContactBuilder*) setNameBuilder:(SSKProtoDataMessageContactNameBuilder*) builderForValue; -- (SSKProtoDataMessageContactBuilder*) mergeName:(SSKProtoDataMessageContactName*) value; -- (SSKProtoDataMessageContactBuilder*) clearName; - -- (NSMutableArray *)number; -- (SSKProtoDataMessageContactPhone*)numberAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContactBuilder *)addNumber:(SSKProtoDataMessageContactPhone*)value; -- (SSKProtoDataMessageContactBuilder *)setNumberArray:(NSArray *)array; -- (SSKProtoDataMessageContactBuilder *)clearNumber; - -- (NSMutableArray *)email; -- (SSKProtoDataMessageContactEmail*)emailAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContactBuilder *)addEmail:(SSKProtoDataMessageContactEmail*)value; -- (SSKProtoDataMessageContactBuilder *)setEmailArray:(NSArray *)array; -- (SSKProtoDataMessageContactBuilder *)clearEmail; - -- (NSMutableArray *)address; -- (SSKProtoDataMessageContactPostalAddress*)addressAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageContactBuilder *)addAddress:(SSKProtoDataMessageContactPostalAddress*)value; -- (SSKProtoDataMessageContactBuilder *)setAddressArray:(NSArray *)array; -- (SSKProtoDataMessageContactBuilder *)clearAddress; - -- (BOOL) hasAvatar; -- (SSKProtoDataMessageContactAvatar*) avatar; -- (SSKProtoDataMessageContactBuilder*) setAvatar:(SSKProtoDataMessageContactAvatar*) value; -- (SSKProtoDataMessageContactBuilder*) setAvatarBuilder:(SSKProtoDataMessageContactAvatarBuilder*) builderForValue; -- (SSKProtoDataMessageContactBuilder*) mergeAvatar:(SSKProtoDataMessageContactAvatar*) value; -- (SSKProtoDataMessageContactBuilder*) clearAvatar; - -- (BOOL) hasOrganization; -- (NSString*) organization; -- (SSKProtoDataMessageContactBuilder*) setOrganization:(NSString*) value; -- (SSKProtoDataMessageContactBuilder*) clearOrganization; -@end - -@interface SSKProtoDataMessageBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoDataMessage* resultDataMessage; -} - -- (SSKProtoDataMessage*) defaultInstance; - -- (SSKProtoDataMessageBuilder*) clear; -- (SSKProtoDataMessageBuilder*) clone; - -- (SSKProtoDataMessage*) build; -- (SSKProtoDataMessage*) buildPartial; - -- (SSKProtoDataMessageBuilder*) mergeFrom:(SSKProtoDataMessage*) other; -- (SSKProtoDataMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoDataMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasBody; -- (NSString*) body; -- (SSKProtoDataMessageBuilder*) setBody:(NSString*) value; -- (SSKProtoDataMessageBuilder*) clearBody; - -- (NSMutableArray *)attachments; -- (SSKProtoAttachmentPointer*)attachmentsAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageBuilder *)addAttachments:(SSKProtoAttachmentPointer*)value; -- (SSKProtoDataMessageBuilder *)setAttachmentsArray:(NSArray *)array; -- (SSKProtoDataMessageBuilder *)clearAttachments; - -- (BOOL) hasGroup; -- (SSKProtoGroupContext*) group; -- (SSKProtoDataMessageBuilder*) setGroup:(SSKProtoGroupContext*) value; -- (SSKProtoDataMessageBuilder*) setGroupBuilder:(SSKProtoGroupContextBuilder*) builderForValue; -- (SSKProtoDataMessageBuilder*) mergeGroup:(SSKProtoGroupContext*) value; -- (SSKProtoDataMessageBuilder*) clearGroup; - -- (BOOL) hasFlags; -- (UInt32) flags; -- (SSKProtoDataMessageBuilder*) setFlags:(UInt32) value; -- (SSKProtoDataMessageBuilder*) clearFlags; - -- (BOOL) hasExpireTimer; -- (UInt32) expireTimer; -- (SSKProtoDataMessageBuilder*) setExpireTimer:(UInt32) value; -- (SSKProtoDataMessageBuilder*) clearExpireTimer; - -- (BOOL) hasProfileKey; -- (NSData*) profileKey; -- (SSKProtoDataMessageBuilder*) setProfileKey:(NSData*) value; -- (SSKProtoDataMessageBuilder*) clearProfileKey; - -- (BOOL) hasTimestamp; -- (UInt64) timestamp; -- (SSKProtoDataMessageBuilder*) setTimestamp:(UInt64) value; -- (SSKProtoDataMessageBuilder*) clearTimestamp; - -- (BOOL) hasQuote; -- (SSKProtoDataMessageQuote*) quote; -- (SSKProtoDataMessageBuilder*) setQuote:(SSKProtoDataMessageQuote*) value; -- (SSKProtoDataMessageBuilder*) setQuoteBuilder:(SSKProtoDataMessageQuoteBuilder*) builderForValue; -- (SSKProtoDataMessageBuilder*) mergeQuote:(SSKProtoDataMessageQuote*) value; -- (SSKProtoDataMessageBuilder*) clearQuote; - -- (NSMutableArray *)contact; -- (SSKProtoDataMessageContact*)contactAtIndex:(NSUInteger)index; -- (SSKProtoDataMessageBuilder *)addContact:(SSKProtoDataMessageContact*)value; -- (SSKProtoDataMessageBuilder *)setContactArray:(NSArray *)array; -- (SSKProtoDataMessageBuilder *)clearContact; -@end - -#define NullMessage_padding @"padding" -@interface SSKProtoNullMessage : PBGeneratedMessage { -@private - BOOL hasPadding_:1; - NSData* padding; -} -- (BOOL) hasPadding; -@property (readonly, strong) NSData* padding; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoNullMessageBuilder*) builder; -+ (SSKProtoNullMessageBuilder*) builder; -+ (SSKProtoNullMessageBuilder*) builderWithPrototype:(SSKProtoNullMessage*) prototype; -- (SSKProtoNullMessageBuilder*) toBuilder; - -+ (SSKProtoNullMessage*) parseFromData:(NSData*) data; -+ (SSKProtoNullMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoNullMessage*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoNullMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoNullMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoNullMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoNullMessageBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoNullMessage* resultNullMessage; -} - -- (SSKProtoNullMessage*) defaultInstance; - -- (SSKProtoNullMessageBuilder*) clear; -- (SSKProtoNullMessageBuilder*) clone; - -- (SSKProtoNullMessage*) build; -- (SSKProtoNullMessage*) buildPartial; - -- (SSKProtoNullMessageBuilder*) mergeFrom:(SSKProtoNullMessage*) other; -- (SSKProtoNullMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoNullMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasPadding; -- (NSData*) padding; -- (SSKProtoNullMessageBuilder*) setPadding:(NSData*) value; -- (SSKProtoNullMessageBuilder*) clearPadding; -@end - -#define ReceiptMessage_type @"type" -#define ReceiptMessage_timestamp @"timestamp" -@interface SSKProtoReceiptMessage : PBGeneratedMessage { -@private - BOOL hasType_:1; - SSKProtoReceiptMessageType type; - PBAppendableArray * timestampArray; -} -- (BOOL) hasType; -@property (readonly) SSKProtoReceiptMessageType type; -@property (readonly, strong) PBArray * timestamp; -- (UInt64)timestampAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoReceiptMessageBuilder*) builder; -+ (SSKProtoReceiptMessageBuilder*) builder; -+ (SSKProtoReceiptMessageBuilder*) builderWithPrototype:(SSKProtoReceiptMessage*) prototype; -- (SSKProtoReceiptMessageBuilder*) toBuilder; - -+ (SSKProtoReceiptMessage*) parseFromData:(NSData*) data; -+ (SSKProtoReceiptMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoReceiptMessage*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoReceiptMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoReceiptMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoReceiptMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoReceiptMessageBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoReceiptMessage* resultReceiptMessage; -} - -- (SSKProtoReceiptMessage*) defaultInstance; - -- (SSKProtoReceiptMessageBuilder*) clear; -- (SSKProtoReceiptMessageBuilder*) clone; - -- (SSKProtoReceiptMessage*) build; -- (SSKProtoReceiptMessage*) buildPartial; - -- (SSKProtoReceiptMessageBuilder*) mergeFrom:(SSKProtoReceiptMessage*) other; -- (SSKProtoReceiptMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoReceiptMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasType; -- (SSKProtoReceiptMessageType) type; -- (SSKProtoReceiptMessageBuilder*) setType:(SSKProtoReceiptMessageType) value; -- (SSKProtoReceiptMessageBuilder*) clearType; - -- (PBAppendableArray *)timestamp; -- (UInt64)timestampAtIndex:(NSUInteger)index; -- (SSKProtoReceiptMessageBuilder *)addTimestamp:(UInt64)value; -- (SSKProtoReceiptMessageBuilder *)setTimestampArray:(NSArray *)array; -- (SSKProtoReceiptMessageBuilder *)setTimestampValues:(const UInt64 *)values count:(NSUInteger)count; -- (SSKProtoReceiptMessageBuilder *)clearTimestamp; -@end - -#define Verified_destination @"destination" -#define Verified_identityKey @"identityKey" -#define Verified_state @"state" -#define Verified_nullMessage @"nullMessage" -@interface SSKProtoVerified : PBGeneratedMessage { -@private - BOOL hasDestination_:1; - BOOL hasIdentityKey_:1; - BOOL hasNullMessage_:1; - BOOL hasState_:1; - NSString* destination; - NSData* identityKey; - NSData* nullMessage; - SSKProtoVerifiedState state; -} -- (BOOL) hasDestination; -- (BOOL) hasIdentityKey; -- (BOOL) hasState; -- (BOOL) hasNullMessage; -@property (readonly, strong) NSString* destination; -@property (readonly, strong) NSData* identityKey; -@property (readonly) SSKProtoVerifiedState state; -@property (readonly, strong) NSData* nullMessage; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoVerifiedBuilder*) builder; -+ (SSKProtoVerifiedBuilder*) builder; -+ (SSKProtoVerifiedBuilder*) builderWithPrototype:(SSKProtoVerified*) prototype; -- (SSKProtoVerifiedBuilder*) toBuilder; - -+ (SSKProtoVerified*) parseFromData:(NSData*) data; -+ (SSKProtoVerified*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoVerified*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoVerified*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoVerified*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoVerified*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoVerifiedBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoVerified* resultVerified; -} - -- (SSKProtoVerified*) defaultInstance; - -- (SSKProtoVerifiedBuilder*) clear; -- (SSKProtoVerifiedBuilder*) clone; - -- (SSKProtoVerified*) build; -- (SSKProtoVerified*) buildPartial; - -- (SSKProtoVerifiedBuilder*) mergeFrom:(SSKProtoVerified*) other; -- (SSKProtoVerifiedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoVerifiedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasDestination; -- (NSString*) destination; -- (SSKProtoVerifiedBuilder*) setDestination:(NSString*) value; -- (SSKProtoVerifiedBuilder*) clearDestination; - -- (BOOL) hasIdentityKey; -- (NSData*) identityKey; -- (SSKProtoVerifiedBuilder*) setIdentityKey:(NSData*) value; -- (SSKProtoVerifiedBuilder*) clearIdentityKey; - -- (BOOL) hasState; -- (SSKProtoVerifiedState) state; -- (SSKProtoVerifiedBuilder*) setState:(SSKProtoVerifiedState) value; -- (SSKProtoVerifiedBuilder*) clearState; - -- (BOOL) hasNullMessage; -- (NSData*) nullMessage; -- (SSKProtoVerifiedBuilder*) setNullMessage:(NSData*) value; -- (SSKProtoVerifiedBuilder*) clearNullMessage; -@end - -#define SyncMessage_sent @"sent" -#define SyncMessage_contacts @"contacts" -#define SyncMessage_groups @"groups" -#define SyncMessage_request @"request" -#define SyncMessage_read @"read" -#define SyncMessage_blocked @"blocked" -#define SyncMessage_verified @"verified" -#define SyncMessage_configuration @"configuration" -#define SyncMessage_padding @"padding" -@interface SSKProtoSyncMessage : PBGeneratedMessage { -@private - BOOL hasSent_:1; - BOOL hasContacts_:1; - BOOL hasGroups_:1; - BOOL hasRequest_:1; - BOOL hasBlocked_:1; - BOOL hasVerified_:1; - BOOL hasConfiguration_:1; - BOOL hasPadding_:1; - SSKProtoSyncMessageSent* sent; - SSKProtoSyncMessageContacts* contacts; - SSKProtoSyncMessageGroups* groups; - SSKProtoSyncMessageRequest* request; - SSKProtoSyncMessageBlocked* blocked; - SSKProtoVerified* verified; - SSKProtoSyncMessageConfiguration* configuration; - NSData* padding; - NSMutableArray * readArray; -} -- (BOOL) hasSent; -- (BOOL) hasContacts; -- (BOOL) hasGroups; -- (BOOL) hasRequest; -- (BOOL) hasBlocked; -- (BOOL) hasVerified; -- (BOOL) hasConfiguration; -- (BOOL) hasPadding; -@property (readonly, strong) SSKProtoSyncMessageSent* sent; -@property (readonly, strong) SSKProtoSyncMessageContacts* contacts; -@property (readonly, strong) SSKProtoSyncMessageGroups* groups; -@property (readonly, strong) SSKProtoSyncMessageRequest* request; -@property (readonly, strong) NSArray * read; -@property (readonly, strong) SSKProtoSyncMessageBlocked* blocked; -@property (readonly, strong) SSKProtoVerified* verified; -@property (readonly, strong) SSKProtoSyncMessageConfiguration* configuration; -@property (readonly, strong) NSData* padding; -- (SSKProtoSyncMessageRead*)readAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageBuilder*) builder; -+ (SSKProtoSyncMessageBuilder*) builder; -+ (SSKProtoSyncMessageBuilder*) builderWithPrototype:(SSKProtoSyncMessage*) prototype; -- (SSKProtoSyncMessageBuilder*) toBuilder; - -+ (SSKProtoSyncMessage*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessage*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Sent_destination @"destination" -#define Sent_timestamp @"timestamp" -#define Sent_message @"message" -#define Sent_expirationStartTimestamp @"expirationStartTimestamp" -@interface SSKProtoSyncMessageSent : PBGeneratedMessage { -@private - BOOL hasTimestamp_:1; - BOOL hasExpirationStartTimestamp_:1; - BOOL hasDestination_:1; - BOOL hasMessage_:1; - UInt64 timestamp; - UInt64 expirationStartTimestamp; - NSString* destination; - SSKProtoDataMessage* message; -} -- (BOOL) hasDestination; -- (BOOL) hasTimestamp; -- (BOOL) hasMessage; -- (BOOL) hasExpirationStartTimestamp; -@property (readonly, strong) NSString* destination; -@property (readonly) UInt64 timestamp; -@property (readonly, strong) SSKProtoDataMessage* message; -@property (readonly) UInt64 expirationStartTimestamp; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageSentBuilder*) builder; -+ (SSKProtoSyncMessageSentBuilder*) builder; -+ (SSKProtoSyncMessageSentBuilder*) builderWithPrototype:(SSKProtoSyncMessageSent*) prototype; -- (SSKProtoSyncMessageSentBuilder*) toBuilder; - -+ (SSKProtoSyncMessageSent*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageSent*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageSent*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageSent*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageSent*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageSent*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageSentBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageSent* resultSent; -} - -- (SSKProtoSyncMessageSent*) defaultInstance; - -- (SSKProtoSyncMessageSentBuilder*) clear; -- (SSKProtoSyncMessageSentBuilder*) clone; - -- (SSKProtoSyncMessageSent*) build; -- (SSKProtoSyncMessageSent*) buildPartial; - -- (SSKProtoSyncMessageSentBuilder*) mergeFrom:(SSKProtoSyncMessageSent*) other; -- (SSKProtoSyncMessageSentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageSentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasDestination; -- (NSString*) destination; -- (SSKProtoSyncMessageSentBuilder*) setDestination:(NSString*) value; -- (SSKProtoSyncMessageSentBuilder*) clearDestination; - -- (BOOL) hasTimestamp; -- (UInt64) timestamp; -- (SSKProtoSyncMessageSentBuilder*) setTimestamp:(UInt64) value; -- (SSKProtoSyncMessageSentBuilder*) clearTimestamp; - -- (BOOL) hasMessage; -- (SSKProtoDataMessage*) message; -- (SSKProtoSyncMessageSentBuilder*) setMessage:(SSKProtoDataMessage*) value; -- (SSKProtoSyncMessageSentBuilder*) setMessageBuilder:(SSKProtoDataMessageBuilder*) builderForValue; -- (SSKProtoSyncMessageSentBuilder*) mergeMessage:(SSKProtoDataMessage*) value; -- (SSKProtoSyncMessageSentBuilder*) clearMessage; - -- (BOOL) hasExpirationStartTimestamp; -- (UInt64) expirationStartTimestamp; -- (SSKProtoSyncMessageSentBuilder*) setExpirationStartTimestamp:(UInt64) value; -- (SSKProtoSyncMessageSentBuilder*) clearExpirationStartTimestamp; -@end - -#define Contacts_blob @"blob" -#define Contacts_isComplete @"isComplete" -@interface SSKProtoSyncMessageContacts : PBGeneratedMessage { -@private - BOOL hasIsComplete_:1; - BOOL hasBlob_:1; - BOOL isComplete_:1; - SSKProtoAttachmentPointer* blob; -} -- (BOOL) hasBlob; -- (BOOL) hasIsComplete; -@property (readonly, strong) SSKProtoAttachmentPointer* blob; -- (BOOL) isComplete; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageContactsBuilder*) builder; -+ (SSKProtoSyncMessageContactsBuilder*) builder; -+ (SSKProtoSyncMessageContactsBuilder*) builderWithPrototype:(SSKProtoSyncMessageContacts*) prototype; -- (SSKProtoSyncMessageContactsBuilder*) toBuilder; - -+ (SSKProtoSyncMessageContacts*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageContacts*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageContacts*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageContacts*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageContacts*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageContacts*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageContactsBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageContacts* resultContacts; -} - -- (SSKProtoSyncMessageContacts*) defaultInstance; - -- (SSKProtoSyncMessageContactsBuilder*) clear; -- (SSKProtoSyncMessageContactsBuilder*) clone; - -- (SSKProtoSyncMessageContacts*) build; -- (SSKProtoSyncMessageContacts*) buildPartial; - -- (SSKProtoSyncMessageContactsBuilder*) mergeFrom:(SSKProtoSyncMessageContacts*) other; -- (SSKProtoSyncMessageContactsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageContactsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasBlob; -- (SSKProtoAttachmentPointer*) blob; -- (SSKProtoSyncMessageContactsBuilder*) setBlob:(SSKProtoAttachmentPointer*) value; -- (SSKProtoSyncMessageContactsBuilder*) setBlobBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue; -- (SSKProtoSyncMessageContactsBuilder*) mergeBlob:(SSKProtoAttachmentPointer*) value; -- (SSKProtoSyncMessageContactsBuilder*) clearBlob; - -- (BOOL) hasIsComplete; -- (BOOL) isComplete; -- (SSKProtoSyncMessageContactsBuilder*) setIsComplete:(BOOL) value; -- (SSKProtoSyncMessageContactsBuilder*) clearIsComplete; -@end - -#define Groups_blob @"blob" -@interface SSKProtoSyncMessageGroups : PBGeneratedMessage { -@private - BOOL hasBlob_:1; - SSKProtoAttachmentPointer* blob; -} -- (BOOL) hasBlob; -@property (readonly, strong) SSKProtoAttachmentPointer* blob; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageGroupsBuilder*) builder; -+ (SSKProtoSyncMessageGroupsBuilder*) builder; -+ (SSKProtoSyncMessageGroupsBuilder*) builderWithPrototype:(SSKProtoSyncMessageGroups*) prototype; -- (SSKProtoSyncMessageGroupsBuilder*) toBuilder; - -+ (SSKProtoSyncMessageGroups*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageGroups*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageGroups*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageGroups*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageGroups*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageGroups*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageGroupsBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageGroups* resultGroups; -} - -- (SSKProtoSyncMessageGroups*) defaultInstance; - -- (SSKProtoSyncMessageGroupsBuilder*) clear; -- (SSKProtoSyncMessageGroupsBuilder*) clone; - -- (SSKProtoSyncMessageGroups*) build; -- (SSKProtoSyncMessageGroups*) buildPartial; - -- (SSKProtoSyncMessageGroupsBuilder*) mergeFrom:(SSKProtoSyncMessageGroups*) other; -- (SSKProtoSyncMessageGroupsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageGroupsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasBlob; -- (SSKProtoAttachmentPointer*) blob; -- (SSKProtoSyncMessageGroupsBuilder*) setBlob:(SSKProtoAttachmentPointer*) value; -- (SSKProtoSyncMessageGroupsBuilder*) setBlobBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue; -- (SSKProtoSyncMessageGroupsBuilder*) mergeBlob:(SSKProtoAttachmentPointer*) value; -- (SSKProtoSyncMessageGroupsBuilder*) clearBlob; -@end - -#define Blocked_numbers @"numbers" -@interface SSKProtoSyncMessageBlocked : PBGeneratedMessage { -@private - NSMutableArray * numbersArray; -} -@property (readonly, strong) NSArray * numbers; -- (NSString*)numbersAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageBlockedBuilder*) builder; -+ (SSKProtoSyncMessageBlockedBuilder*) builder; -+ (SSKProtoSyncMessageBlockedBuilder*) builderWithPrototype:(SSKProtoSyncMessageBlocked*) prototype; -- (SSKProtoSyncMessageBlockedBuilder*) toBuilder; - -+ (SSKProtoSyncMessageBlocked*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageBlocked*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageBlocked*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageBlocked*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageBlocked*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageBlocked*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageBlockedBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageBlocked* resultBlocked; -} - -- (SSKProtoSyncMessageBlocked*) defaultInstance; - -- (SSKProtoSyncMessageBlockedBuilder*) clear; -- (SSKProtoSyncMessageBlockedBuilder*) clone; - -- (SSKProtoSyncMessageBlocked*) build; -- (SSKProtoSyncMessageBlocked*) buildPartial; - -- (SSKProtoSyncMessageBlockedBuilder*) mergeFrom:(SSKProtoSyncMessageBlocked*) other; -- (SSKProtoSyncMessageBlockedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageBlockedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (NSMutableArray *)numbers; -- (NSString*)numbersAtIndex:(NSUInteger)index; -- (SSKProtoSyncMessageBlockedBuilder *)addNumbers:(NSString*)value; -- (SSKProtoSyncMessageBlockedBuilder *)setNumbersArray:(NSArray *)array; -- (SSKProtoSyncMessageBlockedBuilder *)clearNumbers; -@end - -#define Request_type @"type" -@interface SSKProtoSyncMessageRequest : PBGeneratedMessage { -@private - BOOL hasType_:1; - SSKProtoSyncMessageRequestType type; -} -- (BOOL) hasType; -@property (readonly) SSKProtoSyncMessageRequestType type; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageRequestBuilder*) builder; -+ (SSKProtoSyncMessageRequestBuilder*) builder; -+ (SSKProtoSyncMessageRequestBuilder*) builderWithPrototype:(SSKProtoSyncMessageRequest*) prototype; -- (SSKProtoSyncMessageRequestBuilder*) toBuilder; - -+ (SSKProtoSyncMessageRequest*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageRequest*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageRequestBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageRequest* resultRequest; -} - -- (SSKProtoSyncMessageRequest*) defaultInstance; - -- (SSKProtoSyncMessageRequestBuilder*) clear; -- (SSKProtoSyncMessageRequestBuilder*) clone; - -- (SSKProtoSyncMessageRequest*) build; -- (SSKProtoSyncMessageRequest*) buildPartial; - -- (SSKProtoSyncMessageRequestBuilder*) mergeFrom:(SSKProtoSyncMessageRequest*) other; -- (SSKProtoSyncMessageRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasType; -- (SSKProtoSyncMessageRequestType) type; -- (SSKProtoSyncMessageRequestBuilder*) setType:(SSKProtoSyncMessageRequestType) value; -- (SSKProtoSyncMessageRequestBuilder*) clearType; -@end - -#define Read_sender @"sender" -#define Read_timestamp @"timestamp" -@interface SSKProtoSyncMessageRead : PBGeneratedMessage { -@private - BOOL hasTimestamp_:1; - BOOL hasSender_:1; - UInt64 timestamp; - NSString* sender; -} -- (BOOL) hasSender; -- (BOOL) hasTimestamp; -@property (readonly, strong) NSString* sender; -@property (readonly) UInt64 timestamp; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageReadBuilder*) builder; -+ (SSKProtoSyncMessageReadBuilder*) builder; -+ (SSKProtoSyncMessageReadBuilder*) builderWithPrototype:(SSKProtoSyncMessageRead*) prototype; -- (SSKProtoSyncMessageReadBuilder*) toBuilder; - -+ (SSKProtoSyncMessageRead*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageRead*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageRead*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageRead*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageRead*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageRead*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageReadBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageRead* resultRead; -} - -- (SSKProtoSyncMessageRead*) defaultInstance; - -- (SSKProtoSyncMessageReadBuilder*) clear; -- (SSKProtoSyncMessageReadBuilder*) clone; - -- (SSKProtoSyncMessageRead*) build; -- (SSKProtoSyncMessageRead*) buildPartial; - -- (SSKProtoSyncMessageReadBuilder*) mergeFrom:(SSKProtoSyncMessageRead*) other; -- (SSKProtoSyncMessageReadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageReadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasSender; -- (NSString*) sender; -- (SSKProtoSyncMessageReadBuilder*) setSender:(NSString*) value; -- (SSKProtoSyncMessageReadBuilder*) clearSender; - -- (BOOL) hasTimestamp; -- (UInt64) timestamp; -- (SSKProtoSyncMessageReadBuilder*) setTimestamp:(UInt64) value; -- (SSKProtoSyncMessageReadBuilder*) clearTimestamp; -@end - -#define Configuration_readReceipts @"readReceipts" -@interface SSKProtoSyncMessageConfiguration : PBGeneratedMessage { -@private - BOOL hasReadReceipts_:1; - BOOL readReceipts_:1; -} -- (BOOL) hasReadReceipts; -- (BOOL) readReceipts; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoSyncMessageConfigurationBuilder*) builder; -+ (SSKProtoSyncMessageConfigurationBuilder*) builder; -+ (SSKProtoSyncMessageConfigurationBuilder*) builderWithPrototype:(SSKProtoSyncMessageConfiguration*) prototype; -- (SSKProtoSyncMessageConfigurationBuilder*) toBuilder; - -+ (SSKProtoSyncMessageConfiguration*) parseFromData:(NSData*) data; -+ (SSKProtoSyncMessageConfiguration*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageConfiguration*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoSyncMessageConfiguration*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoSyncMessageConfiguration*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoSyncMessageConfiguration*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoSyncMessageConfigurationBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessageConfiguration* resultConfiguration; -} - -- (SSKProtoSyncMessageConfiguration*) defaultInstance; - -- (SSKProtoSyncMessageConfigurationBuilder*) clear; -- (SSKProtoSyncMessageConfigurationBuilder*) clone; - -- (SSKProtoSyncMessageConfiguration*) build; -- (SSKProtoSyncMessageConfiguration*) buildPartial; - -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFrom:(SSKProtoSyncMessageConfiguration*) other; -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasReadReceipts; -- (BOOL) readReceipts; -- (SSKProtoSyncMessageConfigurationBuilder*) setReadReceipts:(BOOL) value; -- (SSKProtoSyncMessageConfigurationBuilder*) clearReadReceipts; -@end - -@interface SSKProtoSyncMessageBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoSyncMessage* resultSyncMessage; -} - -- (SSKProtoSyncMessage*) defaultInstance; - -- (SSKProtoSyncMessageBuilder*) clear; -- (SSKProtoSyncMessageBuilder*) clone; - -- (SSKProtoSyncMessage*) build; -- (SSKProtoSyncMessage*) buildPartial; - -- (SSKProtoSyncMessageBuilder*) mergeFrom:(SSKProtoSyncMessage*) other; -- (SSKProtoSyncMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoSyncMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasSent; -- (SSKProtoSyncMessageSent*) sent; -- (SSKProtoSyncMessageBuilder*) setSent:(SSKProtoSyncMessageSent*) value; -- (SSKProtoSyncMessageBuilder*) setSentBuilder:(SSKProtoSyncMessageSentBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeSent:(SSKProtoSyncMessageSent*) value; -- (SSKProtoSyncMessageBuilder*) clearSent; - -- (BOOL) hasContacts; -- (SSKProtoSyncMessageContacts*) contacts; -- (SSKProtoSyncMessageBuilder*) setContacts:(SSKProtoSyncMessageContacts*) value; -- (SSKProtoSyncMessageBuilder*) setContactsBuilder:(SSKProtoSyncMessageContactsBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeContacts:(SSKProtoSyncMessageContacts*) value; -- (SSKProtoSyncMessageBuilder*) clearContacts; - -- (BOOL) hasGroups; -- (SSKProtoSyncMessageGroups*) groups; -- (SSKProtoSyncMessageBuilder*) setGroups:(SSKProtoSyncMessageGroups*) value; -- (SSKProtoSyncMessageBuilder*) setGroupsBuilder:(SSKProtoSyncMessageGroupsBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeGroups:(SSKProtoSyncMessageGroups*) value; -- (SSKProtoSyncMessageBuilder*) clearGroups; - -- (BOOL) hasRequest; -- (SSKProtoSyncMessageRequest*) request; -- (SSKProtoSyncMessageBuilder*) setRequest:(SSKProtoSyncMessageRequest*) value; -- (SSKProtoSyncMessageBuilder*) setRequestBuilder:(SSKProtoSyncMessageRequestBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeRequest:(SSKProtoSyncMessageRequest*) value; -- (SSKProtoSyncMessageBuilder*) clearRequest; - -- (NSMutableArray *)read; -- (SSKProtoSyncMessageRead*)readAtIndex:(NSUInteger)index; -- (SSKProtoSyncMessageBuilder *)addRead:(SSKProtoSyncMessageRead*)value; -- (SSKProtoSyncMessageBuilder *)setReadArray:(NSArray *)array; -- (SSKProtoSyncMessageBuilder *)clearRead; - -- (BOOL) hasBlocked; -- (SSKProtoSyncMessageBlocked*) blocked; -- (SSKProtoSyncMessageBuilder*) setBlocked:(SSKProtoSyncMessageBlocked*) value; -- (SSKProtoSyncMessageBuilder*) setBlockedBuilder:(SSKProtoSyncMessageBlockedBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeBlocked:(SSKProtoSyncMessageBlocked*) value; -- (SSKProtoSyncMessageBuilder*) clearBlocked; - -- (BOOL) hasVerified; -- (SSKProtoVerified*) verified; -- (SSKProtoSyncMessageBuilder*) setVerified:(SSKProtoVerified*) value; -- (SSKProtoSyncMessageBuilder*) setVerifiedBuilder:(SSKProtoVerifiedBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeVerified:(SSKProtoVerified*) value; -- (SSKProtoSyncMessageBuilder*) clearVerified; - -- (BOOL) hasConfiguration; -- (SSKProtoSyncMessageConfiguration*) configuration; -- (SSKProtoSyncMessageBuilder*) setConfiguration:(SSKProtoSyncMessageConfiguration*) value; -- (SSKProtoSyncMessageBuilder*) setConfigurationBuilder:(SSKProtoSyncMessageConfigurationBuilder*) builderForValue; -- (SSKProtoSyncMessageBuilder*) mergeConfiguration:(SSKProtoSyncMessageConfiguration*) value; -- (SSKProtoSyncMessageBuilder*) clearConfiguration; - -- (BOOL) hasPadding; -- (NSData*) padding; -- (SSKProtoSyncMessageBuilder*) setPadding:(NSData*) value; -- (SSKProtoSyncMessageBuilder*) clearPadding; -@end - -#define AttachmentPointer_id @"id" -#define AttachmentPointer_contentType @"contentType" -#define AttachmentPointer_key @"key" -#define AttachmentPointer_size @"size" -#define AttachmentPointer_thumbnail @"thumbnail" -#define AttachmentPointer_digest @"digest" -#define AttachmentPointer_fileName @"fileName" -#define AttachmentPointer_flags @"flags" -#define AttachmentPointer_width @"width" -#define AttachmentPointer_height @"height" -@interface SSKProtoAttachmentPointer : PBGeneratedMessage { -@private - BOOL hasId_:1; - BOOL hasContentType_:1; - BOOL hasFileName_:1; - BOOL hasKey_:1; - BOOL hasThumbnail_:1; - BOOL hasDigest_:1; - BOOL hasSize_:1; - BOOL hasFlags_:1; - BOOL hasWidth_:1; - BOOL hasHeight_:1; - UInt64 id; - NSString* contentType; - NSString* fileName; - NSData* key; - NSData* thumbnail; - NSData* digest; - UInt32 size; - UInt32 flags; - UInt32 width; - UInt32 height; -} -- (BOOL) hasId; -- (BOOL) hasContentType; -- (BOOL) hasKey; -- (BOOL) hasSize; -- (BOOL) hasThumbnail; -- (BOOL) hasDigest; -- (BOOL) hasFileName; -- (BOOL) hasFlags; -- (BOOL) hasWidth; -- (BOOL) hasHeight; -@property (readonly) UInt64 id; -@property (readonly, strong) NSString* contentType; -@property (readonly, strong) NSData* key; -@property (readonly) UInt32 size; -@property (readonly, strong) NSData* thumbnail; -@property (readonly, strong) NSData* digest; -@property (readonly, strong) NSString* fileName; -@property (readonly) UInt32 flags; -@property (readonly) UInt32 width; -@property (readonly) UInt32 height; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoAttachmentPointerBuilder*) builder; -+ (SSKProtoAttachmentPointerBuilder*) builder; -+ (SSKProtoAttachmentPointerBuilder*) builderWithPrototype:(SSKProtoAttachmentPointer*) prototype; -- (SSKProtoAttachmentPointerBuilder*) toBuilder; - -+ (SSKProtoAttachmentPointer*) parseFromData:(NSData*) data; -+ (SSKProtoAttachmentPointer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoAttachmentPointer*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoAttachmentPointer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoAttachmentPointer*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoAttachmentPointer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoAttachmentPointerBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoAttachmentPointer* resultAttachmentPointer; -} - -- (SSKProtoAttachmentPointer*) defaultInstance; - -- (SSKProtoAttachmentPointerBuilder*) clear; -- (SSKProtoAttachmentPointerBuilder*) clone; - -- (SSKProtoAttachmentPointer*) build; -- (SSKProtoAttachmentPointer*) buildPartial; - -- (SSKProtoAttachmentPointerBuilder*) mergeFrom:(SSKProtoAttachmentPointer*) other; -- (SSKProtoAttachmentPointerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoAttachmentPointerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (UInt64) id; -- (SSKProtoAttachmentPointerBuilder*) setId:(UInt64) value; -- (SSKProtoAttachmentPointerBuilder*) clearId; - -- (BOOL) hasContentType; -- (NSString*) contentType; -- (SSKProtoAttachmentPointerBuilder*) setContentType:(NSString*) value; -- (SSKProtoAttachmentPointerBuilder*) clearContentType; - -- (BOOL) hasKey; -- (NSData*) key; -- (SSKProtoAttachmentPointerBuilder*) setKey:(NSData*) value; -- (SSKProtoAttachmentPointerBuilder*) clearKey; - -- (BOOL) hasSize; -- (UInt32) size; -- (SSKProtoAttachmentPointerBuilder*) setSize:(UInt32) value; -- (SSKProtoAttachmentPointerBuilder*) clearSize; - -- (BOOL) hasThumbnail; -- (NSData*) thumbnail; -- (SSKProtoAttachmentPointerBuilder*) setThumbnail:(NSData*) value; -- (SSKProtoAttachmentPointerBuilder*) clearThumbnail; - -- (BOOL) hasDigest; -- (NSData*) digest; -- (SSKProtoAttachmentPointerBuilder*) setDigest:(NSData*) value; -- (SSKProtoAttachmentPointerBuilder*) clearDigest; - -- (BOOL) hasFileName; -- (NSString*) fileName; -- (SSKProtoAttachmentPointerBuilder*) setFileName:(NSString*) value; -- (SSKProtoAttachmentPointerBuilder*) clearFileName; - -- (BOOL) hasFlags; -- (UInt32) flags; -- (SSKProtoAttachmentPointerBuilder*) setFlags:(UInt32) value; -- (SSKProtoAttachmentPointerBuilder*) clearFlags; - -- (BOOL) hasWidth; -- (UInt32) width; -- (SSKProtoAttachmentPointerBuilder*) setWidth:(UInt32) value; -- (SSKProtoAttachmentPointerBuilder*) clearWidth; - -- (BOOL) hasHeight; -- (UInt32) height; -- (SSKProtoAttachmentPointerBuilder*) setHeight:(UInt32) value; -- (SSKProtoAttachmentPointerBuilder*) clearHeight; -@end - -#define GroupContext_id @"id" -#define GroupContext_type @"type" -#define GroupContext_name @"name" -#define GroupContext_members @"members" -#define GroupContext_avatar @"avatar" -@interface SSKProtoGroupContext : PBGeneratedMessage { -@private - BOOL hasName_:1; - BOOL hasAvatar_:1; - BOOL hasId_:1; - BOOL hasType_:1; - NSString* name; - SSKProtoAttachmentPointer* avatar; - NSData* id; - SSKProtoGroupContextType type; - NSMutableArray * membersArray; -} -- (BOOL) hasId; -- (BOOL) hasType; -- (BOOL) hasName; -- (BOOL) hasAvatar; -@property (readonly, strong) NSData* id; -@property (readonly) SSKProtoGroupContextType type; -@property (readonly, strong) NSString* name; -@property (readonly, strong) NSArray * members; -@property (readonly, strong) SSKProtoAttachmentPointer* avatar; -- (NSString*)membersAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoGroupContextBuilder*) builder; -+ (SSKProtoGroupContextBuilder*) builder; -+ (SSKProtoGroupContextBuilder*) builderWithPrototype:(SSKProtoGroupContext*) prototype; -- (SSKProtoGroupContextBuilder*) toBuilder; - -+ (SSKProtoGroupContext*) parseFromData:(NSData*) data; -+ (SSKProtoGroupContext*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupContext*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoGroupContext*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupContext*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoGroupContext*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoGroupContextBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoGroupContext* resultGroupContext; -} - -- (SSKProtoGroupContext*) defaultInstance; - -- (SSKProtoGroupContextBuilder*) clear; -- (SSKProtoGroupContextBuilder*) clone; - -- (SSKProtoGroupContext*) build; -- (SSKProtoGroupContext*) buildPartial; - -- (SSKProtoGroupContextBuilder*) mergeFrom:(SSKProtoGroupContext*) other; -- (SSKProtoGroupContextBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoGroupContextBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (NSData*) id; -- (SSKProtoGroupContextBuilder*) setId:(NSData*) value; -- (SSKProtoGroupContextBuilder*) clearId; - -- (BOOL) hasType; -- (SSKProtoGroupContextType) type; -- (SSKProtoGroupContextBuilder*) setType:(SSKProtoGroupContextType) value; -- (SSKProtoGroupContextBuilder*) clearType; - -- (BOOL) hasName; -- (NSString*) name; -- (SSKProtoGroupContextBuilder*) setName:(NSString*) value; -- (SSKProtoGroupContextBuilder*) clearName; - -- (NSMutableArray *)members; -- (NSString*)membersAtIndex:(NSUInteger)index; -- (SSKProtoGroupContextBuilder *)addMembers:(NSString*)value; -- (SSKProtoGroupContextBuilder *)setMembersArray:(NSArray *)array; -- (SSKProtoGroupContextBuilder *)clearMembers; - -- (BOOL) hasAvatar; -- (SSKProtoAttachmentPointer*) avatar; -- (SSKProtoGroupContextBuilder*) setAvatar:(SSKProtoAttachmentPointer*) value; -- (SSKProtoGroupContextBuilder*) setAvatarBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue; -- (SSKProtoGroupContextBuilder*) mergeAvatar:(SSKProtoAttachmentPointer*) value; -- (SSKProtoGroupContextBuilder*) clearAvatar; -@end - -#define ContactDetails_number @"number" -#define ContactDetails_name @"name" -#define ContactDetails_avatar @"avatar" -#define ContactDetails_color @"color" -#define ContactDetails_verified @"verified" -#define ContactDetails_profileKey @"profileKey" -#define ContactDetails_blocked @"blocked" -#define ContactDetails_expireTimer @"expireTimer" -@interface SSKProtoContactDetails : PBGeneratedMessage { -@private - BOOL hasBlocked_:1; - BOOL hasNumber_:1; - BOOL hasName_:1; - BOOL hasColor_:1; - BOOL hasAvatar_:1; - BOOL hasVerified_:1; - BOOL hasProfileKey_:1; - BOOL hasExpireTimer_:1; - BOOL blocked_:1; - NSString* number; - NSString* name; - NSString* color; - SSKProtoContactDetailsAvatar* avatar; - SSKProtoVerified* verified; - NSData* profileKey; - UInt32 expireTimer; -} -- (BOOL) hasNumber; -- (BOOL) hasName; -- (BOOL) hasAvatar; -- (BOOL) hasColor; -- (BOOL) hasVerified; -- (BOOL) hasProfileKey; -- (BOOL) hasBlocked; -- (BOOL) hasExpireTimer; -@property (readonly, strong) NSString* number; -@property (readonly, strong) NSString* name; -@property (readonly, strong) SSKProtoContactDetailsAvatar* avatar; -@property (readonly, strong) NSString* color; -@property (readonly, strong) SSKProtoVerified* verified; -@property (readonly, strong) NSData* profileKey; -- (BOOL) blocked; -@property (readonly) UInt32 expireTimer; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoContactDetailsBuilder*) builder; -+ (SSKProtoContactDetailsBuilder*) builder; -+ (SSKProtoContactDetailsBuilder*) builderWithPrototype:(SSKProtoContactDetails*) prototype; -- (SSKProtoContactDetailsBuilder*) toBuilder; - -+ (SSKProtoContactDetails*) parseFromData:(NSData*) data; -+ (SSKProtoContactDetails*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContactDetails*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoContactDetails*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContactDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoContactDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Avatar_contentType @"contentType" -#define Avatar_length @"length" -@interface SSKProtoContactDetailsAvatar : PBGeneratedMessage { -@private - BOOL hasContentType_:1; - BOOL hasLength_:1; - NSString* contentType; - UInt32 length; -} -- (BOOL) hasContentType; -- (BOOL) hasLength; -@property (readonly, strong) NSString* contentType; -@property (readonly) UInt32 length; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoContactDetailsAvatarBuilder*) builder; -+ (SSKProtoContactDetailsAvatarBuilder*) builder; -+ (SSKProtoContactDetailsAvatarBuilder*) builderWithPrototype:(SSKProtoContactDetailsAvatar*) prototype; -- (SSKProtoContactDetailsAvatarBuilder*) toBuilder; - -+ (SSKProtoContactDetailsAvatar*) parseFromData:(NSData*) data; -+ (SSKProtoContactDetailsAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContactDetailsAvatar*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoContactDetailsAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoContactDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoContactDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoContactDetailsAvatarBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoContactDetailsAvatar* resultAvatar; -} - -- (SSKProtoContactDetailsAvatar*) defaultInstance; - -- (SSKProtoContactDetailsAvatarBuilder*) clear; -- (SSKProtoContactDetailsAvatarBuilder*) clone; - -- (SSKProtoContactDetailsAvatar*) build; -- (SSKProtoContactDetailsAvatar*) buildPartial; - -- (SSKProtoContactDetailsAvatarBuilder*) mergeFrom:(SSKProtoContactDetailsAvatar*) other; -- (SSKProtoContactDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoContactDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasContentType; -- (NSString*) contentType; -- (SSKProtoContactDetailsAvatarBuilder*) setContentType:(NSString*) value; -- (SSKProtoContactDetailsAvatarBuilder*) clearContentType; - -- (BOOL) hasLength; -- (UInt32) length; -- (SSKProtoContactDetailsAvatarBuilder*) setLength:(UInt32) value; -- (SSKProtoContactDetailsAvatarBuilder*) clearLength; -@end - -@interface SSKProtoContactDetailsBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoContactDetails* resultContactDetails; -} - -- (SSKProtoContactDetails*) defaultInstance; - -- (SSKProtoContactDetailsBuilder*) clear; -- (SSKProtoContactDetailsBuilder*) clone; - -- (SSKProtoContactDetails*) build; -- (SSKProtoContactDetails*) buildPartial; - -- (SSKProtoContactDetailsBuilder*) mergeFrom:(SSKProtoContactDetails*) other; -- (SSKProtoContactDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoContactDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasNumber; -- (NSString*) number; -- (SSKProtoContactDetailsBuilder*) setNumber:(NSString*) value; -- (SSKProtoContactDetailsBuilder*) clearNumber; - -- (BOOL) hasName; -- (NSString*) name; -- (SSKProtoContactDetailsBuilder*) setName:(NSString*) value; -- (SSKProtoContactDetailsBuilder*) clearName; - -- (BOOL) hasAvatar; -- (SSKProtoContactDetailsAvatar*) avatar; -- (SSKProtoContactDetailsBuilder*) setAvatar:(SSKProtoContactDetailsAvatar*) value; -- (SSKProtoContactDetailsBuilder*) setAvatarBuilder:(SSKProtoContactDetailsAvatarBuilder*) builderForValue; -- (SSKProtoContactDetailsBuilder*) mergeAvatar:(SSKProtoContactDetailsAvatar*) value; -- (SSKProtoContactDetailsBuilder*) clearAvatar; - -- (BOOL) hasColor; -- (NSString*) color; -- (SSKProtoContactDetailsBuilder*) setColor:(NSString*) value; -- (SSKProtoContactDetailsBuilder*) clearColor; - -- (BOOL) hasVerified; -- (SSKProtoVerified*) verified; -- (SSKProtoContactDetailsBuilder*) setVerified:(SSKProtoVerified*) value; -- (SSKProtoContactDetailsBuilder*) setVerifiedBuilder:(SSKProtoVerifiedBuilder*) builderForValue; -- (SSKProtoContactDetailsBuilder*) mergeVerified:(SSKProtoVerified*) value; -- (SSKProtoContactDetailsBuilder*) clearVerified; - -- (BOOL) hasProfileKey; -- (NSData*) profileKey; -- (SSKProtoContactDetailsBuilder*) setProfileKey:(NSData*) value; -- (SSKProtoContactDetailsBuilder*) clearProfileKey; - -- (BOOL) hasBlocked; -- (BOOL) blocked; -- (SSKProtoContactDetailsBuilder*) setBlocked:(BOOL) value; -- (SSKProtoContactDetailsBuilder*) clearBlocked; - -- (BOOL) hasExpireTimer; -- (UInt32) expireTimer; -- (SSKProtoContactDetailsBuilder*) setExpireTimer:(UInt32) value; -- (SSKProtoContactDetailsBuilder*) clearExpireTimer; -@end - -#define GroupDetails_id @"id" -#define GroupDetails_name @"name" -#define GroupDetails_members @"members" -#define GroupDetails_avatar @"avatar" -#define GroupDetails_active @"active" -#define GroupDetails_expireTimer @"expireTimer" -#define GroupDetails_color @"color" -@interface SSKProtoGroupDetails : PBGeneratedMessage { -@private - BOOL hasActive_:1; - BOOL hasName_:1; - BOOL hasColor_:1; - BOOL hasAvatar_:1; - BOOL hasId_:1; - BOOL hasExpireTimer_:1; - BOOL active_:1; - NSString* name; - NSString* color; - SSKProtoGroupDetailsAvatar* avatar; - NSData* id; - UInt32 expireTimer; - NSMutableArray * membersArray; -} -- (BOOL) hasId; -- (BOOL) hasName; -- (BOOL) hasAvatar; -- (BOOL) hasActive; -- (BOOL) hasExpireTimer; -- (BOOL) hasColor; -@property (readonly, strong) NSData* id; -@property (readonly, strong) NSString* name; -@property (readonly, strong) NSArray * members; -@property (readonly, strong) SSKProtoGroupDetailsAvatar* avatar; -- (BOOL) active; -@property (readonly) UInt32 expireTimer; -@property (readonly, strong) NSString* color; -- (NSString*)membersAtIndex:(NSUInteger)index; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoGroupDetailsBuilder*) builder; -+ (SSKProtoGroupDetailsBuilder*) builder; -+ (SSKProtoGroupDetailsBuilder*) builderWithPrototype:(SSKProtoGroupDetails*) prototype; -- (SSKProtoGroupDetailsBuilder*) toBuilder; - -+ (SSKProtoGroupDetails*) parseFromData:(NSData*) data; -+ (SSKProtoGroupDetails*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupDetails*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoGroupDetails*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoGroupDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -#define Avatar_contentType @"contentType" -#define Avatar_length @"length" -@interface SSKProtoGroupDetailsAvatar : PBGeneratedMessage { -@private - BOOL hasContentType_:1; - BOOL hasLength_:1; - NSString* contentType; - UInt32 length; -} -- (BOOL) hasContentType; -- (BOOL) hasLength; -@property (readonly, strong) NSString* contentType; -@property (readonly) UInt32 length; - -+ (instancetype) defaultInstance; -- (instancetype) defaultInstance; - -- (BOOL) isInitialized; -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output; -- (SSKProtoGroupDetailsAvatarBuilder*) builder; -+ (SSKProtoGroupDetailsAvatarBuilder*) builder; -+ (SSKProtoGroupDetailsAvatarBuilder*) builderWithPrototype:(SSKProtoGroupDetailsAvatar*) prototype; -- (SSKProtoGroupDetailsAvatarBuilder*) toBuilder; - -+ (SSKProtoGroupDetailsAvatar*) parseFromData:(NSData*) data; -+ (SSKProtoGroupDetailsAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupDetailsAvatar*) parseFromInputStream:(NSInputStream*) input; -+ (SSKProtoGroupDetailsAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -+ (SSKProtoGroupDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input; -+ (SSKProtoGroupDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; -@end - -@interface SSKProtoGroupDetailsAvatarBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoGroupDetailsAvatar* resultAvatar; -} - -- (SSKProtoGroupDetailsAvatar*) defaultInstance; - -- (SSKProtoGroupDetailsAvatarBuilder*) clear; -- (SSKProtoGroupDetailsAvatarBuilder*) clone; - -- (SSKProtoGroupDetailsAvatar*) build; -- (SSKProtoGroupDetailsAvatar*) buildPartial; - -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFrom:(SSKProtoGroupDetailsAvatar*) other; -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasContentType; -- (NSString*) contentType; -- (SSKProtoGroupDetailsAvatarBuilder*) setContentType:(NSString*) value; -- (SSKProtoGroupDetailsAvatarBuilder*) clearContentType; - -- (BOOL) hasLength; -- (UInt32) length; -- (SSKProtoGroupDetailsAvatarBuilder*) setLength:(UInt32) value; -- (SSKProtoGroupDetailsAvatarBuilder*) clearLength; -@end - -@interface SSKProtoGroupDetailsBuilder : PBGeneratedMessageBuilder { -@private - SSKProtoGroupDetails* resultGroupDetails; -} - -- (SSKProtoGroupDetails*) defaultInstance; - -- (SSKProtoGroupDetailsBuilder*) clear; -- (SSKProtoGroupDetailsBuilder*) clone; - -- (SSKProtoGroupDetails*) build; -- (SSKProtoGroupDetails*) buildPartial; - -- (SSKProtoGroupDetailsBuilder*) mergeFrom:(SSKProtoGroupDetails*) other; -- (SSKProtoGroupDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input; -- (SSKProtoGroupDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry; - -- (BOOL) hasId; -- (NSData*) id; -- (SSKProtoGroupDetailsBuilder*) setId:(NSData*) value; -- (SSKProtoGroupDetailsBuilder*) clearId; - -- (BOOL) hasName; -- (NSString*) name; -- (SSKProtoGroupDetailsBuilder*) setName:(NSString*) value; -- (SSKProtoGroupDetailsBuilder*) clearName; - -- (NSMutableArray *)members; -- (NSString*)membersAtIndex:(NSUInteger)index; -- (SSKProtoGroupDetailsBuilder *)addMembers:(NSString*)value; -- (SSKProtoGroupDetailsBuilder *)setMembersArray:(NSArray *)array; -- (SSKProtoGroupDetailsBuilder *)clearMembers; - -- (BOOL) hasAvatar; -- (SSKProtoGroupDetailsAvatar*) avatar; -- (SSKProtoGroupDetailsBuilder*) setAvatar:(SSKProtoGroupDetailsAvatar*) value; -- (SSKProtoGroupDetailsBuilder*) setAvatarBuilder:(SSKProtoGroupDetailsAvatarBuilder*) builderForValue; -- (SSKProtoGroupDetailsBuilder*) mergeAvatar:(SSKProtoGroupDetailsAvatar*) value; -- (SSKProtoGroupDetailsBuilder*) clearAvatar; - -- (BOOL) hasActive; -- (BOOL) active; -- (SSKProtoGroupDetailsBuilder*) setActive:(BOOL) value; -- (SSKProtoGroupDetailsBuilder*) clearActive; - -- (BOOL) hasExpireTimer; -- (UInt32) expireTimer; -- (SSKProtoGroupDetailsBuilder*) setExpireTimer:(UInt32) value; -- (SSKProtoGroupDetailsBuilder*) clearExpireTimer; - -- (BOOL) hasColor; -- (NSString*) color; -- (SSKProtoGroupDetailsBuilder*) setColor:(NSString*) value; -- (SSKProtoGroupDetailsBuilder*) clearColor; -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m deleted file mode 100644 index 4f7b5e76a..000000000 --- a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m +++ /dev/null @@ -1,13235 +0,0 @@ -// -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. -// - -#import - -// @@protoc_insertion_point(imports) - -@implementation OWSSignalServiceProtosSSKProtoRoot -static PBExtensionRegistry* extensionRegistry = nil; -+ (PBExtensionRegistry*) extensionRegistry { - return extensionRegistry; -} - -+ (void) initialize { - if (self == [OWSSignalServiceProtosSSKProtoRoot class]) { - PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; - [self registerAllExtensions:registry]; - [ObjectivecDescriptorRoot registerAllExtensions:registry]; - extensionRegistry = registry; - } -} -+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { -} -@end - -@interface SSKProtoEnvelope () -@property SSKProtoEnvelopeType type; -@property (strong) NSString* source; -@property UInt32 sourceDevice; -@property (strong) NSString* relay; -@property UInt64 timestamp; -@property (strong) NSData* legacyMessage; -@property (strong) NSData* content; -@end - -@implementation SSKProtoEnvelope - -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasSource { - return !!hasSource_; -} -- (void) setHasSource:(BOOL) _value_ { - hasSource_ = !!_value_; -} -@synthesize source; -- (BOOL) hasSourceDevice { - return !!hasSourceDevice_; -} -- (void) setHasSourceDevice:(BOOL) _value_ { - hasSourceDevice_ = !!_value_; -} -@synthesize sourceDevice; -- (BOOL) hasRelay { - return !!hasRelay_; -} -- (void) setHasRelay:(BOOL) _value_ { - hasRelay_ = !!_value_; -} -@synthesize relay; -- (BOOL) hasTimestamp { - return !!hasTimestamp_; -} -- (void) setHasTimestamp:(BOOL) _value_ { - hasTimestamp_ = !!_value_; -} -@synthesize timestamp; -- (BOOL) hasLegacyMessage { - return !!hasLegacyMessage_; -} -- (void) setHasLegacyMessage:(BOOL) _value_ { - hasLegacyMessage_ = !!_value_; -} -@synthesize legacyMessage; -- (BOOL) hasContent { - return !!hasContent_; -} -- (void) setHasContent:(BOOL) _value_ { - hasContent_ = !!_value_; -} -@synthesize content; -- (instancetype) init { - if ((self = [super init])) { - self.type = SSKProtoEnvelopeTypeUnknown; - self.source = @""; - self.sourceDevice = 0; - self.relay = @""; - self.timestamp = 0L; - self.legacyMessage = [NSData data]; - self.content = [NSData data]; - } - return self; -} -static SSKProtoEnvelope* defaultSSKProtoEnvelopeInstance = nil; -+ (void) initialize { - if (self == [SSKProtoEnvelope class]) { - defaultSSKProtoEnvelopeInstance = [[SSKProtoEnvelope alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoEnvelopeInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoEnvelopeInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasType) { - [output writeEnum:1 value:self.type]; - } - if (self.hasSource) { - [output writeString:2 value:self.source]; - } - if (self.hasRelay) { - [output writeString:3 value:self.relay]; - } - if (self.hasTimestamp) { - [output writeUInt64:5 value:self.timestamp]; - } - if (self.hasLegacyMessage) { - [output writeData:6 value:self.legacyMessage]; - } - if (self.hasSourceDevice) { - [output writeUInt32:7 value:self.sourceDevice]; - } - if (self.hasContent) { - [output writeData:8 value:self.content]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasType) { - size_ += computeEnumSize(1, self.type); - } - if (self.hasSource) { - size_ += computeStringSize(2, self.source); - } - if (self.hasRelay) { - size_ += computeStringSize(3, self.relay); - } - if (self.hasTimestamp) { - size_ += computeUInt64Size(5, self.timestamp); - } - if (self.hasLegacyMessage) { - size_ += computeDataSize(6, self.legacyMessage); - } - if (self.hasSourceDevice) { - size_ += computeUInt32Size(7, self.sourceDevice); - } - if (self.hasContent) { - size_ += computeDataSize(8, self.content); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoEnvelope*) parseFromData:(NSData*) data { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromData:data] build]; -} -+ (SSKProtoEnvelope*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoEnvelope*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoEnvelope*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoEnvelope*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoEnvelope*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoEnvelope*)[[[SSKProtoEnvelope builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoEnvelopeBuilder*) builder { - return [[SSKProtoEnvelopeBuilder alloc] init]; -} -+ (SSKProtoEnvelopeBuilder*) builderWithPrototype:(SSKProtoEnvelope*) prototype { - return [[SSKProtoEnvelope builder] mergeFrom:prototype]; -} -- (SSKProtoEnvelopeBuilder*) builder { - return [SSKProtoEnvelope builder]; -} -- (SSKProtoEnvelopeBuilder*) toBuilder { - return [SSKProtoEnvelope builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoEnvelopeType(self.type)]; - } - if (self.hasSource) { - [output appendFormat:@"%@%@: %@\n", indent, @"source", self.source]; - } - if (self.hasRelay) { - [output appendFormat:@"%@%@: %@\n", indent, @"relay", self.relay]; - } - if (self.hasTimestamp) { - [output appendFormat:@"%@%@: %@\n", indent, @"timestamp", [NSNumber numberWithLongLong:self.timestamp]]; - } - if (self.hasLegacyMessage) { - [output appendFormat:@"%@%@: %@\n", indent, @"legacyMessage", self.legacyMessage]; - } - if (self.hasSourceDevice) { - [output appendFormat:@"%@%@: %@\n", indent, @"sourceDevice", [NSNumber numberWithInteger:self.sourceDevice]]; - } - if (self.hasContent) { - [output appendFormat:@"%@%@: %@\n", indent, @"content", self.content]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - if (self.hasSource) { - [dictionary setObject: self.source forKey: @"source"]; - } - if (self.hasRelay) { - [dictionary setObject: self.relay forKey: @"relay"]; - } - if (self.hasTimestamp) { - [dictionary setObject: [NSNumber numberWithLongLong:self.timestamp] forKey: @"timestamp"]; - } - if (self.hasLegacyMessage) { - [dictionary setObject: self.legacyMessage forKey: @"legacyMessage"]; - } - if (self.hasSourceDevice) { - [dictionary setObject: [NSNumber numberWithInteger:self.sourceDevice] forKey: @"sourceDevice"]; - } - if (self.hasContent) { - [dictionary setObject: self.content forKey: @"content"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoEnvelope class]]) { - return NO; - } - SSKProtoEnvelope *otherMessage = other; - return - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasSource == otherMessage.hasSource && - (!self.hasSource || [self.source isEqual:otherMessage.source]) && - self.hasRelay == otherMessage.hasRelay && - (!self.hasRelay || [self.relay isEqual:otherMessage.relay]) && - self.hasTimestamp == otherMessage.hasTimestamp && - (!self.hasTimestamp || self.timestamp == otherMessage.timestamp) && - self.hasLegacyMessage == otherMessage.hasLegacyMessage && - (!self.hasLegacyMessage || [self.legacyMessage isEqual:otherMessage.legacyMessage]) && - self.hasSourceDevice == otherMessage.hasSourceDevice && - (!self.hasSourceDevice || self.sourceDevice == otherMessage.sourceDevice) && - self.hasContent == otherMessage.hasContent && - (!self.hasContent || [self.content isEqual:otherMessage.content]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasSource) { - hashCode = hashCode * 31 + [self.source hash]; - } - if (self.hasRelay) { - hashCode = hashCode * 31 + [self.relay hash]; - } - if (self.hasTimestamp) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestamp] hash]; - } - if (self.hasLegacyMessage) { - hashCode = hashCode * 31 + [self.legacyMessage hash]; - } - if (self.hasSourceDevice) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sourceDevice] hash]; - } - if (self.hasContent) { - hashCode = hashCode * 31 + [self.content hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoEnvelopeTypeIsValidValue(SSKProtoEnvelopeType value) { - switch (value) { - case SSKProtoEnvelopeTypeUnknown: - case SSKProtoEnvelopeTypeCiphertext: - case SSKProtoEnvelopeTypeKeyExchange: - case SSKProtoEnvelopeTypePrekeyBundle: - case SSKProtoEnvelopeTypeReceipt: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoEnvelopeType(SSKProtoEnvelopeType value) { - switch (value) { - case SSKProtoEnvelopeTypeUnknown: - return @"SSKProtoEnvelopeTypeUnknown"; - case SSKProtoEnvelopeTypeCiphertext: - return @"SSKProtoEnvelopeTypeCiphertext"; - case SSKProtoEnvelopeTypeKeyExchange: - return @"SSKProtoEnvelopeTypeKeyExchange"; - case SSKProtoEnvelopeTypePrekeyBundle: - return @"SSKProtoEnvelopeTypePrekeyBundle"; - case SSKProtoEnvelopeTypeReceipt: - return @"SSKProtoEnvelopeTypeReceipt"; - default: - return nil; - } -} - -@interface SSKProtoEnvelopeBuilder() -@property (strong) SSKProtoEnvelope* resultEnvelope; -@end - -@implementation SSKProtoEnvelopeBuilder -@synthesize resultEnvelope; -- (instancetype) init { - if ((self = [super init])) { - self.resultEnvelope = [[SSKProtoEnvelope alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultEnvelope; -} -- (SSKProtoEnvelopeBuilder*) clear { - self.resultEnvelope = [[SSKProtoEnvelope alloc] init]; - return self; -} -- (SSKProtoEnvelopeBuilder*) clone { - return [SSKProtoEnvelope builderWithPrototype:resultEnvelope]; -} -- (SSKProtoEnvelope*) defaultInstance { - return [SSKProtoEnvelope defaultInstance]; -} -- (SSKProtoEnvelope*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoEnvelope*) buildPartial { - SSKProtoEnvelope* returnMe = resultEnvelope; - self.resultEnvelope = nil; - return returnMe; -} -- (SSKProtoEnvelopeBuilder*) mergeFrom:(SSKProtoEnvelope*) other { - if (other == [SSKProtoEnvelope defaultInstance]) { - return self; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasSource) { - [self setSource:other.source]; - } - if (other.hasSourceDevice) { - [self setSourceDevice:other.sourceDevice]; - } - if (other.hasRelay) { - [self setRelay:other.relay]; - } - if (other.hasTimestamp) { - [self setTimestamp:other.timestamp]; - } - if (other.hasLegacyMessage) { - [self setLegacyMessage:other.legacyMessage]; - } - if (other.hasContent) { - [self setContent:other.content]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoEnvelopeBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoEnvelopeBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - SSKProtoEnvelopeType value = (SSKProtoEnvelopeType)[input readEnum]; - if (SSKProtoEnvelopeTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 18: { - [self setSource:[input readString]]; - break; - } - case 26: { - [self setRelay:[input readString]]; - break; - } - case 40: { - [self setTimestamp:[input readUInt64]]; - break; - } - case 50: { - [self setLegacyMessage:[input readData]]; - break; - } - case 56: { - [self setSourceDevice:[input readUInt32]]; - break; - } - case 66: { - [self setContent:[input readData]]; - break; - } - } - } -} -- (BOOL) hasType { - return resultEnvelope.hasType; -} -- (SSKProtoEnvelopeType) type { - return resultEnvelope.type; -} -- (SSKProtoEnvelopeBuilder*) setType:(SSKProtoEnvelopeType) value { - resultEnvelope.hasType = YES; - resultEnvelope.type = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearType { - resultEnvelope.hasType = NO; - resultEnvelope.type = SSKProtoEnvelopeTypeUnknown; - return self; -} -- (BOOL) hasSource { - return resultEnvelope.hasSource; -} -- (NSString*) source { - return resultEnvelope.source; -} -- (SSKProtoEnvelopeBuilder*) setSource:(NSString*) value { - resultEnvelope.hasSource = YES; - resultEnvelope.source = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearSource { - resultEnvelope.hasSource = NO; - resultEnvelope.source = @""; - return self; -} -- (BOOL) hasSourceDevice { - return resultEnvelope.hasSourceDevice; -} -- (UInt32) sourceDevice { - return resultEnvelope.sourceDevice; -} -- (SSKProtoEnvelopeBuilder*) setSourceDevice:(UInt32) value { - resultEnvelope.hasSourceDevice = YES; - resultEnvelope.sourceDevice = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearSourceDevice { - resultEnvelope.hasSourceDevice = NO; - resultEnvelope.sourceDevice = 0; - return self; -} -- (BOOL) hasRelay { - return resultEnvelope.hasRelay; -} -- (NSString*) relay { - return resultEnvelope.relay; -} -- (SSKProtoEnvelopeBuilder*) setRelay:(NSString*) value { - resultEnvelope.hasRelay = YES; - resultEnvelope.relay = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearRelay { - resultEnvelope.hasRelay = NO; - resultEnvelope.relay = @""; - return self; -} -- (BOOL) hasTimestamp { - return resultEnvelope.hasTimestamp; -} -- (UInt64) timestamp { - return resultEnvelope.timestamp; -} -- (SSKProtoEnvelopeBuilder*) setTimestamp:(UInt64) value { - resultEnvelope.hasTimestamp = YES; - resultEnvelope.timestamp = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearTimestamp { - resultEnvelope.hasTimestamp = NO; - resultEnvelope.timestamp = 0L; - return self; -} -- (BOOL) hasLegacyMessage { - return resultEnvelope.hasLegacyMessage; -} -- (NSData*) legacyMessage { - return resultEnvelope.legacyMessage; -} -- (SSKProtoEnvelopeBuilder*) setLegacyMessage:(NSData*) value { - resultEnvelope.hasLegacyMessage = YES; - resultEnvelope.legacyMessage = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearLegacyMessage { - resultEnvelope.hasLegacyMessage = NO; - resultEnvelope.legacyMessage = [NSData data]; - return self; -} -- (BOOL) hasContent { - return resultEnvelope.hasContent; -} -- (NSData*) content { - return resultEnvelope.content; -} -- (SSKProtoEnvelopeBuilder*) setContent:(NSData*) value { - resultEnvelope.hasContent = YES; - resultEnvelope.content = value; - return self; -} -- (SSKProtoEnvelopeBuilder*) clearContent { - resultEnvelope.hasContent = NO; - resultEnvelope.content = [NSData data]; - return self; -} -@end - -@interface SSKProtoContent () -@property (strong) SSKProtoDataMessage* dataMessage; -@property (strong) SSKProtoSyncMessage* syncMessage; -@property (strong) SSKProtoCallMessage* callMessage; -@property (strong) SSKProtoNullMessage* nullMessage; -@property (strong) SSKProtoReceiptMessage* receiptMessage; -@end - -@implementation SSKProtoContent - -- (BOOL) hasDataMessage { - return !!hasDataMessage_; -} -- (void) setHasDataMessage:(BOOL) _value_ { - hasDataMessage_ = !!_value_; -} -@synthesize dataMessage; -- (BOOL) hasSyncMessage { - return !!hasSyncMessage_; -} -- (void) setHasSyncMessage:(BOOL) _value_ { - hasSyncMessage_ = !!_value_; -} -@synthesize syncMessage; -- (BOOL) hasCallMessage { - return !!hasCallMessage_; -} -- (void) setHasCallMessage:(BOOL) _value_ { - hasCallMessage_ = !!_value_; -} -@synthesize callMessage; -- (BOOL) hasNullMessage { - return !!hasNullMessage_; -} -- (void) setHasNullMessage:(BOOL) _value_ { - hasNullMessage_ = !!_value_; -} -@synthesize nullMessage; -- (BOOL) hasReceiptMessage { - return !!hasReceiptMessage_; -} -- (void) setHasReceiptMessage:(BOOL) _value_ { - hasReceiptMessage_ = !!_value_; -} -@synthesize receiptMessage; -- (instancetype) init { - if ((self = [super init])) { - self.dataMessage = [SSKProtoDataMessage defaultInstance]; - self.syncMessage = [SSKProtoSyncMessage defaultInstance]; - self.callMessage = [SSKProtoCallMessage defaultInstance]; - self.nullMessage = [SSKProtoNullMessage defaultInstance]; - self.receiptMessage = [SSKProtoReceiptMessage defaultInstance]; - } - return self; -} -static SSKProtoContent* defaultSSKProtoContentInstance = nil; -+ (void) initialize { - if (self == [SSKProtoContent class]) { - defaultSSKProtoContentInstance = [[SSKProtoContent alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoContentInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoContentInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasDataMessage) { - [output writeMessage:1 value:self.dataMessage]; - } - if (self.hasSyncMessage) { - [output writeMessage:2 value:self.syncMessage]; - } - if (self.hasCallMessage) { - [output writeMessage:3 value:self.callMessage]; - } - if (self.hasNullMessage) { - [output writeMessage:4 value:self.nullMessage]; - } - if (self.hasReceiptMessage) { - [output writeMessage:5 value:self.receiptMessage]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasDataMessage) { - size_ += computeMessageSize(1, self.dataMessage); - } - if (self.hasSyncMessage) { - size_ += computeMessageSize(2, self.syncMessage); - } - if (self.hasCallMessage) { - size_ += computeMessageSize(3, self.callMessage); - } - if (self.hasNullMessage) { - size_ += computeMessageSize(4, self.nullMessage); - } - if (self.hasReceiptMessage) { - size_ += computeMessageSize(5, self.receiptMessage); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoContent*) parseFromData:(NSData*) data { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromData:data] build]; -} -+ (SSKProtoContent*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContent*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoContent*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContent*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoContent*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContent*)[[[SSKProtoContent builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContentBuilder*) builder { - return [[SSKProtoContentBuilder alloc] init]; -} -+ (SSKProtoContentBuilder*) builderWithPrototype:(SSKProtoContent*) prototype { - return [[SSKProtoContent builder] mergeFrom:prototype]; -} -- (SSKProtoContentBuilder*) builder { - return [SSKProtoContent builder]; -} -- (SSKProtoContentBuilder*) toBuilder { - return [SSKProtoContent builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasDataMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"dataMessage"]; - [self.dataMessage writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasSyncMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"syncMessage"]; - [self.syncMessage writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasCallMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"callMessage"]; - [self.callMessage writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasNullMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"nullMessage"]; - [self.nullMessage writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasReceiptMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"receiptMessage"]; - [self.receiptMessage writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasDataMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.dataMessage storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"dataMessage"]; - } - if (self.hasSyncMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.syncMessage storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"syncMessage"]; - } - if (self.hasCallMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.callMessage storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"callMessage"]; - } - if (self.hasNullMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.nullMessage storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"nullMessage"]; - } - if (self.hasReceiptMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.receiptMessage storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"receiptMessage"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoContent class]]) { - return NO; - } - SSKProtoContent *otherMessage = other; - return - self.hasDataMessage == otherMessage.hasDataMessage && - (!self.hasDataMessage || [self.dataMessage isEqual:otherMessage.dataMessage]) && - self.hasSyncMessage == otherMessage.hasSyncMessage && - (!self.hasSyncMessage || [self.syncMessage isEqual:otherMessage.syncMessage]) && - self.hasCallMessage == otherMessage.hasCallMessage && - (!self.hasCallMessage || [self.callMessage isEqual:otherMessage.callMessage]) && - self.hasNullMessage == otherMessage.hasNullMessage && - (!self.hasNullMessage || [self.nullMessage isEqual:otherMessage.nullMessage]) && - self.hasReceiptMessage == otherMessage.hasReceiptMessage && - (!self.hasReceiptMessage || [self.receiptMessage isEqual:otherMessage.receiptMessage]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasDataMessage) { - hashCode = hashCode * 31 + [self.dataMessage hash]; - } - if (self.hasSyncMessage) { - hashCode = hashCode * 31 + [self.syncMessage hash]; - } - if (self.hasCallMessage) { - hashCode = hashCode * 31 + [self.callMessage hash]; - } - if (self.hasNullMessage) { - hashCode = hashCode * 31 + [self.nullMessage hash]; - } - if (self.hasReceiptMessage) { - hashCode = hashCode * 31 + [self.receiptMessage hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoContentBuilder() -@property (strong) SSKProtoContent* resultContent; -@end - -@implementation SSKProtoContentBuilder -@synthesize resultContent; -- (instancetype) init { - if ((self = [super init])) { - self.resultContent = [[SSKProtoContent alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultContent; -} -- (SSKProtoContentBuilder*) clear { - self.resultContent = [[SSKProtoContent alloc] init]; - return self; -} -- (SSKProtoContentBuilder*) clone { - return [SSKProtoContent builderWithPrototype:resultContent]; -} -- (SSKProtoContent*) defaultInstance { - return [SSKProtoContent defaultInstance]; -} -- (SSKProtoContent*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoContent*) buildPartial { - SSKProtoContent* returnMe = resultContent; - self.resultContent = nil; - return returnMe; -} -- (SSKProtoContentBuilder*) mergeFrom:(SSKProtoContent*) other { - if (other == [SSKProtoContent defaultInstance]) { - return self; - } - if (other.hasDataMessage) { - [self mergeDataMessage:other.dataMessage]; - } - if (other.hasSyncMessage) { - [self mergeSyncMessage:other.syncMessage]; - } - if (other.hasCallMessage) { - [self mergeCallMessage:other.callMessage]; - } - if (other.hasNullMessage) { - [self mergeNullMessage:other.nullMessage]; - } - if (other.hasReceiptMessage) { - [self mergeReceiptMessage:other.receiptMessage]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoContentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoContentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoDataMessageBuilder* subBuilder = [SSKProtoDataMessage builder]; - if (self.hasDataMessage) { - [subBuilder mergeFrom:self.dataMessage]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setDataMessage:[subBuilder buildPartial]]; - break; - } - case 18: { - SSKProtoSyncMessageBuilder* subBuilder = [SSKProtoSyncMessage builder]; - if (self.hasSyncMessage) { - [subBuilder mergeFrom:self.syncMessage]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setSyncMessage:[subBuilder buildPartial]]; - break; - } - case 26: { - SSKProtoCallMessageBuilder* subBuilder = [SSKProtoCallMessage builder]; - if (self.hasCallMessage) { - [subBuilder mergeFrom:self.callMessage]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setCallMessage:[subBuilder buildPartial]]; - break; - } - case 34: { - SSKProtoNullMessageBuilder* subBuilder = [SSKProtoNullMessage builder]; - if (self.hasNullMessage) { - [subBuilder mergeFrom:self.nullMessage]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setNullMessage:[subBuilder buildPartial]]; - break; - } - case 42: { - SSKProtoReceiptMessageBuilder* subBuilder = [SSKProtoReceiptMessage builder]; - if (self.hasReceiptMessage) { - [subBuilder mergeFrom:self.receiptMessage]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setReceiptMessage:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasDataMessage { - return resultContent.hasDataMessage; -} -- (SSKProtoDataMessage*) dataMessage { - return resultContent.dataMessage; -} -- (SSKProtoContentBuilder*) setDataMessage:(SSKProtoDataMessage*) value { - resultContent.hasDataMessage = YES; - resultContent.dataMessage = value; - return self; -} -- (SSKProtoContentBuilder*) setDataMessageBuilder:(SSKProtoDataMessageBuilder*) builderForValue { - return [self setDataMessage:[builderForValue build]]; -} -- (SSKProtoContentBuilder*) mergeDataMessage:(SSKProtoDataMessage*) value { - if (resultContent.hasDataMessage && - resultContent.dataMessage != [SSKProtoDataMessage defaultInstance]) { - resultContent.dataMessage = - [[[SSKProtoDataMessage builderWithPrototype:resultContent.dataMessage] mergeFrom:value] buildPartial]; - } else { - resultContent.dataMessage = value; - } - resultContent.hasDataMessage = YES; - return self; -} -- (SSKProtoContentBuilder*) clearDataMessage { - resultContent.hasDataMessage = NO; - resultContent.dataMessage = [SSKProtoDataMessage defaultInstance]; - return self; -} -- (BOOL) hasSyncMessage { - return resultContent.hasSyncMessage; -} -- (SSKProtoSyncMessage*) syncMessage { - return resultContent.syncMessage; -} -- (SSKProtoContentBuilder*) setSyncMessage:(SSKProtoSyncMessage*) value { - resultContent.hasSyncMessage = YES; - resultContent.syncMessage = value; - return self; -} -- (SSKProtoContentBuilder*) setSyncMessageBuilder:(SSKProtoSyncMessageBuilder*) builderForValue { - return [self setSyncMessage:[builderForValue build]]; -} -- (SSKProtoContentBuilder*) mergeSyncMessage:(SSKProtoSyncMessage*) value { - if (resultContent.hasSyncMessage && - resultContent.syncMessage != [SSKProtoSyncMessage defaultInstance]) { - resultContent.syncMessage = - [[[SSKProtoSyncMessage builderWithPrototype:resultContent.syncMessage] mergeFrom:value] buildPartial]; - } else { - resultContent.syncMessage = value; - } - resultContent.hasSyncMessage = YES; - return self; -} -- (SSKProtoContentBuilder*) clearSyncMessage { - resultContent.hasSyncMessage = NO; - resultContent.syncMessage = [SSKProtoSyncMessage defaultInstance]; - return self; -} -- (BOOL) hasCallMessage { - return resultContent.hasCallMessage; -} -- (SSKProtoCallMessage*) callMessage { - return resultContent.callMessage; -} -- (SSKProtoContentBuilder*) setCallMessage:(SSKProtoCallMessage*) value { - resultContent.hasCallMessage = YES; - resultContent.callMessage = value; - return self; -} -- (SSKProtoContentBuilder*) setCallMessageBuilder:(SSKProtoCallMessageBuilder*) builderForValue { - return [self setCallMessage:[builderForValue build]]; -} -- (SSKProtoContentBuilder*) mergeCallMessage:(SSKProtoCallMessage*) value { - if (resultContent.hasCallMessage && - resultContent.callMessage != [SSKProtoCallMessage defaultInstance]) { - resultContent.callMessage = - [[[SSKProtoCallMessage builderWithPrototype:resultContent.callMessage] mergeFrom:value] buildPartial]; - } else { - resultContent.callMessage = value; - } - resultContent.hasCallMessage = YES; - return self; -} -- (SSKProtoContentBuilder*) clearCallMessage { - resultContent.hasCallMessage = NO; - resultContent.callMessage = [SSKProtoCallMessage defaultInstance]; - return self; -} -- (BOOL) hasNullMessage { - return resultContent.hasNullMessage; -} -- (SSKProtoNullMessage*) nullMessage { - return resultContent.nullMessage; -} -- (SSKProtoContentBuilder*) setNullMessage:(SSKProtoNullMessage*) value { - resultContent.hasNullMessage = YES; - resultContent.nullMessage = value; - return self; -} -- (SSKProtoContentBuilder*) setNullMessageBuilder:(SSKProtoNullMessageBuilder*) builderForValue { - return [self setNullMessage:[builderForValue build]]; -} -- (SSKProtoContentBuilder*) mergeNullMessage:(SSKProtoNullMessage*) value { - if (resultContent.hasNullMessage && - resultContent.nullMessage != [SSKProtoNullMessage defaultInstance]) { - resultContent.nullMessage = - [[[SSKProtoNullMessage builderWithPrototype:resultContent.nullMessage] mergeFrom:value] buildPartial]; - } else { - resultContent.nullMessage = value; - } - resultContent.hasNullMessage = YES; - return self; -} -- (SSKProtoContentBuilder*) clearNullMessage { - resultContent.hasNullMessage = NO; - resultContent.nullMessage = [SSKProtoNullMessage defaultInstance]; - return self; -} -- (BOOL) hasReceiptMessage { - return resultContent.hasReceiptMessage; -} -- (SSKProtoReceiptMessage*) receiptMessage { - return resultContent.receiptMessage; -} -- (SSKProtoContentBuilder*) setReceiptMessage:(SSKProtoReceiptMessage*) value { - resultContent.hasReceiptMessage = YES; - resultContent.receiptMessage = value; - return self; -} -- (SSKProtoContentBuilder*) setReceiptMessageBuilder:(SSKProtoReceiptMessageBuilder*) builderForValue { - return [self setReceiptMessage:[builderForValue build]]; -} -- (SSKProtoContentBuilder*) mergeReceiptMessage:(SSKProtoReceiptMessage*) value { - if (resultContent.hasReceiptMessage && - resultContent.receiptMessage != [SSKProtoReceiptMessage defaultInstance]) { - resultContent.receiptMessage = - [[[SSKProtoReceiptMessage builderWithPrototype:resultContent.receiptMessage] mergeFrom:value] buildPartial]; - } else { - resultContent.receiptMessage = value; - } - resultContent.hasReceiptMessage = YES; - return self; -} -- (SSKProtoContentBuilder*) clearReceiptMessage { - resultContent.hasReceiptMessage = NO; - resultContent.receiptMessage = [SSKProtoReceiptMessage defaultInstance]; - return self; -} -@end - -@interface SSKProtoCallMessage () -@property (strong) SSKProtoCallMessageOffer* offer; -@property (strong) SSKProtoCallMessageAnswer* answer; -@property (strong) NSMutableArray * iceUpdateArray; -@property (strong) SSKProtoCallMessageHangup* hangup; -@property (strong) SSKProtoCallMessageBusy* busy; -@property (strong) NSData* profileKey; -@end - -@implementation SSKProtoCallMessage - -- (BOOL) hasOffer { - return !!hasOffer_; -} -- (void) setHasOffer:(BOOL) _value_ { - hasOffer_ = !!_value_; -} -@synthesize offer; -- (BOOL) hasAnswer { - return !!hasAnswer_; -} -- (void) setHasAnswer:(BOOL) _value_ { - hasAnswer_ = !!_value_; -} -@synthesize answer; -@synthesize iceUpdateArray; -@dynamic iceUpdate; -- (BOOL) hasHangup { - return !!hasHangup_; -} -- (void) setHasHangup:(BOOL) _value_ { - hasHangup_ = !!_value_; -} -@synthesize hangup; -- (BOOL) hasBusy { - return !!hasBusy_; -} -- (void) setHasBusy:(BOOL) _value_ { - hasBusy_ = !!_value_; -} -@synthesize busy; -- (BOOL) hasProfileKey { - return !!hasProfileKey_; -} -- (void) setHasProfileKey:(BOOL) _value_ { - hasProfileKey_ = !!_value_; -} -@synthesize profileKey; -- (instancetype) init { - if ((self = [super init])) { - self.offer = [SSKProtoCallMessageOffer defaultInstance]; - self.answer = [SSKProtoCallMessageAnswer defaultInstance]; - self.hangup = [SSKProtoCallMessageHangup defaultInstance]; - self.busy = [SSKProtoCallMessageBusy defaultInstance]; - self.profileKey = [NSData data]; - } - return self; -} -static SSKProtoCallMessage* defaultSSKProtoCallMessageInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessage class]) { - defaultSSKProtoCallMessageInstance = [[SSKProtoCallMessage alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageInstance; -} -- (NSArray *)iceUpdate { - return iceUpdateArray; -} -- (SSKProtoCallMessageIceUpdate*)iceUpdateAtIndex:(NSUInteger)index { - return [iceUpdateArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasOffer) { - [output writeMessage:1 value:self.offer]; - } - if (self.hasAnswer) { - [output writeMessage:2 value:self.answer]; - } - [self.iceUpdateArray enumerateObjectsUsingBlock:^(SSKProtoCallMessageIceUpdate *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:3 value:element]; - }]; - if (self.hasHangup) { - [output writeMessage:4 value:self.hangup]; - } - if (self.hasBusy) { - [output writeMessage:5 value:self.busy]; - } - if (self.hasProfileKey) { - [output writeData:6 value:self.profileKey]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasOffer) { - size_ += computeMessageSize(1, self.offer); - } - if (self.hasAnswer) { - size_ += computeMessageSize(2, self.answer); - } - [self.iceUpdateArray enumerateObjectsUsingBlock:^(SSKProtoCallMessageIceUpdate *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(3, element); - }]; - if (self.hasHangup) { - size_ += computeMessageSize(4, self.hangup); - } - if (self.hasBusy) { - size_ += computeMessageSize(5, self.busy); - } - if (self.hasProfileKey) { - size_ += computeDataSize(6, self.profileKey); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessage*) parseFromData:(NSData*) data { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessage*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessage*)[[[SSKProtoCallMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageBuilder*) builder { - return [[SSKProtoCallMessageBuilder alloc] init]; -} -+ (SSKProtoCallMessageBuilder*) builderWithPrototype:(SSKProtoCallMessage*) prototype { - return [[SSKProtoCallMessage builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageBuilder*) builder { - return [SSKProtoCallMessage builder]; -} -- (SSKProtoCallMessageBuilder*) toBuilder { - return [SSKProtoCallMessage builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasOffer) { - [output appendFormat:@"%@%@ {\n", indent, @"offer"]; - [self.offer writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasAnswer) { - [output appendFormat:@"%@%@ {\n", indent, @"answer"]; - [self.answer writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.iceUpdateArray enumerateObjectsUsingBlock:^(SSKProtoCallMessageIceUpdate *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"iceUpdate"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - if (self.hasHangup) { - [output appendFormat:@"%@%@ {\n", indent, @"hangup"]; - [self.hangup writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasBusy) { - [output appendFormat:@"%@%@ {\n", indent, @"busy"]; - [self.busy writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasProfileKey) { - [output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasOffer) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.offer storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"offer"]; - } - if (self.hasAnswer) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.answer storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"answer"]; - } - for (SSKProtoCallMessageIceUpdate* element in self.iceUpdateArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"iceUpdate"]; - } - if (self.hasHangup) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.hangup storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"hangup"]; - } - if (self.hasBusy) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.busy storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"busy"]; - } - if (self.hasProfileKey) { - [dictionary setObject: self.profileKey forKey: @"profileKey"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessage class]]) { - return NO; - } - SSKProtoCallMessage *otherMessage = other; - return - self.hasOffer == otherMessage.hasOffer && - (!self.hasOffer || [self.offer isEqual:otherMessage.offer]) && - self.hasAnswer == otherMessage.hasAnswer && - (!self.hasAnswer || [self.answer isEqual:otherMessage.answer]) && - [self.iceUpdateArray isEqualToArray:otherMessage.iceUpdateArray] && - self.hasHangup == otherMessage.hasHangup && - (!self.hasHangup || [self.hangup isEqual:otherMessage.hangup]) && - self.hasBusy == otherMessage.hasBusy && - (!self.hasBusy || [self.busy isEqual:otherMessage.busy]) && - self.hasProfileKey == otherMessage.hasProfileKey && - (!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasOffer) { - hashCode = hashCode * 31 + [self.offer hash]; - } - if (self.hasAnswer) { - hashCode = hashCode * 31 + [self.answer hash]; - } - [self.iceUpdateArray enumerateObjectsUsingBlock:^(SSKProtoCallMessageIceUpdate *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasHangup) { - hashCode = hashCode * 31 + [self.hangup hash]; - } - if (self.hasBusy) { - hashCode = hashCode * 31 + [self.busy hash]; - } - if (self.hasProfileKey) { - hashCode = hashCode * 31 + [self.profileKey hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageOffer () -@property UInt64 id; -@property (strong) NSString* sessionDescription; -@end - -@implementation SSKProtoCallMessageOffer - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasSessionDescription { - return !!hasSessionDescription_; -} -- (void) setHasSessionDescription:(BOOL) _value_ { - hasSessionDescription_ = !!_value_; -} -@synthesize sessionDescription; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - self.sessionDescription = @""; - } - return self; -} -static SSKProtoCallMessageOffer* defaultSSKProtoCallMessageOfferInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessageOffer class]) { - defaultSSKProtoCallMessageOfferInstance = [[SSKProtoCallMessageOffer alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageOfferInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageOfferInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - if (self.hasSessionDescription) { - [output writeString:2 value:self.sessionDescription]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - if (self.hasSessionDescription) { - size_ += computeStringSize(2, self.sessionDescription); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessageOffer*) parseFromData:(NSData*) data { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessageOffer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageOffer*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessageOffer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageOffer*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessageOffer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageOffer*)[[[SSKProtoCallMessageOffer builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageOfferBuilder*) builder { - return [[SSKProtoCallMessageOfferBuilder alloc] init]; -} -+ (SSKProtoCallMessageOfferBuilder*) builderWithPrototype:(SSKProtoCallMessageOffer*) prototype { - return [[SSKProtoCallMessageOffer builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageOfferBuilder*) builder { - return [SSKProtoCallMessageOffer builder]; -} -- (SSKProtoCallMessageOfferBuilder*) toBuilder { - return [SSKProtoCallMessageOffer builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - if (self.hasSessionDescription) { - [output appendFormat:@"%@%@: %@\n", indent, @"sessionDescription", self.sessionDescription]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - if (self.hasSessionDescription) { - [dictionary setObject: self.sessionDescription forKey: @"sessionDescription"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessageOffer class]]) { - return NO; - } - SSKProtoCallMessageOffer *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - self.hasSessionDescription == otherMessage.hasSessionDescription && - (!self.hasSessionDescription || [self.sessionDescription isEqual:otherMessage.sessionDescription]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - if (self.hasSessionDescription) { - hashCode = hashCode * 31 + [self.sessionDescription hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageOfferBuilder() -@property (strong) SSKProtoCallMessageOffer* resultOffer; -@end - -@implementation SSKProtoCallMessageOfferBuilder -@synthesize resultOffer; -- (instancetype) init { - if ((self = [super init])) { - self.resultOffer = [[SSKProtoCallMessageOffer alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultOffer; -} -- (SSKProtoCallMessageOfferBuilder*) clear { - self.resultOffer = [[SSKProtoCallMessageOffer alloc] init]; - return self; -} -- (SSKProtoCallMessageOfferBuilder*) clone { - return [SSKProtoCallMessageOffer builderWithPrototype:resultOffer]; -} -- (SSKProtoCallMessageOffer*) defaultInstance { - return [SSKProtoCallMessageOffer defaultInstance]; -} -- (SSKProtoCallMessageOffer*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessageOffer*) buildPartial { - SSKProtoCallMessageOffer* returnMe = resultOffer; - self.resultOffer = nil; - return returnMe; -} -- (SSKProtoCallMessageOfferBuilder*) mergeFrom:(SSKProtoCallMessageOffer*) other { - if (other == [SSKProtoCallMessageOffer defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasSessionDescription) { - [self setSessionDescription:other.sessionDescription]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageOfferBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageOfferBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - case 18: { - [self setSessionDescription:[input readString]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultOffer.hasId; -} -- (UInt64) id { - return resultOffer.id; -} -- (SSKProtoCallMessageOfferBuilder*) setId:(UInt64) value { - resultOffer.hasId = YES; - resultOffer.id = value; - return self; -} -- (SSKProtoCallMessageOfferBuilder*) clearId { - resultOffer.hasId = NO; - resultOffer.id = 0L; - return self; -} -- (BOOL) hasSessionDescription { - return resultOffer.hasSessionDescription; -} -- (NSString*) sessionDescription { - return resultOffer.sessionDescription; -} -- (SSKProtoCallMessageOfferBuilder*) setSessionDescription:(NSString*) value { - resultOffer.hasSessionDescription = YES; - resultOffer.sessionDescription = value; - return self; -} -- (SSKProtoCallMessageOfferBuilder*) clearSessionDescription { - resultOffer.hasSessionDescription = NO; - resultOffer.sessionDescription = @""; - return self; -} -@end - -@interface SSKProtoCallMessageAnswer () -@property UInt64 id; -@property (strong) NSString* sessionDescription; -@end - -@implementation SSKProtoCallMessageAnswer - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasSessionDescription { - return !!hasSessionDescription_; -} -- (void) setHasSessionDescription:(BOOL) _value_ { - hasSessionDescription_ = !!_value_; -} -@synthesize sessionDescription; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - self.sessionDescription = @""; - } - return self; -} -static SSKProtoCallMessageAnswer* defaultSSKProtoCallMessageAnswerInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessageAnswer class]) { - defaultSSKProtoCallMessageAnswerInstance = [[SSKProtoCallMessageAnswer alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageAnswerInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageAnswerInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - if (self.hasSessionDescription) { - [output writeString:2 value:self.sessionDescription]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - if (self.hasSessionDescription) { - size_ += computeStringSize(2, self.sessionDescription); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessageAnswer*) parseFromData:(NSData*) data { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessageAnswer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageAnswer*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessageAnswer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageAnswer*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessageAnswer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageAnswer*)[[[SSKProtoCallMessageAnswer builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageAnswerBuilder*) builder { - return [[SSKProtoCallMessageAnswerBuilder alloc] init]; -} -+ (SSKProtoCallMessageAnswerBuilder*) builderWithPrototype:(SSKProtoCallMessageAnswer*) prototype { - return [[SSKProtoCallMessageAnswer builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageAnswerBuilder*) builder { - return [SSKProtoCallMessageAnswer builder]; -} -- (SSKProtoCallMessageAnswerBuilder*) toBuilder { - return [SSKProtoCallMessageAnswer builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - if (self.hasSessionDescription) { - [output appendFormat:@"%@%@: %@\n", indent, @"sessionDescription", self.sessionDescription]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - if (self.hasSessionDescription) { - [dictionary setObject: self.sessionDescription forKey: @"sessionDescription"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessageAnswer class]]) { - return NO; - } - SSKProtoCallMessageAnswer *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - self.hasSessionDescription == otherMessage.hasSessionDescription && - (!self.hasSessionDescription || [self.sessionDescription isEqual:otherMessage.sessionDescription]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - if (self.hasSessionDescription) { - hashCode = hashCode * 31 + [self.sessionDescription hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageAnswerBuilder() -@property (strong) SSKProtoCallMessageAnswer* resultAnswer; -@end - -@implementation SSKProtoCallMessageAnswerBuilder -@synthesize resultAnswer; -- (instancetype) init { - if ((self = [super init])) { - self.resultAnswer = [[SSKProtoCallMessageAnswer alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultAnswer; -} -- (SSKProtoCallMessageAnswerBuilder*) clear { - self.resultAnswer = [[SSKProtoCallMessageAnswer alloc] init]; - return self; -} -- (SSKProtoCallMessageAnswerBuilder*) clone { - return [SSKProtoCallMessageAnswer builderWithPrototype:resultAnswer]; -} -- (SSKProtoCallMessageAnswer*) defaultInstance { - return [SSKProtoCallMessageAnswer defaultInstance]; -} -- (SSKProtoCallMessageAnswer*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessageAnswer*) buildPartial { - SSKProtoCallMessageAnswer* returnMe = resultAnswer; - self.resultAnswer = nil; - return returnMe; -} -- (SSKProtoCallMessageAnswerBuilder*) mergeFrom:(SSKProtoCallMessageAnswer*) other { - if (other == [SSKProtoCallMessageAnswer defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasSessionDescription) { - [self setSessionDescription:other.sessionDescription]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageAnswerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageAnswerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - case 18: { - [self setSessionDescription:[input readString]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultAnswer.hasId; -} -- (UInt64) id { - return resultAnswer.id; -} -- (SSKProtoCallMessageAnswerBuilder*) setId:(UInt64) value { - resultAnswer.hasId = YES; - resultAnswer.id = value; - return self; -} -- (SSKProtoCallMessageAnswerBuilder*) clearId { - resultAnswer.hasId = NO; - resultAnswer.id = 0L; - return self; -} -- (BOOL) hasSessionDescription { - return resultAnswer.hasSessionDescription; -} -- (NSString*) sessionDescription { - return resultAnswer.sessionDescription; -} -- (SSKProtoCallMessageAnswerBuilder*) setSessionDescription:(NSString*) value { - resultAnswer.hasSessionDescription = YES; - resultAnswer.sessionDescription = value; - return self; -} -- (SSKProtoCallMessageAnswerBuilder*) clearSessionDescription { - resultAnswer.hasSessionDescription = NO; - resultAnswer.sessionDescription = @""; - return self; -} -@end - -@interface SSKProtoCallMessageIceUpdate () -@property UInt64 id; -@property (strong) NSString* sdpMid; -@property UInt32 sdpMlineIndex; -@property (strong) NSString* sdp; -@end - -@implementation SSKProtoCallMessageIceUpdate - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasSdpMid { - return !!hasSdpMid_; -} -- (void) setHasSdpMid:(BOOL) _value_ { - hasSdpMid_ = !!_value_; -} -@synthesize sdpMid; -- (BOOL) hasSdpMlineIndex { - return !!hasSdpMlineIndex_; -} -- (void) setHasSdpMlineIndex:(BOOL) _value_ { - hasSdpMlineIndex_ = !!_value_; -} -@synthesize sdpMlineIndex; -- (BOOL) hasSdp { - return !!hasSdp_; -} -- (void) setHasSdp:(BOOL) _value_ { - hasSdp_ = !!_value_; -} -@synthesize sdp; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - self.sdpMid = @""; - self.sdpMlineIndex = 0; - self.sdp = @""; - } - return self; -} -static SSKProtoCallMessageIceUpdate* defaultSSKProtoCallMessageIceUpdateInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessageIceUpdate class]) { - defaultSSKProtoCallMessageIceUpdateInstance = [[SSKProtoCallMessageIceUpdate alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageIceUpdateInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageIceUpdateInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - if (self.hasSdpMid) { - [output writeString:2 value:self.sdpMid]; - } - if (self.hasSdpMlineIndex) { - [output writeUInt32:3 value:self.sdpMlineIndex]; - } - if (self.hasSdp) { - [output writeString:4 value:self.sdp]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - if (self.hasSdpMid) { - size_ += computeStringSize(2, self.sdpMid); - } - if (self.hasSdpMlineIndex) { - size_ += computeUInt32Size(3, self.sdpMlineIndex); - } - if (self.hasSdp) { - size_ += computeStringSize(4, self.sdp); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromData:(NSData*) data { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessageIceUpdate*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageIceUpdate*)[[[SSKProtoCallMessageIceUpdate builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageIceUpdateBuilder*) builder { - return [[SSKProtoCallMessageIceUpdateBuilder alloc] init]; -} -+ (SSKProtoCallMessageIceUpdateBuilder*) builderWithPrototype:(SSKProtoCallMessageIceUpdate*) prototype { - return [[SSKProtoCallMessageIceUpdate builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageIceUpdateBuilder*) builder { - return [SSKProtoCallMessageIceUpdate builder]; -} -- (SSKProtoCallMessageIceUpdateBuilder*) toBuilder { - return [SSKProtoCallMessageIceUpdate builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - if (self.hasSdpMid) { - [output appendFormat:@"%@%@: %@\n", indent, @"sdpMid", self.sdpMid]; - } - if (self.hasSdpMlineIndex) { - [output appendFormat:@"%@%@: %@\n", indent, @"sdpMlineIndex", [NSNumber numberWithInteger:self.sdpMlineIndex]]; - } - if (self.hasSdp) { - [output appendFormat:@"%@%@: %@\n", indent, @"sdp", self.sdp]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - if (self.hasSdpMid) { - [dictionary setObject: self.sdpMid forKey: @"sdpMid"]; - } - if (self.hasSdpMlineIndex) { - [dictionary setObject: [NSNumber numberWithInteger:self.sdpMlineIndex] forKey: @"sdpMlineIndex"]; - } - if (self.hasSdp) { - [dictionary setObject: self.sdp forKey: @"sdp"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessageIceUpdate class]]) { - return NO; - } - SSKProtoCallMessageIceUpdate *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - self.hasSdpMid == otherMessage.hasSdpMid && - (!self.hasSdpMid || [self.sdpMid isEqual:otherMessage.sdpMid]) && - self.hasSdpMlineIndex == otherMessage.hasSdpMlineIndex && - (!self.hasSdpMlineIndex || self.sdpMlineIndex == otherMessage.sdpMlineIndex) && - self.hasSdp == otherMessage.hasSdp && - (!self.hasSdp || [self.sdp isEqual:otherMessage.sdp]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - if (self.hasSdpMid) { - hashCode = hashCode * 31 + [self.sdpMid hash]; - } - if (self.hasSdpMlineIndex) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.sdpMlineIndex] hash]; - } - if (self.hasSdp) { - hashCode = hashCode * 31 + [self.sdp hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageIceUpdateBuilder() -@property (strong) SSKProtoCallMessageIceUpdate* resultIceUpdate; -@end - -@implementation SSKProtoCallMessageIceUpdateBuilder -@synthesize resultIceUpdate; -- (instancetype) init { - if ((self = [super init])) { - self.resultIceUpdate = [[SSKProtoCallMessageIceUpdate alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultIceUpdate; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clear { - self.resultIceUpdate = [[SSKProtoCallMessageIceUpdate alloc] init]; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clone { - return [SSKProtoCallMessageIceUpdate builderWithPrototype:resultIceUpdate]; -} -- (SSKProtoCallMessageIceUpdate*) defaultInstance { - return [SSKProtoCallMessageIceUpdate defaultInstance]; -} -- (SSKProtoCallMessageIceUpdate*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessageIceUpdate*) buildPartial { - SSKProtoCallMessageIceUpdate* returnMe = resultIceUpdate; - self.resultIceUpdate = nil; - return returnMe; -} -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFrom:(SSKProtoCallMessageIceUpdate*) other { - if (other == [SSKProtoCallMessageIceUpdate defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasSdpMid) { - [self setSdpMid:other.sdpMid]; - } - if (other.hasSdpMlineIndex) { - [self setSdpMlineIndex:other.sdpMlineIndex]; - } - if (other.hasSdp) { - [self setSdp:other.sdp]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageIceUpdateBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - case 18: { - [self setSdpMid:[input readString]]; - break; - } - case 24: { - [self setSdpMlineIndex:[input readUInt32]]; - break; - } - case 34: { - [self setSdp:[input readString]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultIceUpdate.hasId; -} -- (UInt64) id { - return resultIceUpdate.id; -} -- (SSKProtoCallMessageIceUpdateBuilder*) setId:(UInt64) value { - resultIceUpdate.hasId = YES; - resultIceUpdate.id = value; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clearId { - resultIceUpdate.hasId = NO; - resultIceUpdate.id = 0L; - return self; -} -- (BOOL) hasSdpMid { - return resultIceUpdate.hasSdpMid; -} -- (NSString*) sdpMid { - return resultIceUpdate.sdpMid; -} -- (SSKProtoCallMessageIceUpdateBuilder*) setSdpMid:(NSString*) value { - resultIceUpdate.hasSdpMid = YES; - resultIceUpdate.sdpMid = value; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdpMid { - resultIceUpdate.hasSdpMid = NO; - resultIceUpdate.sdpMid = @""; - return self; -} -- (BOOL) hasSdpMlineIndex { - return resultIceUpdate.hasSdpMlineIndex; -} -- (UInt32) sdpMlineIndex { - return resultIceUpdate.sdpMlineIndex; -} -- (SSKProtoCallMessageIceUpdateBuilder*) setSdpMlineIndex:(UInt32) value { - resultIceUpdate.hasSdpMlineIndex = YES; - resultIceUpdate.sdpMlineIndex = value; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdpMlineIndex { - resultIceUpdate.hasSdpMlineIndex = NO; - resultIceUpdate.sdpMlineIndex = 0; - return self; -} -- (BOOL) hasSdp { - return resultIceUpdate.hasSdp; -} -- (NSString*) sdp { - return resultIceUpdate.sdp; -} -- (SSKProtoCallMessageIceUpdateBuilder*) setSdp:(NSString*) value { - resultIceUpdate.hasSdp = YES; - resultIceUpdate.sdp = value; - return self; -} -- (SSKProtoCallMessageIceUpdateBuilder*) clearSdp { - resultIceUpdate.hasSdp = NO; - resultIceUpdate.sdp = @""; - return self; -} -@end - -@interface SSKProtoCallMessageBusy () -@property UInt64 id; -@end - -@implementation SSKProtoCallMessageBusy - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - } - return self; -} -static SSKProtoCallMessageBusy* defaultSSKProtoCallMessageBusyInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessageBusy class]) { - defaultSSKProtoCallMessageBusyInstance = [[SSKProtoCallMessageBusy alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageBusyInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageBusyInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessageBusy*) parseFromData:(NSData*) data { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessageBusy*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageBusy*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessageBusy*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageBusy*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessageBusy*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageBusy*)[[[SSKProtoCallMessageBusy builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageBusyBuilder*) builder { - return [[SSKProtoCallMessageBusyBuilder alloc] init]; -} -+ (SSKProtoCallMessageBusyBuilder*) builderWithPrototype:(SSKProtoCallMessageBusy*) prototype { - return [[SSKProtoCallMessageBusy builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageBusyBuilder*) builder { - return [SSKProtoCallMessageBusy builder]; -} -- (SSKProtoCallMessageBusyBuilder*) toBuilder { - return [SSKProtoCallMessageBusy builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessageBusy class]]) { - return NO; - } - SSKProtoCallMessageBusy *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageBusyBuilder() -@property (strong) SSKProtoCallMessageBusy* resultBusy; -@end - -@implementation SSKProtoCallMessageBusyBuilder -@synthesize resultBusy; -- (instancetype) init { - if ((self = [super init])) { - self.resultBusy = [[SSKProtoCallMessageBusy alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultBusy; -} -- (SSKProtoCallMessageBusyBuilder*) clear { - self.resultBusy = [[SSKProtoCallMessageBusy alloc] init]; - return self; -} -- (SSKProtoCallMessageBusyBuilder*) clone { - return [SSKProtoCallMessageBusy builderWithPrototype:resultBusy]; -} -- (SSKProtoCallMessageBusy*) defaultInstance { - return [SSKProtoCallMessageBusy defaultInstance]; -} -- (SSKProtoCallMessageBusy*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessageBusy*) buildPartial { - SSKProtoCallMessageBusy* returnMe = resultBusy; - self.resultBusy = nil; - return returnMe; -} -- (SSKProtoCallMessageBusyBuilder*) mergeFrom:(SSKProtoCallMessageBusy*) other { - if (other == [SSKProtoCallMessageBusy defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageBusyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageBusyBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultBusy.hasId; -} -- (UInt64) id { - return resultBusy.id; -} -- (SSKProtoCallMessageBusyBuilder*) setId:(UInt64) value { - resultBusy.hasId = YES; - resultBusy.id = value; - return self; -} -- (SSKProtoCallMessageBusyBuilder*) clearId { - resultBusy.hasId = NO; - resultBusy.id = 0L; - return self; -} -@end - -@interface SSKProtoCallMessageHangup () -@property UInt64 id; -@end - -@implementation SSKProtoCallMessageHangup - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - } - return self; -} -static SSKProtoCallMessageHangup* defaultSSKProtoCallMessageHangupInstance = nil; -+ (void) initialize { - if (self == [SSKProtoCallMessageHangup class]) { - defaultSSKProtoCallMessageHangupInstance = [[SSKProtoCallMessageHangup alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoCallMessageHangupInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoCallMessageHangupInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoCallMessageHangup*) parseFromData:(NSData*) data { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromData:data] build]; -} -+ (SSKProtoCallMessageHangup*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageHangup*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoCallMessageHangup*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageHangup*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoCallMessageHangup*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoCallMessageHangup*)[[[SSKProtoCallMessageHangup builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoCallMessageHangupBuilder*) builder { - return [[SSKProtoCallMessageHangupBuilder alloc] init]; -} -+ (SSKProtoCallMessageHangupBuilder*) builderWithPrototype:(SSKProtoCallMessageHangup*) prototype { - return [[SSKProtoCallMessageHangup builder] mergeFrom:prototype]; -} -- (SSKProtoCallMessageHangupBuilder*) builder { - return [SSKProtoCallMessageHangup builder]; -} -- (SSKProtoCallMessageHangupBuilder*) toBuilder { - return [SSKProtoCallMessageHangup builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoCallMessageHangup class]]) { - return NO; - } - SSKProtoCallMessageHangup *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoCallMessageHangupBuilder() -@property (strong) SSKProtoCallMessageHangup* resultHangup; -@end - -@implementation SSKProtoCallMessageHangupBuilder -@synthesize resultHangup; -- (instancetype) init { - if ((self = [super init])) { - self.resultHangup = [[SSKProtoCallMessageHangup alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultHangup; -} -- (SSKProtoCallMessageHangupBuilder*) clear { - self.resultHangup = [[SSKProtoCallMessageHangup alloc] init]; - return self; -} -- (SSKProtoCallMessageHangupBuilder*) clone { - return [SSKProtoCallMessageHangup builderWithPrototype:resultHangup]; -} -- (SSKProtoCallMessageHangup*) defaultInstance { - return [SSKProtoCallMessageHangup defaultInstance]; -} -- (SSKProtoCallMessageHangup*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessageHangup*) buildPartial { - SSKProtoCallMessageHangup* returnMe = resultHangup; - self.resultHangup = nil; - return returnMe; -} -- (SSKProtoCallMessageHangupBuilder*) mergeFrom:(SSKProtoCallMessageHangup*) other { - if (other == [SSKProtoCallMessageHangup defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageHangupBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageHangupBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultHangup.hasId; -} -- (UInt64) id { - return resultHangup.id; -} -- (SSKProtoCallMessageHangupBuilder*) setId:(UInt64) value { - resultHangup.hasId = YES; - resultHangup.id = value; - return self; -} -- (SSKProtoCallMessageHangupBuilder*) clearId { - resultHangup.hasId = NO; - resultHangup.id = 0L; - return self; -} -@end - -@interface SSKProtoCallMessageBuilder() -@property (strong) SSKProtoCallMessage* resultCallMessage; -@end - -@implementation SSKProtoCallMessageBuilder -@synthesize resultCallMessage; -- (instancetype) init { - if ((self = [super init])) { - self.resultCallMessage = [[SSKProtoCallMessage alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultCallMessage; -} -- (SSKProtoCallMessageBuilder*) clear { - self.resultCallMessage = [[SSKProtoCallMessage alloc] init]; - return self; -} -- (SSKProtoCallMessageBuilder*) clone { - return [SSKProtoCallMessage builderWithPrototype:resultCallMessage]; -} -- (SSKProtoCallMessage*) defaultInstance { - return [SSKProtoCallMessage defaultInstance]; -} -- (SSKProtoCallMessage*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoCallMessage*) buildPartial { - SSKProtoCallMessage* returnMe = resultCallMessage; - self.resultCallMessage = nil; - return returnMe; -} -- (SSKProtoCallMessageBuilder*) mergeFrom:(SSKProtoCallMessage*) other { - if (other == [SSKProtoCallMessage defaultInstance]) { - return self; - } - if (other.hasOffer) { - [self mergeOffer:other.offer]; - } - if (other.hasAnswer) { - [self mergeAnswer:other.answer]; - } - if (other.iceUpdateArray.count > 0) { - if (resultCallMessage.iceUpdateArray == nil) { - resultCallMessage.iceUpdateArray = [[NSMutableArray alloc] initWithArray:other.iceUpdateArray]; - } else { - [resultCallMessage.iceUpdateArray addObjectsFromArray:other.iceUpdateArray]; - } - } - if (other.hasHangup) { - [self mergeHangup:other.hangup]; - } - if (other.hasBusy) { - [self mergeBusy:other.busy]; - } - if (other.hasProfileKey) { - [self setProfileKey:other.profileKey]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoCallMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoCallMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoCallMessageOfferBuilder* subBuilder = [SSKProtoCallMessageOffer builder]; - if (self.hasOffer) { - [subBuilder mergeFrom:self.offer]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setOffer:[subBuilder buildPartial]]; - break; - } - case 18: { - SSKProtoCallMessageAnswerBuilder* subBuilder = [SSKProtoCallMessageAnswer builder]; - if (self.hasAnswer) { - [subBuilder mergeFrom:self.answer]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAnswer:[subBuilder buildPartial]]; - break; - } - case 26: { - SSKProtoCallMessageIceUpdateBuilder* subBuilder = [SSKProtoCallMessageIceUpdate builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addIceUpdate:[subBuilder buildPartial]]; - break; - } - case 34: { - SSKProtoCallMessageHangupBuilder* subBuilder = [SSKProtoCallMessageHangup builder]; - if (self.hasHangup) { - [subBuilder mergeFrom:self.hangup]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setHangup:[subBuilder buildPartial]]; - break; - } - case 42: { - SSKProtoCallMessageBusyBuilder* subBuilder = [SSKProtoCallMessageBusy builder]; - if (self.hasBusy) { - [subBuilder mergeFrom:self.busy]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setBusy:[subBuilder buildPartial]]; - break; - } - case 50: { - [self setProfileKey:[input readData]]; - break; - } - } - } -} -- (BOOL) hasOffer { - return resultCallMessage.hasOffer; -} -- (SSKProtoCallMessageOffer*) offer { - return resultCallMessage.offer; -} -- (SSKProtoCallMessageBuilder*) setOffer:(SSKProtoCallMessageOffer*) value { - resultCallMessage.hasOffer = YES; - resultCallMessage.offer = value; - return self; -} -- (SSKProtoCallMessageBuilder*) setOfferBuilder:(SSKProtoCallMessageOfferBuilder*) builderForValue { - return [self setOffer:[builderForValue build]]; -} -- (SSKProtoCallMessageBuilder*) mergeOffer:(SSKProtoCallMessageOffer*) value { - if (resultCallMessage.hasOffer && - resultCallMessage.offer != [SSKProtoCallMessageOffer defaultInstance]) { - resultCallMessage.offer = - [[[SSKProtoCallMessageOffer builderWithPrototype:resultCallMessage.offer] mergeFrom:value] buildPartial]; - } else { - resultCallMessage.offer = value; - } - resultCallMessage.hasOffer = YES; - return self; -} -- (SSKProtoCallMessageBuilder*) clearOffer { - resultCallMessage.hasOffer = NO; - resultCallMessage.offer = [SSKProtoCallMessageOffer defaultInstance]; - return self; -} -- (BOOL) hasAnswer { - return resultCallMessage.hasAnswer; -} -- (SSKProtoCallMessageAnswer*) answer { - return resultCallMessage.answer; -} -- (SSKProtoCallMessageBuilder*) setAnswer:(SSKProtoCallMessageAnswer*) value { - resultCallMessage.hasAnswer = YES; - resultCallMessage.answer = value; - return self; -} -- (SSKProtoCallMessageBuilder*) setAnswerBuilder:(SSKProtoCallMessageAnswerBuilder*) builderForValue { - return [self setAnswer:[builderForValue build]]; -} -- (SSKProtoCallMessageBuilder*) mergeAnswer:(SSKProtoCallMessageAnswer*) value { - if (resultCallMessage.hasAnswer && - resultCallMessage.answer != [SSKProtoCallMessageAnswer defaultInstance]) { - resultCallMessage.answer = - [[[SSKProtoCallMessageAnswer builderWithPrototype:resultCallMessage.answer] mergeFrom:value] buildPartial]; - } else { - resultCallMessage.answer = value; - } - resultCallMessage.hasAnswer = YES; - return self; -} -- (SSKProtoCallMessageBuilder*) clearAnswer { - resultCallMessage.hasAnswer = NO; - resultCallMessage.answer = [SSKProtoCallMessageAnswer defaultInstance]; - return self; -} -- (NSMutableArray *)iceUpdate { - return resultCallMessage.iceUpdateArray; -} -- (SSKProtoCallMessageIceUpdate*)iceUpdateAtIndex:(NSUInteger)index { - return [resultCallMessage iceUpdateAtIndex:index]; -} -- (SSKProtoCallMessageBuilder *)addIceUpdate:(SSKProtoCallMessageIceUpdate*)value { - if (resultCallMessage.iceUpdateArray == nil) { - resultCallMessage.iceUpdateArray = [[NSMutableArray alloc]init]; - } - [resultCallMessage.iceUpdateArray addObject:value]; - return self; -} -- (SSKProtoCallMessageBuilder *)setIceUpdateArray:(NSArray *)array { - resultCallMessage.iceUpdateArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoCallMessageBuilder *)clearIceUpdate { - resultCallMessage.iceUpdateArray = nil; - return self; -} -- (BOOL) hasHangup { - return resultCallMessage.hasHangup; -} -- (SSKProtoCallMessageHangup*) hangup { - return resultCallMessage.hangup; -} -- (SSKProtoCallMessageBuilder*) setHangup:(SSKProtoCallMessageHangup*) value { - resultCallMessage.hasHangup = YES; - resultCallMessage.hangup = value; - return self; -} -- (SSKProtoCallMessageBuilder*) setHangupBuilder:(SSKProtoCallMessageHangupBuilder*) builderForValue { - return [self setHangup:[builderForValue build]]; -} -- (SSKProtoCallMessageBuilder*) mergeHangup:(SSKProtoCallMessageHangup*) value { - if (resultCallMessage.hasHangup && - resultCallMessage.hangup != [SSKProtoCallMessageHangup defaultInstance]) { - resultCallMessage.hangup = - [[[SSKProtoCallMessageHangup builderWithPrototype:resultCallMessage.hangup] mergeFrom:value] buildPartial]; - } else { - resultCallMessage.hangup = value; - } - resultCallMessage.hasHangup = YES; - return self; -} -- (SSKProtoCallMessageBuilder*) clearHangup { - resultCallMessage.hasHangup = NO; - resultCallMessage.hangup = [SSKProtoCallMessageHangup defaultInstance]; - return self; -} -- (BOOL) hasBusy { - return resultCallMessage.hasBusy; -} -- (SSKProtoCallMessageBusy*) busy { - return resultCallMessage.busy; -} -- (SSKProtoCallMessageBuilder*) setBusy:(SSKProtoCallMessageBusy*) value { - resultCallMessage.hasBusy = YES; - resultCallMessage.busy = value; - return self; -} -- (SSKProtoCallMessageBuilder*) setBusyBuilder:(SSKProtoCallMessageBusyBuilder*) builderForValue { - return [self setBusy:[builderForValue build]]; -} -- (SSKProtoCallMessageBuilder*) mergeBusy:(SSKProtoCallMessageBusy*) value { - if (resultCallMessage.hasBusy && - resultCallMessage.busy != [SSKProtoCallMessageBusy defaultInstance]) { - resultCallMessage.busy = - [[[SSKProtoCallMessageBusy builderWithPrototype:resultCallMessage.busy] mergeFrom:value] buildPartial]; - } else { - resultCallMessage.busy = value; - } - resultCallMessage.hasBusy = YES; - return self; -} -- (SSKProtoCallMessageBuilder*) clearBusy { - resultCallMessage.hasBusy = NO; - resultCallMessage.busy = [SSKProtoCallMessageBusy defaultInstance]; - return self; -} -- (BOOL) hasProfileKey { - return resultCallMessage.hasProfileKey; -} -- (NSData*) profileKey { - return resultCallMessage.profileKey; -} -- (SSKProtoCallMessageBuilder*) setProfileKey:(NSData*) value { - resultCallMessage.hasProfileKey = YES; - resultCallMessage.profileKey = value; - return self; -} -- (SSKProtoCallMessageBuilder*) clearProfileKey { - resultCallMessage.hasProfileKey = NO; - resultCallMessage.profileKey = [NSData data]; - return self; -} -@end - -@interface SSKProtoDataMessage () -@property (strong) NSString* body; -@property (strong) NSMutableArray * attachmentsArray; -@property (strong) SSKProtoGroupContext* group; -@property UInt32 flags; -@property UInt32 expireTimer; -@property (strong) NSData* profileKey; -@property UInt64 timestamp; -@property (strong) SSKProtoDataMessageQuote* quote; -@property (strong) NSMutableArray * contactArray; -@end - -@implementation SSKProtoDataMessage - -- (BOOL) hasBody { - return !!hasBody_; -} -- (void) setHasBody:(BOOL) _value_ { - hasBody_ = !!_value_; -} -@synthesize body; -@synthesize attachmentsArray; -@dynamic attachments; -- (BOOL) hasGroup { - return !!hasGroup_; -} -- (void) setHasGroup:(BOOL) _value_ { - hasGroup_ = !!_value_; -} -@synthesize group; -- (BOOL) hasFlags { - return !!hasFlags_; -} -- (void) setHasFlags:(BOOL) _value_ { - hasFlags_ = !!_value_; -} -@synthesize flags; -- (BOOL) hasExpireTimer { - return !!hasExpireTimer_; -} -- (void) setHasExpireTimer:(BOOL) _value_ { - hasExpireTimer_ = !!_value_; -} -@synthesize expireTimer; -- (BOOL) hasProfileKey { - return !!hasProfileKey_; -} -- (void) setHasProfileKey:(BOOL) _value_ { - hasProfileKey_ = !!_value_; -} -@synthesize profileKey; -- (BOOL) hasTimestamp { - return !!hasTimestamp_; -} -- (void) setHasTimestamp:(BOOL) _value_ { - hasTimestamp_ = !!_value_; -} -@synthesize timestamp; -- (BOOL) hasQuote { - return !!hasQuote_; -} -- (void) setHasQuote:(BOOL) _value_ { - hasQuote_ = !!_value_; -} -@synthesize quote; -@synthesize contactArray; -@dynamic contact; -- (instancetype) init { - if ((self = [super init])) { - self.body = @""; - self.group = [SSKProtoGroupContext defaultInstance]; - self.flags = 0; - self.expireTimer = 0; - self.profileKey = [NSData data]; - self.timestamp = 0L; - self.quote = [SSKProtoDataMessageQuote defaultInstance]; - } - return self; -} -static SSKProtoDataMessage* defaultSSKProtoDataMessageInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessage class]) { - defaultSSKProtoDataMessageInstance = [[SSKProtoDataMessage alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageInstance; -} -- (NSArray *)attachments { - return attachmentsArray; -} -- (SSKProtoAttachmentPointer*)attachmentsAtIndex:(NSUInteger)index { - return [attachmentsArray objectAtIndex:index]; -} -- (NSArray *)contact { - return contactArray; -} -- (SSKProtoDataMessageContact*)contactAtIndex:(NSUInteger)index { - return [contactArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasBody) { - [output writeString:1 value:self.body]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoAttachmentPointer *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:2 value:element]; - }]; - if (self.hasGroup) { - [output writeMessage:3 value:self.group]; - } - if (self.hasFlags) { - [output writeUInt32:4 value:self.flags]; - } - if (self.hasExpireTimer) { - [output writeUInt32:5 value:self.expireTimer]; - } - if (self.hasProfileKey) { - [output writeData:6 value:self.profileKey]; - } - if (self.hasTimestamp) { - [output writeUInt64:7 value:self.timestamp]; - } - if (self.hasQuote) { - [output writeMessage:8 value:self.quote]; - } - [self.contactArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContact *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:9 value:element]; - }]; - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasBody) { - size_ += computeStringSize(1, self.body); - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoAttachmentPointer *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(2, element); - }]; - if (self.hasGroup) { - size_ += computeMessageSize(3, self.group); - } - if (self.hasFlags) { - size_ += computeUInt32Size(4, self.flags); - } - if (self.hasExpireTimer) { - size_ += computeUInt32Size(5, self.expireTimer); - } - if (self.hasProfileKey) { - size_ += computeDataSize(6, self.profileKey); - } - if (self.hasTimestamp) { - size_ += computeUInt64Size(7, self.timestamp); - } - if (self.hasQuote) { - size_ += computeMessageSize(8, self.quote); - } - [self.contactArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContact *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(9, element); - }]; - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessage*) parseFromData:(NSData*) data { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessage*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessage*)[[[SSKProtoDataMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageBuilder*) builder { - return [[SSKProtoDataMessageBuilder alloc] init]; -} -+ (SSKProtoDataMessageBuilder*) builderWithPrototype:(SSKProtoDataMessage*) prototype { - return [[SSKProtoDataMessage builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageBuilder*) builder { - return [SSKProtoDataMessage builder]; -} -- (SSKProtoDataMessageBuilder*) toBuilder { - return [SSKProtoDataMessage builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasBody) { - [output appendFormat:@"%@%@: %@\n", indent, @"body", self.body]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoAttachmentPointer *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"attachments"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - if (self.hasGroup) { - [output appendFormat:@"%@%@ {\n", indent, @"group"]; - [self.group writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasFlags) { - [output appendFormat:@"%@%@: %@\n", indent, @"flags", [NSNumber numberWithInteger:self.flags]]; - } - if (self.hasExpireTimer) { - [output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]]; - } - if (self.hasProfileKey) { - [output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey]; - } - if (self.hasTimestamp) { - [output appendFormat:@"%@%@: %@\n", indent, @"timestamp", [NSNumber numberWithLongLong:self.timestamp]]; - } - if (self.hasQuote) { - [output appendFormat:@"%@%@ {\n", indent, @"quote"]; - [self.quote writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.contactArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContact *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"contact"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasBody) { - [dictionary setObject: self.body forKey: @"body"]; - } - for (SSKProtoAttachmentPointer* element in self.attachmentsArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"attachments"]; - } - if (self.hasGroup) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.group storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"group"]; - } - if (self.hasFlags) { - [dictionary setObject: [NSNumber numberWithInteger:self.flags] forKey: @"flags"]; - } - if (self.hasExpireTimer) { - [dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"]; - } - if (self.hasProfileKey) { - [dictionary setObject: self.profileKey forKey: @"profileKey"]; - } - if (self.hasTimestamp) { - [dictionary setObject: [NSNumber numberWithLongLong:self.timestamp] forKey: @"timestamp"]; - } - if (self.hasQuote) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.quote storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"quote"]; - } - for (SSKProtoDataMessageContact* element in self.contactArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"contact"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessage class]]) { - return NO; - } - SSKProtoDataMessage *otherMessage = other; - return - self.hasBody == otherMessage.hasBody && - (!self.hasBody || [self.body isEqual:otherMessage.body]) && - [self.attachmentsArray isEqualToArray:otherMessage.attachmentsArray] && - self.hasGroup == otherMessage.hasGroup && - (!self.hasGroup || [self.group isEqual:otherMessage.group]) && - self.hasFlags == otherMessage.hasFlags && - (!self.hasFlags || self.flags == otherMessage.flags) && - self.hasExpireTimer == otherMessage.hasExpireTimer && - (!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) && - self.hasProfileKey == otherMessage.hasProfileKey && - (!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) && - self.hasTimestamp == otherMessage.hasTimestamp && - (!self.hasTimestamp || self.timestamp == otherMessage.timestamp) && - self.hasQuote == otherMessage.hasQuote && - (!self.hasQuote || [self.quote isEqual:otherMessage.quote]) && - [self.contactArray isEqualToArray:otherMessage.contactArray] && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasBody) { - hashCode = hashCode * 31 + [self.body hash]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoAttachmentPointer *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasGroup) { - hashCode = hashCode * 31 + [self.group hash]; - } - if (self.hasFlags) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.flags] hash]; - } - if (self.hasExpireTimer) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash]; - } - if (self.hasProfileKey) { - hashCode = hashCode * 31 + [self.profileKey hash]; - } - if (self.hasTimestamp) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestamp] hash]; - } - if (self.hasQuote) { - hashCode = hashCode * 31 + [self.quote hash]; - } - [self.contactArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContact *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoDataMessageFlagsIsValidValue(SSKProtoDataMessageFlags value) { - switch (value) { - case SSKProtoDataMessageFlagsEndSession: - case SSKProtoDataMessageFlagsExpirationTimerUpdate: - case SSKProtoDataMessageFlagsProfileKeyUpdate: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoDataMessageFlags(SSKProtoDataMessageFlags value) { - switch (value) { - case SSKProtoDataMessageFlagsEndSession: - return @"SSKProtoDataMessageFlagsEndSession"; - case SSKProtoDataMessageFlagsExpirationTimerUpdate: - return @"SSKProtoDataMessageFlagsExpirationTimerUpdate"; - case SSKProtoDataMessageFlagsProfileKeyUpdate: - return @"SSKProtoDataMessageFlagsProfileKeyUpdate"; - default: - return nil; - } -} - -@interface SSKProtoDataMessageQuote () -@property UInt64 id; -@property (strong) NSString* author; -@property (strong) NSString* text; -@property (strong) NSMutableArray * attachmentsArray; -@end - -@implementation SSKProtoDataMessageQuote - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasAuthor { - return !!hasAuthor_; -} -- (void) setHasAuthor:(BOOL) _value_ { - hasAuthor_ = !!_value_; -} -@synthesize author; -- (BOOL) hasText { - return !!hasText_; -} -- (void) setHasText:(BOOL) _value_ { - hasText_ = !!_value_; -} -@synthesize text; -@synthesize attachmentsArray; -@dynamic attachments; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - self.author = @""; - self.text = @""; - } - return self; -} -static SSKProtoDataMessageQuote* defaultSSKProtoDataMessageQuoteInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageQuote class]) { - defaultSSKProtoDataMessageQuoteInstance = [[SSKProtoDataMessageQuote alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageQuoteInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageQuoteInstance; -} -- (NSArray *)attachments { - return attachmentsArray; -} -- (SSKProtoDataMessageQuoteQuotedAttachment*)attachmentsAtIndex:(NSUInteger)index { - return [attachmentsArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeUInt64:1 value:self.id]; - } - if (self.hasAuthor) { - [output writeString:2 value:self.author]; - } - if (self.hasText) { - [output writeString:3 value:self.text]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageQuoteQuotedAttachment *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:4 value:element]; - }]; - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeUInt64Size(1, self.id); - } - if (self.hasAuthor) { - size_ += computeStringSize(2, self.author); - } - if (self.hasText) { - size_ += computeStringSize(3, self.text); - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageQuoteQuotedAttachment *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(4, element); - }]; - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageQuote*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageQuote*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuote*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageQuote*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuote*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageQuote*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuote*)[[[SSKProtoDataMessageQuote builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuoteBuilder*) builder { - return [[SSKProtoDataMessageQuoteBuilder alloc] init]; -} -+ (SSKProtoDataMessageQuoteBuilder*) builderWithPrototype:(SSKProtoDataMessageQuote*) prototype { - return [[SSKProtoDataMessageQuote builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageQuoteBuilder*) builder { - return [SSKProtoDataMessageQuote builder]; -} -- (SSKProtoDataMessageQuoteBuilder*) toBuilder { - return [SSKProtoDataMessageQuote builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - if (self.hasAuthor) { - [output appendFormat:@"%@%@: %@\n", indent, @"author", self.author]; - } - if (self.hasText) { - [output appendFormat:@"%@%@: %@\n", indent, @"text", self.text]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageQuoteQuotedAttachment *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"attachments"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - if (self.hasAuthor) { - [dictionary setObject: self.author forKey: @"author"]; - } - if (self.hasText) { - [dictionary setObject: self.text forKey: @"text"]; - } - for (SSKProtoDataMessageQuoteQuotedAttachment* element in self.attachmentsArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"attachments"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageQuote class]]) { - return NO; - } - SSKProtoDataMessageQuote *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - self.hasAuthor == otherMessage.hasAuthor && - (!self.hasAuthor || [self.author isEqual:otherMessage.author]) && - self.hasText == otherMessage.hasText && - (!self.hasText || [self.text isEqual:otherMessage.text]) && - [self.attachmentsArray isEqualToArray:otherMessage.attachmentsArray] && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - if (self.hasAuthor) { - hashCode = hashCode * 31 + [self.author hash]; - } - if (self.hasText) { - hashCode = hashCode * 31 + [self.text hash]; - } - [self.attachmentsArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageQuoteQuotedAttachment *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoDataMessageQuoteQuotedAttachment () -@property (strong) NSString* contentType; -@property (strong) NSString* fileName; -@property (strong) SSKProtoAttachmentPointer* thumbnail; -@property UInt32 flags; -@end - -@implementation SSKProtoDataMessageQuoteQuotedAttachment - -- (BOOL) hasContentType { - return !!hasContentType_; -} -- (void) setHasContentType:(BOOL) _value_ { - hasContentType_ = !!_value_; -} -@synthesize contentType; -- (BOOL) hasFileName { - return !!hasFileName_; -} -- (void) setHasFileName:(BOOL) _value_ { - hasFileName_ = !!_value_; -} -@synthesize fileName; -- (BOOL) hasThumbnail { - return !!hasThumbnail_; -} -- (void) setHasThumbnail:(BOOL) _value_ { - hasThumbnail_ = !!_value_; -} -@synthesize thumbnail; -- (BOOL) hasFlags { - return !!hasFlags_; -} -- (void) setHasFlags:(BOOL) _value_ { - hasFlags_ = !!_value_; -} -@synthesize flags; -- (instancetype) init { - if ((self = [super init])) { - self.contentType = @""; - self.fileName = @""; - self.thumbnail = [SSKProtoAttachmentPointer defaultInstance]; - self.flags = 0; - } - return self; -} -static SSKProtoDataMessageQuoteQuotedAttachment* defaultSSKProtoDataMessageQuoteQuotedAttachmentInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageQuoteQuotedAttachment class]) { - defaultSSKProtoDataMessageQuoteQuotedAttachmentInstance = [[SSKProtoDataMessageQuoteQuotedAttachment alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageQuoteQuotedAttachmentInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageQuoteQuotedAttachmentInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasContentType) { - [output writeString:1 value:self.contentType]; - } - if (self.hasFileName) { - [output writeString:2 value:self.fileName]; - } - if (self.hasThumbnail) { - [output writeMessage:3 value:self.thumbnail]; - } - if (self.hasFlags) { - [output writeUInt32:4 value:self.flags]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasContentType) { - size_ += computeStringSize(1, self.contentType); - } - if (self.hasFileName) { - size_ += computeStringSize(2, self.fileName); - } - if (self.hasThumbnail) { - size_ += computeMessageSize(3, self.thumbnail); - } - if (self.hasFlags) { - size_ += computeUInt32Size(4, self.flags); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachment*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageQuoteQuotedAttachment*)[[[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builder { - return [[SSKProtoDataMessageQuoteQuotedAttachmentBuilder alloc] init]; -} -+ (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builderWithPrototype:(SSKProtoDataMessageQuoteQuotedAttachment*) prototype { - return [[SSKProtoDataMessageQuoteQuotedAttachment builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) builder { - return [SSKProtoDataMessageQuoteQuotedAttachment builder]; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) toBuilder { - return [SSKProtoDataMessageQuoteQuotedAttachment builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasContentType) { - [output appendFormat:@"%@%@: %@\n", indent, @"contentType", self.contentType]; - } - if (self.hasFileName) { - [output appendFormat:@"%@%@: %@\n", indent, @"fileName", self.fileName]; - } - if (self.hasThumbnail) { - [output appendFormat:@"%@%@ {\n", indent, @"thumbnail"]; - [self.thumbnail writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasFlags) { - [output appendFormat:@"%@%@: %@\n", indent, @"flags", [NSNumber numberWithInteger:self.flags]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasContentType) { - [dictionary setObject: self.contentType forKey: @"contentType"]; - } - if (self.hasFileName) { - [dictionary setObject: self.fileName forKey: @"fileName"]; - } - if (self.hasThumbnail) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.thumbnail storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"thumbnail"]; - } - if (self.hasFlags) { - [dictionary setObject: [NSNumber numberWithInteger:self.flags] forKey: @"flags"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageQuoteQuotedAttachment class]]) { - return NO; - } - SSKProtoDataMessageQuoteQuotedAttachment *otherMessage = other; - return - self.hasContentType == otherMessage.hasContentType && - (!self.hasContentType || [self.contentType isEqual:otherMessage.contentType]) && - self.hasFileName == otherMessage.hasFileName && - (!self.hasFileName || [self.fileName isEqual:otherMessage.fileName]) && - self.hasThumbnail == otherMessage.hasThumbnail && - (!self.hasThumbnail || [self.thumbnail isEqual:otherMessage.thumbnail]) && - self.hasFlags == otherMessage.hasFlags && - (!self.hasFlags || self.flags == otherMessage.flags) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasContentType) { - hashCode = hashCode * 31 + [self.contentType hash]; - } - if (self.hasFileName) { - hashCode = hashCode * 31 + [self.fileName hash]; - } - if (self.hasThumbnail) { - hashCode = hashCode * 31 + [self.thumbnail hash]; - } - if (self.hasFlags) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.flags] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoDataMessageQuoteQuotedAttachmentFlagsIsValidValue(SSKProtoDataMessageQuoteQuotedAttachmentFlags value) { - switch (value) { - case SSKProtoDataMessageQuoteQuotedAttachmentFlagsVoiceMessage: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoDataMessageQuoteQuotedAttachmentFlags(SSKProtoDataMessageQuoteQuotedAttachmentFlags value) { - switch (value) { - case SSKProtoDataMessageQuoteQuotedAttachmentFlagsVoiceMessage: - return @"SSKProtoDataMessageQuoteQuotedAttachmentFlagsVoiceMessage"; - default: - return nil; - } -} - -@interface SSKProtoDataMessageQuoteQuotedAttachmentBuilder() -@property (strong) SSKProtoDataMessageQuoteQuotedAttachment* resultQuotedAttachment; -@end - -@implementation SSKProtoDataMessageQuoteQuotedAttachmentBuilder -@synthesize resultQuotedAttachment; -- (instancetype) init { - if ((self = [super init])) { - self.resultQuotedAttachment = [[SSKProtoDataMessageQuoteQuotedAttachment alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultQuotedAttachment; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clear { - self.resultQuotedAttachment = [[SSKProtoDataMessageQuoteQuotedAttachment alloc] init]; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clone { - return [SSKProtoDataMessageQuoteQuotedAttachment builderWithPrototype:resultQuotedAttachment]; -} -- (SSKProtoDataMessageQuoteQuotedAttachment*) defaultInstance { - return [SSKProtoDataMessageQuoteQuotedAttachment defaultInstance]; -} -- (SSKProtoDataMessageQuoteQuotedAttachment*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageQuoteQuotedAttachment*) buildPartial { - SSKProtoDataMessageQuoteQuotedAttachment* returnMe = resultQuotedAttachment; - self.resultQuotedAttachment = nil; - return returnMe; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFrom:(SSKProtoDataMessageQuoteQuotedAttachment*) other { - if (other == [SSKProtoDataMessageQuoteQuotedAttachment defaultInstance]) { - return self; - } - if (other.hasContentType) { - [self setContentType:other.contentType]; - } - if (other.hasFileName) { - [self setFileName:other.fileName]; - } - if (other.hasThumbnail) { - [self mergeThumbnail:other.thumbnail]; - } - if (other.hasFlags) { - [self setFlags:other.flags]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setContentType:[input readString]]; - break; - } - case 18: { - [self setFileName:[input readString]]; - break; - } - case 26: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - if (self.hasThumbnail) { - [subBuilder mergeFrom:self.thumbnail]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setThumbnail:[subBuilder buildPartial]]; - break; - } - case 32: { - [self setFlags:[input readUInt32]]; - break; - } - } - } -} -- (BOOL) hasContentType { - return resultQuotedAttachment.hasContentType; -} -- (NSString*) contentType { - return resultQuotedAttachment.contentType; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setContentType:(NSString*) value { - resultQuotedAttachment.hasContentType = YES; - resultQuotedAttachment.contentType = value; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearContentType { - resultQuotedAttachment.hasContentType = NO; - resultQuotedAttachment.contentType = @""; - return self; -} -- (BOOL) hasFileName { - return resultQuotedAttachment.hasFileName; -} -- (NSString*) fileName { - return resultQuotedAttachment.fileName; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setFileName:(NSString*) value { - resultQuotedAttachment.hasFileName = YES; - resultQuotedAttachment.fileName = value; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearFileName { - resultQuotedAttachment.hasFileName = NO; - resultQuotedAttachment.fileName = @""; - return self; -} -- (BOOL) hasThumbnail { - return resultQuotedAttachment.hasThumbnail; -} -- (SSKProtoAttachmentPointer*) thumbnail { - return resultQuotedAttachment.thumbnail; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setThumbnail:(SSKProtoAttachmentPointer*) value { - resultQuotedAttachment.hasThumbnail = YES; - resultQuotedAttachment.thumbnail = value; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setThumbnailBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue { - return [self setThumbnail:[builderForValue build]]; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) mergeThumbnail:(SSKProtoAttachmentPointer*) value { - if (resultQuotedAttachment.hasThumbnail && - resultQuotedAttachment.thumbnail != [SSKProtoAttachmentPointer defaultInstance]) { - resultQuotedAttachment.thumbnail = - [[[SSKProtoAttachmentPointer builderWithPrototype:resultQuotedAttachment.thumbnail] mergeFrom:value] buildPartial]; - } else { - resultQuotedAttachment.thumbnail = value; - } - resultQuotedAttachment.hasThumbnail = YES; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearThumbnail { - resultQuotedAttachment.hasThumbnail = NO; - resultQuotedAttachment.thumbnail = [SSKProtoAttachmentPointer defaultInstance]; - return self; -} -- (BOOL) hasFlags { - return resultQuotedAttachment.hasFlags; -} -- (UInt32) flags { - return resultQuotedAttachment.flags; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) setFlags:(UInt32) value { - resultQuotedAttachment.hasFlags = YES; - resultQuotedAttachment.flags = value; - return self; -} -- (SSKProtoDataMessageQuoteQuotedAttachmentBuilder*) clearFlags { - resultQuotedAttachment.hasFlags = NO; - resultQuotedAttachment.flags = 0; - return self; -} -@end - -@interface SSKProtoDataMessageQuoteBuilder() -@property (strong) SSKProtoDataMessageQuote* resultQuote; -@end - -@implementation SSKProtoDataMessageQuoteBuilder -@synthesize resultQuote; -- (instancetype) init { - if ((self = [super init])) { - self.resultQuote = [[SSKProtoDataMessageQuote alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultQuote; -} -- (SSKProtoDataMessageQuoteBuilder*) clear { - self.resultQuote = [[SSKProtoDataMessageQuote alloc] init]; - return self; -} -- (SSKProtoDataMessageQuoteBuilder*) clone { - return [SSKProtoDataMessageQuote builderWithPrototype:resultQuote]; -} -- (SSKProtoDataMessageQuote*) defaultInstance { - return [SSKProtoDataMessageQuote defaultInstance]; -} -- (SSKProtoDataMessageQuote*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageQuote*) buildPartial { - SSKProtoDataMessageQuote* returnMe = resultQuote; - self.resultQuote = nil; - return returnMe; -} -- (SSKProtoDataMessageQuoteBuilder*) mergeFrom:(SSKProtoDataMessageQuote*) other { - if (other == [SSKProtoDataMessageQuote defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasAuthor) { - [self setAuthor:other.author]; - } - if (other.hasText) { - [self setText:other.text]; - } - if (other.attachmentsArray.count > 0) { - if (resultQuote.attachmentsArray == nil) { - resultQuote.attachmentsArray = [[NSMutableArray alloc] initWithArray:other.attachmentsArray]; - } else { - [resultQuote.attachmentsArray addObjectsFromArray:other.attachmentsArray]; - } - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageQuoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageQuoteBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setId:[input readUInt64]]; - break; - } - case 18: { - [self setAuthor:[input readString]]; - break; - } - case 26: { - [self setText:[input readString]]; - break; - } - case 34: { - SSKProtoDataMessageQuoteQuotedAttachmentBuilder* subBuilder = [SSKProtoDataMessageQuoteQuotedAttachment builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addAttachments:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultQuote.hasId; -} -- (UInt64) id { - return resultQuote.id; -} -- (SSKProtoDataMessageQuoteBuilder*) setId:(UInt64) value { - resultQuote.hasId = YES; - resultQuote.id = value; - return self; -} -- (SSKProtoDataMessageQuoteBuilder*) clearId { - resultQuote.hasId = NO; - resultQuote.id = 0L; - return self; -} -- (BOOL) hasAuthor { - return resultQuote.hasAuthor; -} -- (NSString*) author { - return resultQuote.author; -} -- (SSKProtoDataMessageQuoteBuilder*) setAuthor:(NSString*) value { - resultQuote.hasAuthor = YES; - resultQuote.author = value; - return self; -} -- (SSKProtoDataMessageQuoteBuilder*) clearAuthor { - resultQuote.hasAuthor = NO; - resultQuote.author = @""; - return self; -} -- (BOOL) hasText { - return resultQuote.hasText; -} -- (NSString*) text { - return resultQuote.text; -} -- (SSKProtoDataMessageQuoteBuilder*) setText:(NSString*) value { - resultQuote.hasText = YES; - resultQuote.text = value; - return self; -} -- (SSKProtoDataMessageQuoteBuilder*) clearText { - resultQuote.hasText = NO; - resultQuote.text = @""; - return self; -} -- (NSMutableArray *)attachments { - return resultQuote.attachmentsArray; -} -- (SSKProtoDataMessageQuoteQuotedAttachment*)attachmentsAtIndex:(NSUInteger)index { - return [resultQuote attachmentsAtIndex:index]; -} -- (SSKProtoDataMessageQuoteBuilder *)addAttachments:(SSKProtoDataMessageQuoteQuotedAttachment*)value { - if (resultQuote.attachmentsArray == nil) { - resultQuote.attachmentsArray = [[NSMutableArray alloc]init]; - } - [resultQuote.attachmentsArray addObject:value]; - return self; -} -- (SSKProtoDataMessageQuoteBuilder *)setAttachmentsArray:(NSArray *)array { - resultQuote.attachmentsArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageQuoteBuilder *)clearAttachments { - resultQuote.attachmentsArray = nil; - return self; -} -@end - -@interface SSKProtoDataMessageContact () -@property (strong) SSKProtoDataMessageContactName* name; -@property (strong) NSMutableArray * numberArray; -@property (strong) NSMutableArray * emailArray; -@property (strong) NSMutableArray * addressArray; -@property (strong) SSKProtoDataMessageContactAvatar* avatar; -@property (strong) NSString* organization; -@end - -@implementation SSKProtoDataMessageContact - -- (BOOL) hasName { - return !!hasName_; -} -- (void) setHasName:(BOOL) _value_ { - hasName_ = !!_value_; -} -@synthesize name; -@synthesize numberArray; -@dynamic number; -@synthesize emailArray; -@dynamic email; -@synthesize addressArray; -@dynamic address; -- (BOOL) hasAvatar { - return !!hasAvatar_; -} -- (void) setHasAvatar:(BOOL) _value_ { - hasAvatar_ = !!_value_; -} -@synthesize avatar; -- (BOOL) hasOrganization { - return !!hasOrganization_; -} -- (void) setHasOrganization:(BOOL) _value_ { - hasOrganization_ = !!_value_; -} -@synthesize organization; -- (instancetype) init { - if ((self = [super init])) { - self.name = [SSKProtoDataMessageContactName defaultInstance]; - self.avatar = [SSKProtoDataMessageContactAvatar defaultInstance]; - self.organization = @""; - } - return self; -} -static SSKProtoDataMessageContact* defaultSSKProtoDataMessageContactInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContact class]) { - defaultSSKProtoDataMessageContactInstance = [[SSKProtoDataMessageContact alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactInstance; -} -- (NSArray *)number { - return numberArray; -} -- (SSKProtoDataMessageContactPhone*)numberAtIndex:(NSUInteger)index { - return [numberArray objectAtIndex:index]; -} -- (NSArray *)email { - return emailArray; -} -- (SSKProtoDataMessageContactEmail*)emailAtIndex:(NSUInteger)index { - return [emailArray objectAtIndex:index]; -} -- (NSArray *)address { - return addressArray; -} -- (SSKProtoDataMessageContactPostalAddress*)addressAtIndex:(NSUInteger)index { - return [addressArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasName) { - [output writeMessage:1 value:self.name]; - } - [self.numberArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPhone *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:3 value:element]; - }]; - [self.emailArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactEmail *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:4 value:element]; - }]; - [self.addressArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPostalAddress *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:5 value:element]; - }]; - if (self.hasAvatar) { - [output writeMessage:6 value:self.avatar]; - } - if (self.hasOrganization) { - [output writeString:7 value:self.organization]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasName) { - size_ += computeMessageSize(1, self.name); - } - [self.numberArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPhone *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(3, element); - }]; - [self.emailArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactEmail *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(4, element); - }]; - [self.addressArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPostalAddress *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(5, element); - }]; - if (self.hasAvatar) { - size_ += computeMessageSize(6, self.avatar); - } - if (self.hasOrganization) { - size_ += computeStringSize(7, self.organization); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContact*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContact*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContact*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContact*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContact*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContact*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContact*)[[[SSKProtoDataMessageContact builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactBuilder*) builder { - return [[SSKProtoDataMessageContactBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactBuilder*) builderWithPrototype:(SSKProtoDataMessageContact*) prototype { - return [[SSKProtoDataMessageContact builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactBuilder*) builder { - return [SSKProtoDataMessageContact builder]; -} -- (SSKProtoDataMessageContactBuilder*) toBuilder { - return [SSKProtoDataMessageContact builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasName) { - [output appendFormat:@"%@%@ {\n", indent, @"name"]; - [self.name writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.numberArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPhone *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"number"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - [self.emailArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactEmail *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"email"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - [self.addressArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPostalAddress *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"address"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - if (self.hasAvatar) { - [output appendFormat:@"%@%@ {\n", indent, @"avatar"]; - [self.avatar writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasOrganization) { - [output appendFormat:@"%@%@: %@\n", indent, @"organization", self.organization]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasName) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.name storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"name"]; - } - for (SSKProtoDataMessageContactPhone* element in self.numberArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"number"]; - } - for (SSKProtoDataMessageContactEmail* element in self.emailArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"email"]; - } - for (SSKProtoDataMessageContactPostalAddress* element in self.addressArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"address"]; - } - if (self.hasAvatar) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.avatar storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"avatar"]; - } - if (self.hasOrganization) { - [dictionary setObject: self.organization forKey: @"organization"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContact class]]) { - return NO; - } - SSKProtoDataMessageContact *otherMessage = other; - return - self.hasName == otherMessage.hasName && - (!self.hasName || [self.name isEqual:otherMessage.name]) && - [self.numberArray isEqualToArray:otherMessage.numberArray] && - [self.emailArray isEqualToArray:otherMessage.emailArray] && - [self.addressArray isEqualToArray:otherMessage.addressArray] && - self.hasAvatar == otherMessage.hasAvatar && - (!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) && - self.hasOrganization == otherMessage.hasOrganization && - (!self.hasOrganization || [self.organization isEqual:otherMessage.organization]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasName) { - hashCode = hashCode * 31 + [self.name hash]; - } - [self.numberArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPhone *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - [self.emailArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactEmail *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - [self.addressArray enumerateObjectsUsingBlock:^(SSKProtoDataMessageContactPostalAddress *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasAvatar) { - hashCode = hashCode * 31 + [self.avatar hash]; - } - if (self.hasOrganization) { - hashCode = hashCode * 31 + [self.organization hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoDataMessageContactName () -@property (strong) NSString* givenName; -@property (strong) NSString* familyName; -@property (strong) NSString* prefix; -@property (strong) NSString* suffix; -@property (strong) NSString* middleName; -@property (strong) NSString* displayName; -@end - -@implementation SSKProtoDataMessageContactName - -- (BOOL) hasGivenName { - return !!hasGivenName_; -} -- (void) setHasGivenName:(BOOL) _value_ { - hasGivenName_ = !!_value_; -} -@synthesize givenName; -- (BOOL) hasFamilyName { - return !!hasFamilyName_; -} -- (void) setHasFamilyName:(BOOL) _value_ { - hasFamilyName_ = !!_value_; -} -@synthesize familyName; -- (BOOL) hasPrefix { - return !!hasPrefix_; -} -- (void) setHasPrefix:(BOOL) _value_ { - hasPrefix_ = !!_value_; -} -@synthesize prefix; -- (BOOL) hasSuffix { - return !!hasSuffix_; -} -- (void) setHasSuffix:(BOOL) _value_ { - hasSuffix_ = !!_value_; -} -@synthesize suffix; -- (BOOL) hasMiddleName { - return !!hasMiddleName_; -} -- (void) setHasMiddleName:(BOOL) _value_ { - hasMiddleName_ = !!_value_; -} -@synthesize middleName; -- (BOOL) hasDisplayName { - return !!hasDisplayName_; -} -- (void) setHasDisplayName:(BOOL) _value_ { - hasDisplayName_ = !!_value_; -} -@synthesize displayName; -- (instancetype) init { - if ((self = [super init])) { - self.givenName = @""; - self.familyName = @""; - self.prefix = @""; - self.suffix = @""; - self.middleName = @""; - self.displayName = @""; - } - return self; -} -static SSKProtoDataMessageContactName* defaultSSKProtoDataMessageContactNameInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContactName class]) { - defaultSSKProtoDataMessageContactNameInstance = [[SSKProtoDataMessageContactName alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactNameInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactNameInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasGivenName) { - [output writeString:1 value:self.givenName]; - } - if (self.hasFamilyName) { - [output writeString:2 value:self.familyName]; - } - if (self.hasPrefix) { - [output writeString:3 value:self.prefix]; - } - if (self.hasSuffix) { - [output writeString:4 value:self.suffix]; - } - if (self.hasMiddleName) { - [output writeString:5 value:self.middleName]; - } - if (self.hasDisplayName) { - [output writeString:6 value:self.displayName]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasGivenName) { - size_ += computeStringSize(1, self.givenName); - } - if (self.hasFamilyName) { - size_ += computeStringSize(2, self.familyName); - } - if (self.hasPrefix) { - size_ += computeStringSize(3, self.prefix); - } - if (self.hasSuffix) { - size_ += computeStringSize(4, self.suffix); - } - if (self.hasMiddleName) { - size_ += computeStringSize(5, self.middleName); - } - if (self.hasDisplayName) { - size_ += computeStringSize(6, self.displayName); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContactName*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContactName*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactName*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContactName*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactName*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContactName*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactName*)[[[SSKProtoDataMessageContactName builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactNameBuilder*) builder { - return [[SSKProtoDataMessageContactNameBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactNameBuilder*) builderWithPrototype:(SSKProtoDataMessageContactName*) prototype { - return [[SSKProtoDataMessageContactName builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactNameBuilder*) builder { - return [SSKProtoDataMessageContactName builder]; -} -- (SSKProtoDataMessageContactNameBuilder*) toBuilder { - return [SSKProtoDataMessageContactName builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasGivenName) { - [output appendFormat:@"%@%@: %@\n", indent, @"givenName", self.givenName]; - } - if (self.hasFamilyName) { - [output appendFormat:@"%@%@: %@\n", indent, @"familyName", self.familyName]; - } - if (self.hasPrefix) { - [output appendFormat:@"%@%@: %@\n", indent, @"prefix", self.prefix]; - } - if (self.hasSuffix) { - [output appendFormat:@"%@%@: %@\n", indent, @"suffix", self.suffix]; - } - if (self.hasMiddleName) { - [output appendFormat:@"%@%@: %@\n", indent, @"middleName", self.middleName]; - } - if (self.hasDisplayName) { - [output appendFormat:@"%@%@: %@\n", indent, @"displayName", self.displayName]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasGivenName) { - [dictionary setObject: self.givenName forKey: @"givenName"]; - } - if (self.hasFamilyName) { - [dictionary setObject: self.familyName forKey: @"familyName"]; - } - if (self.hasPrefix) { - [dictionary setObject: self.prefix forKey: @"prefix"]; - } - if (self.hasSuffix) { - [dictionary setObject: self.suffix forKey: @"suffix"]; - } - if (self.hasMiddleName) { - [dictionary setObject: self.middleName forKey: @"middleName"]; - } - if (self.hasDisplayName) { - [dictionary setObject: self.displayName forKey: @"displayName"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContactName class]]) { - return NO; - } - SSKProtoDataMessageContactName *otherMessage = other; - return - self.hasGivenName == otherMessage.hasGivenName && - (!self.hasGivenName || [self.givenName isEqual:otherMessage.givenName]) && - self.hasFamilyName == otherMessage.hasFamilyName && - (!self.hasFamilyName || [self.familyName isEqual:otherMessage.familyName]) && - self.hasPrefix == otherMessage.hasPrefix && - (!self.hasPrefix || [self.prefix isEqual:otherMessage.prefix]) && - self.hasSuffix == otherMessage.hasSuffix && - (!self.hasSuffix || [self.suffix isEqual:otherMessage.suffix]) && - self.hasMiddleName == otherMessage.hasMiddleName && - (!self.hasMiddleName || [self.middleName isEqual:otherMessage.middleName]) && - self.hasDisplayName == otherMessage.hasDisplayName && - (!self.hasDisplayName || [self.displayName isEqual:otherMessage.displayName]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasGivenName) { - hashCode = hashCode * 31 + [self.givenName hash]; - } - if (self.hasFamilyName) { - hashCode = hashCode * 31 + [self.familyName hash]; - } - if (self.hasPrefix) { - hashCode = hashCode * 31 + [self.prefix hash]; - } - if (self.hasSuffix) { - hashCode = hashCode * 31 + [self.suffix hash]; - } - if (self.hasMiddleName) { - hashCode = hashCode * 31 + [self.middleName hash]; - } - if (self.hasDisplayName) { - hashCode = hashCode * 31 + [self.displayName hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoDataMessageContactNameBuilder() -@property (strong) SSKProtoDataMessageContactName* resultName; -@end - -@implementation SSKProtoDataMessageContactNameBuilder -@synthesize resultName; -- (instancetype) init { - if ((self = [super init])) { - self.resultName = [[SSKProtoDataMessageContactName alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultName; -} -- (SSKProtoDataMessageContactNameBuilder*) clear { - self.resultName = [[SSKProtoDataMessageContactName alloc] init]; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clone { - return [SSKProtoDataMessageContactName builderWithPrototype:resultName]; -} -- (SSKProtoDataMessageContactName*) defaultInstance { - return [SSKProtoDataMessageContactName defaultInstance]; -} -- (SSKProtoDataMessageContactName*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContactName*) buildPartial { - SSKProtoDataMessageContactName* returnMe = resultName; - self.resultName = nil; - return returnMe; -} -- (SSKProtoDataMessageContactNameBuilder*) mergeFrom:(SSKProtoDataMessageContactName*) other { - if (other == [SSKProtoDataMessageContactName defaultInstance]) { - return self; - } - if (other.hasGivenName) { - [self setGivenName:other.givenName]; - } - if (other.hasFamilyName) { - [self setFamilyName:other.familyName]; - } - if (other.hasPrefix) { - [self setPrefix:other.prefix]; - } - if (other.hasSuffix) { - [self setSuffix:other.suffix]; - } - if (other.hasMiddleName) { - [self setMiddleName:other.middleName]; - } - if (other.hasDisplayName) { - [self setDisplayName:other.displayName]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactNameBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setGivenName:[input readString]]; - break; - } - case 18: { - [self setFamilyName:[input readString]]; - break; - } - case 26: { - [self setPrefix:[input readString]]; - break; - } - case 34: { - [self setSuffix:[input readString]]; - break; - } - case 42: { - [self setMiddleName:[input readString]]; - break; - } - case 50: { - [self setDisplayName:[input readString]]; - break; - } - } - } -} -- (BOOL) hasGivenName { - return resultName.hasGivenName; -} -- (NSString*) givenName { - return resultName.givenName; -} -- (SSKProtoDataMessageContactNameBuilder*) setGivenName:(NSString*) value { - resultName.hasGivenName = YES; - resultName.givenName = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearGivenName { - resultName.hasGivenName = NO; - resultName.givenName = @""; - return self; -} -- (BOOL) hasFamilyName { - return resultName.hasFamilyName; -} -- (NSString*) familyName { - return resultName.familyName; -} -- (SSKProtoDataMessageContactNameBuilder*) setFamilyName:(NSString*) value { - resultName.hasFamilyName = YES; - resultName.familyName = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearFamilyName { - resultName.hasFamilyName = NO; - resultName.familyName = @""; - return self; -} -- (BOOL) hasPrefix { - return resultName.hasPrefix; -} -- (NSString*) prefix { - return resultName.prefix; -} -- (SSKProtoDataMessageContactNameBuilder*) setPrefix:(NSString*) value { - resultName.hasPrefix = YES; - resultName.prefix = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearPrefix { - resultName.hasPrefix = NO; - resultName.prefix = @""; - return self; -} -- (BOOL) hasSuffix { - return resultName.hasSuffix; -} -- (NSString*) suffix { - return resultName.suffix; -} -- (SSKProtoDataMessageContactNameBuilder*) setSuffix:(NSString*) value { - resultName.hasSuffix = YES; - resultName.suffix = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearSuffix { - resultName.hasSuffix = NO; - resultName.suffix = @""; - return self; -} -- (BOOL) hasMiddleName { - return resultName.hasMiddleName; -} -- (NSString*) middleName { - return resultName.middleName; -} -- (SSKProtoDataMessageContactNameBuilder*) setMiddleName:(NSString*) value { - resultName.hasMiddleName = YES; - resultName.middleName = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearMiddleName { - resultName.hasMiddleName = NO; - resultName.middleName = @""; - return self; -} -- (BOOL) hasDisplayName { - return resultName.hasDisplayName; -} -- (NSString*) displayName { - return resultName.displayName; -} -- (SSKProtoDataMessageContactNameBuilder*) setDisplayName:(NSString*) value { - resultName.hasDisplayName = YES; - resultName.displayName = value; - return self; -} -- (SSKProtoDataMessageContactNameBuilder*) clearDisplayName { - resultName.hasDisplayName = NO; - resultName.displayName = @""; - return self; -} -@end - -@interface SSKProtoDataMessageContactPhone () -@property (strong) NSString* value; -@property SSKProtoDataMessageContactPhoneType type; -@property (strong) NSString* label; -@end - -@implementation SSKProtoDataMessageContactPhone - -- (BOOL) hasValue { - return !!hasValue_; -} -- (void) setHasValue:(BOOL) _value_ { - hasValue_ = !!_value_; -} -@synthesize value; -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasLabel { - return !!hasLabel_; -} -- (void) setHasLabel:(BOOL) _value_ { - hasLabel_ = !!_value_; -} -@synthesize label; -- (instancetype) init { - if ((self = [super init])) { - self.value = @""; - self.type = SSKProtoDataMessageContactPhoneTypeHome; - self.label = @""; - } - return self; -} -static SSKProtoDataMessageContactPhone* defaultSSKProtoDataMessageContactPhoneInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContactPhone class]) { - defaultSSKProtoDataMessageContactPhoneInstance = [[SSKProtoDataMessageContactPhone alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactPhoneInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactPhoneInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasValue) { - [output writeString:1 value:self.value]; - } - if (self.hasType) { - [output writeEnum:2 value:self.type]; - } - if (self.hasLabel) { - [output writeString:3 value:self.label]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasValue) { - size_ += computeStringSize(1, self.value); - } - if (self.hasType) { - size_ += computeEnumSize(2, self.type); - } - if (self.hasLabel) { - size_ += computeStringSize(3, self.label); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContactPhone*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContactPhone*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPhone*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContactPhone*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPhone*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContactPhone*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPhone*)[[[SSKProtoDataMessageContactPhone builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPhoneBuilder*) builder { - return [[SSKProtoDataMessageContactPhoneBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactPhoneBuilder*) builderWithPrototype:(SSKProtoDataMessageContactPhone*) prototype { - return [[SSKProtoDataMessageContactPhone builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactPhoneBuilder*) builder { - return [SSKProtoDataMessageContactPhone builder]; -} -- (SSKProtoDataMessageContactPhoneBuilder*) toBuilder { - return [SSKProtoDataMessageContactPhone builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasValue) { - [output appendFormat:@"%@%@: %@\n", indent, @"value", self.value]; - } - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoDataMessageContactPhoneType(self.type)]; - } - if (self.hasLabel) { - [output appendFormat:@"%@%@: %@\n", indent, @"label", self.label]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasValue) { - [dictionary setObject: self.value forKey: @"value"]; - } - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - if (self.hasLabel) { - [dictionary setObject: self.label forKey: @"label"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContactPhone class]]) { - return NO; - } - SSKProtoDataMessageContactPhone *otherMessage = other; - return - self.hasValue == otherMessage.hasValue && - (!self.hasValue || [self.value isEqual:otherMessage.value]) && - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasLabel == otherMessage.hasLabel && - (!self.hasLabel || [self.label isEqual:otherMessage.label]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasValue) { - hashCode = hashCode * 31 + [self.value hash]; - } - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasLabel) { - hashCode = hashCode * 31 + [self.label hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoDataMessageContactPhoneTypeIsValidValue(SSKProtoDataMessageContactPhoneType value) { - switch (value) { - case SSKProtoDataMessageContactPhoneTypeHome: - case SSKProtoDataMessageContactPhoneTypeMobile: - case SSKProtoDataMessageContactPhoneTypeWork: - case SSKProtoDataMessageContactPhoneTypeCustom: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoDataMessageContactPhoneType(SSKProtoDataMessageContactPhoneType value) { - switch (value) { - case SSKProtoDataMessageContactPhoneTypeHome: - return @"SSKProtoDataMessageContactPhoneTypeHome"; - case SSKProtoDataMessageContactPhoneTypeMobile: - return @"SSKProtoDataMessageContactPhoneTypeMobile"; - case SSKProtoDataMessageContactPhoneTypeWork: - return @"SSKProtoDataMessageContactPhoneTypeWork"; - case SSKProtoDataMessageContactPhoneTypeCustom: - return @"SSKProtoDataMessageContactPhoneTypeCustom"; - default: - return nil; - } -} - -@interface SSKProtoDataMessageContactPhoneBuilder() -@property (strong) SSKProtoDataMessageContactPhone* resultPhone; -@end - -@implementation SSKProtoDataMessageContactPhoneBuilder -@synthesize resultPhone; -- (instancetype) init { - if ((self = [super init])) { - self.resultPhone = [[SSKProtoDataMessageContactPhone alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultPhone; -} -- (SSKProtoDataMessageContactPhoneBuilder*) clear { - self.resultPhone = [[SSKProtoDataMessageContactPhone alloc] init]; - return self; -} -- (SSKProtoDataMessageContactPhoneBuilder*) clone { - return [SSKProtoDataMessageContactPhone builderWithPrototype:resultPhone]; -} -- (SSKProtoDataMessageContactPhone*) defaultInstance { - return [SSKProtoDataMessageContactPhone defaultInstance]; -} -- (SSKProtoDataMessageContactPhone*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContactPhone*) buildPartial { - SSKProtoDataMessageContactPhone* returnMe = resultPhone; - self.resultPhone = nil; - return returnMe; -} -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFrom:(SSKProtoDataMessageContactPhone*) other { - if (other == [SSKProtoDataMessageContactPhone defaultInstance]) { - return self; - } - if (other.hasValue) { - [self setValue:other.value]; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasLabel) { - [self setLabel:other.label]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactPhoneBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setValue:[input readString]]; - break; - } - case 16: { - SSKProtoDataMessageContactPhoneType value = (SSKProtoDataMessageContactPhoneType)[input readEnum]; - if (SSKProtoDataMessageContactPhoneTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:2 value:value]; - } - break; - } - case 26: { - [self setLabel:[input readString]]; - break; - } - } - } -} -- (BOOL) hasValue { - return resultPhone.hasValue; -} -- (NSString*) value { - return resultPhone.value; -} -- (SSKProtoDataMessageContactPhoneBuilder*) setValue:(NSString*) value { - resultPhone.hasValue = YES; - resultPhone.value = value; - return self; -} -- (SSKProtoDataMessageContactPhoneBuilder*) clearValue { - resultPhone.hasValue = NO; - resultPhone.value = @""; - return self; -} -- (BOOL) hasType { - return resultPhone.hasType; -} -- (SSKProtoDataMessageContactPhoneType) type { - return resultPhone.type; -} -- (SSKProtoDataMessageContactPhoneBuilder*) setType:(SSKProtoDataMessageContactPhoneType) value { - resultPhone.hasType = YES; - resultPhone.type = value; - return self; -} -- (SSKProtoDataMessageContactPhoneBuilder*) clearType { - resultPhone.hasType = NO; - resultPhone.type = SSKProtoDataMessageContactPhoneTypeHome; - return self; -} -- (BOOL) hasLabel { - return resultPhone.hasLabel; -} -- (NSString*) label { - return resultPhone.label; -} -- (SSKProtoDataMessageContactPhoneBuilder*) setLabel:(NSString*) value { - resultPhone.hasLabel = YES; - resultPhone.label = value; - return self; -} -- (SSKProtoDataMessageContactPhoneBuilder*) clearLabel { - resultPhone.hasLabel = NO; - resultPhone.label = @""; - return self; -} -@end - -@interface SSKProtoDataMessageContactEmail () -@property (strong) NSString* value; -@property SSKProtoDataMessageContactEmailType type; -@property (strong) NSString* label; -@end - -@implementation SSKProtoDataMessageContactEmail - -- (BOOL) hasValue { - return !!hasValue_; -} -- (void) setHasValue:(BOOL) _value_ { - hasValue_ = !!_value_; -} -@synthesize value; -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasLabel { - return !!hasLabel_; -} -- (void) setHasLabel:(BOOL) _value_ { - hasLabel_ = !!_value_; -} -@synthesize label; -- (instancetype) init { - if ((self = [super init])) { - self.value = @""; - self.type = SSKProtoDataMessageContactEmailTypeHome; - self.label = @""; - } - return self; -} -static SSKProtoDataMessageContactEmail* defaultSSKProtoDataMessageContactEmailInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContactEmail class]) { - defaultSSKProtoDataMessageContactEmailInstance = [[SSKProtoDataMessageContactEmail alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactEmailInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactEmailInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasValue) { - [output writeString:1 value:self.value]; - } - if (self.hasType) { - [output writeEnum:2 value:self.type]; - } - if (self.hasLabel) { - [output writeString:3 value:self.label]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasValue) { - size_ += computeStringSize(1, self.value); - } - if (self.hasType) { - size_ += computeEnumSize(2, self.type); - } - if (self.hasLabel) { - size_ += computeStringSize(3, self.label); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContactEmail*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContactEmail*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactEmail*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContactEmail*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactEmail*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContactEmail*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactEmail*)[[[SSKProtoDataMessageContactEmail builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactEmailBuilder*) builder { - return [[SSKProtoDataMessageContactEmailBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactEmailBuilder*) builderWithPrototype:(SSKProtoDataMessageContactEmail*) prototype { - return [[SSKProtoDataMessageContactEmail builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactEmailBuilder*) builder { - return [SSKProtoDataMessageContactEmail builder]; -} -- (SSKProtoDataMessageContactEmailBuilder*) toBuilder { - return [SSKProtoDataMessageContactEmail builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasValue) { - [output appendFormat:@"%@%@: %@\n", indent, @"value", self.value]; - } - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoDataMessageContactEmailType(self.type)]; - } - if (self.hasLabel) { - [output appendFormat:@"%@%@: %@\n", indent, @"label", self.label]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasValue) { - [dictionary setObject: self.value forKey: @"value"]; - } - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - if (self.hasLabel) { - [dictionary setObject: self.label forKey: @"label"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContactEmail class]]) { - return NO; - } - SSKProtoDataMessageContactEmail *otherMessage = other; - return - self.hasValue == otherMessage.hasValue && - (!self.hasValue || [self.value isEqual:otherMessage.value]) && - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasLabel == otherMessage.hasLabel && - (!self.hasLabel || [self.label isEqual:otherMessage.label]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasValue) { - hashCode = hashCode * 31 + [self.value hash]; - } - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasLabel) { - hashCode = hashCode * 31 + [self.label hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoDataMessageContactEmailTypeIsValidValue(SSKProtoDataMessageContactEmailType value) { - switch (value) { - case SSKProtoDataMessageContactEmailTypeHome: - case SSKProtoDataMessageContactEmailTypeMobile: - case SSKProtoDataMessageContactEmailTypeWork: - case SSKProtoDataMessageContactEmailTypeCustom: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoDataMessageContactEmailType(SSKProtoDataMessageContactEmailType value) { - switch (value) { - case SSKProtoDataMessageContactEmailTypeHome: - return @"SSKProtoDataMessageContactEmailTypeHome"; - case SSKProtoDataMessageContactEmailTypeMobile: - return @"SSKProtoDataMessageContactEmailTypeMobile"; - case SSKProtoDataMessageContactEmailTypeWork: - return @"SSKProtoDataMessageContactEmailTypeWork"; - case SSKProtoDataMessageContactEmailTypeCustom: - return @"SSKProtoDataMessageContactEmailTypeCustom"; - default: - return nil; - } -} - -@interface SSKProtoDataMessageContactEmailBuilder() -@property (strong) SSKProtoDataMessageContactEmail* resultEmail; -@end - -@implementation SSKProtoDataMessageContactEmailBuilder -@synthesize resultEmail; -- (instancetype) init { - if ((self = [super init])) { - self.resultEmail = [[SSKProtoDataMessageContactEmail alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultEmail; -} -- (SSKProtoDataMessageContactEmailBuilder*) clear { - self.resultEmail = [[SSKProtoDataMessageContactEmail alloc] init]; - return self; -} -- (SSKProtoDataMessageContactEmailBuilder*) clone { - return [SSKProtoDataMessageContactEmail builderWithPrototype:resultEmail]; -} -- (SSKProtoDataMessageContactEmail*) defaultInstance { - return [SSKProtoDataMessageContactEmail defaultInstance]; -} -- (SSKProtoDataMessageContactEmail*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContactEmail*) buildPartial { - SSKProtoDataMessageContactEmail* returnMe = resultEmail; - self.resultEmail = nil; - return returnMe; -} -- (SSKProtoDataMessageContactEmailBuilder*) mergeFrom:(SSKProtoDataMessageContactEmail*) other { - if (other == [SSKProtoDataMessageContactEmail defaultInstance]) { - return self; - } - if (other.hasValue) { - [self setValue:other.value]; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasLabel) { - [self setLabel:other.label]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactEmailBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactEmailBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setValue:[input readString]]; - break; - } - case 16: { - SSKProtoDataMessageContactEmailType value = (SSKProtoDataMessageContactEmailType)[input readEnum]; - if (SSKProtoDataMessageContactEmailTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:2 value:value]; - } - break; - } - case 26: { - [self setLabel:[input readString]]; - break; - } - } - } -} -- (BOOL) hasValue { - return resultEmail.hasValue; -} -- (NSString*) value { - return resultEmail.value; -} -- (SSKProtoDataMessageContactEmailBuilder*) setValue:(NSString*) value { - resultEmail.hasValue = YES; - resultEmail.value = value; - return self; -} -- (SSKProtoDataMessageContactEmailBuilder*) clearValue { - resultEmail.hasValue = NO; - resultEmail.value = @""; - return self; -} -- (BOOL) hasType { - return resultEmail.hasType; -} -- (SSKProtoDataMessageContactEmailType) type { - return resultEmail.type; -} -- (SSKProtoDataMessageContactEmailBuilder*) setType:(SSKProtoDataMessageContactEmailType) value { - resultEmail.hasType = YES; - resultEmail.type = value; - return self; -} -- (SSKProtoDataMessageContactEmailBuilder*) clearType { - resultEmail.hasType = NO; - resultEmail.type = SSKProtoDataMessageContactEmailTypeHome; - return self; -} -- (BOOL) hasLabel { - return resultEmail.hasLabel; -} -- (NSString*) label { - return resultEmail.label; -} -- (SSKProtoDataMessageContactEmailBuilder*) setLabel:(NSString*) value { - resultEmail.hasLabel = YES; - resultEmail.label = value; - return self; -} -- (SSKProtoDataMessageContactEmailBuilder*) clearLabel { - resultEmail.hasLabel = NO; - resultEmail.label = @""; - return self; -} -@end - -@interface SSKProtoDataMessageContactPostalAddress () -@property SSKProtoDataMessageContactPostalAddressType type; -@property (strong) NSString* label; -@property (strong) NSString* street; -@property (strong) NSString* pobox; -@property (strong) NSString* neighborhood; -@property (strong) NSString* city; -@property (strong) NSString* region; -@property (strong) NSString* postcode; -@property (strong) NSString* country; -@end - -@implementation SSKProtoDataMessageContactPostalAddress - -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasLabel { - return !!hasLabel_; -} -- (void) setHasLabel:(BOOL) _value_ { - hasLabel_ = !!_value_; -} -@synthesize label; -- (BOOL) hasStreet { - return !!hasStreet_; -} -- (void) setHasStreet:(BOOL) _value_ { - hasStreet_ = !!_value_; -} -@synthesize street; -- (BOOL) hasPobox { - return !!hasPobox_; -} -- (void) setHasPobox:(BOOL) _value_ { - hasPobox_ = !!_value_; -} -@synthesize pobox; -- (BOOL) hasNeighborhood { - return !!hasNeighborhood_; -} -- (void) setHasNeighborhood:(BOOL) _value_ { - hasNeighborhood_ = !!_value_; -} -@synthesize neighborhood; -- (BOOL) hasCity { - return !!hasCity_; -} -- (void) setHasCity:(BOOL) _value_ { - hasCity_ = !!_value_; -} -@synthesize city; -- (BOOL) hasRegion { - return !!hasRegion_; -} -- (void) setHasRegion:(BOOL) _value_ { - hasRegion_ = !!_value_; -} -@synthesize region; -- (BOOL) hasPostcode { - return !!hasPostcode_; -} -- (void) setHasPostcode:(BOOL) _value_ { - hasPostcode_ = !!_value_; -} -@synthesize postcode; -- (BOOL) hasCountry { - return !!hasCountry_; -} -- (void) setHasCountry:(BOOL) _value_ { - hasCountry_ = !!_value_; -} -@synthesize country; -- (instancetype) init { - if ((self = [super init])) { - self.type = SSKProtoDataMessageContactPostalAddressTypeHome; - self.label = @""; - self.street = @""; - self.pobox = @""; - self.neighborhood = @""; - self.city = @""; - self.region = @""; - self.postcode = @""; - self.country = @""; - } - return self; -} -static SSKProtoDataMessageContactPostalAddress* defaultSSKProtoDataMessageContactPostalAddressInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContactPostalAddress class]) { - defaultSSKProtoDataMessageContactPostalAddressInstance = [[SSKProtoDataMessageContactPostalAddress alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactPostalAddressInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactPostalAddressInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasType) { - [output writeEnum:1 value:self.type]; - } - if (self.hasLabel) { - [output writeString:2 value:self.label]; - } - if (self.hasStreet) { - [output writeString:3 value:self.street]; - } - if (self.hasPobox) { - [output writeString:4 value:self.pobox]; - } - if (self.hasNeighborhood) { - [output writeString:5 value:self.neighborhood]; - } - if (self.hasCity) { - [output writeString:6 value:self.city]; - } - if (self.hasRegion) { - [output writeString:7 value:self.region]; - } - if (self.hasPostcode) { - [output writeString:8 value:self.postcode]; - } - if (self.hasCountry) { - [output writeString:9 value:self.country]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasType) { - size_ += computeEnumSize(1, self.type); - } - if (self.hasLabel) { - size_ += computeStringSize(2, self.label); - } - if (self.hasStreet) { - size_ += computeStringSize(3, self.street); - } - if (self.hasPobox) { - size_ += computeStringSize(4, self.pobox); - } - if (self.hasNeighborhood) { - size_ += computeStringSize(5, self.neighborhood); - } - if (self.hasCity) { - size_ += computeStringSize(6, self.city); - } - if (self.hasRegion) { - size_ += computeStringSize(7, self.region); - } - if (self.hasPostcode) { - size_ += computeStringSize(8, self.postcode); - } - if (self.hasCountry) { - size_ += computeStringSize(9, self.country); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContactPostalAddress*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactPostalAddress*)[[[SSKProtoDataMessageContactPostalAddress builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactPostalAddressBuilder*) builder { - return [[SSKProtoDataMessageContactPostalAddressBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactPostalAddressBuilder*) builderWithPrototype:(SSKProtoDataMessageContactPostalAddress*) prototype { - return [[SSKProtoDataMessageContactPostalAddress builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) builder { - return [SSKProtoDataMessageContactPostalAddress builder]; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) toBuilder { - return [SSKProtoDataMessageContactPostalAddress builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoDataMessageContactPostalAddressType(self.type)]; - } - if (self.hasLabel) { - [output appendFormat:@"%@%@: %@\n", indent, @"label", self.label]; - } - if (self.hasStreet) { - [output appendFormat:@"%@%@: %@\n", indent, @"street", self.street]; - } - if (self.hasPobox) { - [output appendFormat:@"%@%@: %@\n", indent, @"pobox", self.pobox]; - } - if (self.hasNeighborhood) { - [output appendFormat:@"%@%@: %@\n", indent, @"neighborhood", self.neighborhood]; - } - if (self.hasCity) { - [output appendFormat:@"%@%@: %@\n", indent, @"city", self.city]; - } - if (self.hasRegion) { - [output appendFormat:@"%@%@: %@\n", indent, @"region", self.region]; - } - if (self.hasPostcode) { - [output appendFormat:@"%@%@: %@\n", indent, @"postcode", self.postcode]; - } - if (self.hasCountry) { - [output appendFormat:@"%@%@: %@\n", indent, @"country", self.country]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - if (self.hasLabel) { - [dictionary setObject: self.label forKey: @"label"]; - } - if (self.hasStreet) { - [dictionary setObject: self.street forKey: @"street"]; - } - if (self.hasPobox) { - [dictionary setObject: self.pobox forKey: @"pobox"]; - } - if (self.hasNeighborhood) { - [dictionary setObject: self.neighborhood forKey: @"neighborhood"]; - } - if (self.hasCity) { - [dictionary setObject: self.city forKey: @"city"]; - } - if (self.hasRegion) { - [dictionary setObject: self.region forKey: @"region"]; - } - if (self.hasPostcode) { - [dictionary setObject: self.postcode forKey: @"postcode"]; - } - if (self.hasCountry) { - [dictionary setObject: self.country forKey: @"country"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContactPostalAddress class]]) { - return NO; - } - SSKProtoDataMessageContactPostalAddress *otherMessage = other; - return - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasLabel == otherMessage.hasLabel && - (!self.hasLabel || [self.label isEqual:otherMessage.label]) && - self.hasStreet == otherMessage.hasStreet && - (!self.hasStreet || [self.street isEqual:otherMessage.street]) && - self.hasPobox == otherMessage.hasPobox && - (!self.hasPobox || [self.pobox isEqual:otherMessage.pobox]) && - self.hasNeighborhood == otherMessage.hasNeighborhood && - (!self.hasNeighborhood || [self.neighborhood isEqual:otherMessage.neighborhood]) && - self.hasCity == otherMessage.hasCity && - (!self.hasCity || [self.city isEqual:otherMessage.city]) && - self.hasRegion == otherMessage.hasRegion && - (!self.hasRegion || [self.region isEqual:otherMessage.region]) && - self.hasPostcode == otherMessage.hasPostcode && - (!self.hasPostcode || [self.postcode isEqual:otherMessage.postcode]) && - self.hasCountry == otherMessage.hasCountry && - (!self.hasCountry || [self.country isEqual:otherMessage.country]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasLabel) { - hashCode = hashCode * 31 + [self.label hash]; - } - if (self.hasStreet) { - hashCode = hashCode * 31 + [self.street hash]; - } - if (self.hasPobox) { - hashCode = hashCode * 31 + [self.pobox hash]; - } - if (self.hasNeighborhood) { - hashCode = hashCode * 31 + [self.neighborhood hash]; - } - if (self.hasCity) { - hashCode = hashCode * 31 + [self.city hash]; - } - if (self.hasRegion) { - hashCode = hashCode * 31 + [self.region hash]; - } - if (self.hasPostcode) { - hashCode = hashCode * 31 + [self.postcode hash]; - } - if (self.hasCountry) { - hashCode = hashCode * 31 + [self.country hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoDataMessageContactPostalAddressTypeIsValidValue(SSKProtoDataMessageContactPostalAddressType value) { - switch (value) { - case SSKProtoDataMessageContactPostalAddressTypeHome: - case SSKProtoDataMessageContactPostalAddressTypeWork: - case SSKProtoDataMessageContactPostalAddressTypeCustom: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoDataMessageContactPostalAddressType(SSKProtoDataMessageContactPostalAddressType value) { - switch (value) { - case SSKProtoDataMessageContactPostalAddressTypeHome: - return @"SSKProtoDataMessageContactPostalAddressTypeHome"; - case SSKProtoDataMessageContactPostalAddressTypeWork: - return @"SSKProtoDataMessageContactPostalAddressTypeWork"; - case SSKProtoDataMessageContactPostalAddressTypeCustom: - return @"SSKProtoDataMessageContactPostalAddressTypeCustom"; - default: - return nil; - } -} - -@interface SSKProtoDataMessageContactPostalAddressBuilder() -@property (strong) SSKProtoDataMessageContactPostalAddress* resultPostalAddress; -@end - -@implementation SSKProtoDataMessageContactPostalAddressBuilder -@synthesize resultPostalAddress; -- (instancetype) init { - if ((self = [super init])) { - self.resultPostalAddress = [[SSKProtoDataMessageContactPostalAddress alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultPostalAddress; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clear { - self.resultPostalAddress = [[SSKProtoDataMessageContactPostalAddress alloc] init]; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clone { - return [SSKProtoDataMessageContactPostalAddress builderWithPrototype:resultPostalAddress]; -} -- (SSKProtoDataMessageContactPostalAddress*) defaultInstance { - return [SSKProtoDataMessageContactPostalAddress defaultInstance]; -} -- (SSKProtoDataMessageContactPostalAddress*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContactPostalAddress*) buildPartial { - SSKProtoDataMessageContactPostalAddress* returnMe = resultPostalAddress; - self.resultPostalAddress = nil; - return returnMe; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFrom:(SSKProtoDataMessageContactPostalAddress*) other { - if (other == [SSKProtoDataMessageContactPostalAddress defaultInstance]) { - return self; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasLabel) { - [self setLabel:other.label]; - } - if (other.hasStreet) { - [self setStreet:other.street]; - } - if (other.hasPobox) { - [self setPobox:other.pobox]; - } - if (other.hasNeighborhood) { - [self setNeighborhood:other.neighborhood]; - } - if (other.hasCity) { - [self setCity:other.city]; - } - if (other.hasRegion) { - [self setRegion:other.region]; - } - if (other.hasPostcode) { - [self setPostcode:other.postcode]; - } - if (other.hasCountry) { - [self setCountry:other.country]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - SSKProtoDataMessageContactPostalAddressType value = (SSKProtoDataMessageContactPostalAddressType)[input readEnum]; - if (SSKProtoDataMessageContactPostalAddressTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 18: { - [self setLabel:[input readString]]; - break; - } - case 26: { - [self setStreet:[input readString]]; - break; - } - case 34: { - [self setPobox:[input readString]]; - break; - } - case 42: { - [self setNeighborhood:[input readString]]; - break; - } - case 50: { - [self setCity:[input readString]]; - break; - } - case 58: { - [self setRegion:[input readString]]; - break; - } - case 66: { - [self setPostcode:[input readString]]; - break; - } - case 74: { - [self setCountry:[input readString]]; - break; - } - } - } -} -- (BOOL) hasType { - return resultPostalAddress.hasType; -} -- (SSKProtoDataMessageContactPostalAddressType) type { - return resultPostalAddress.type; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setType:(SSKProtoDataMessageContactPostalAddressType) value { - resultPostalAddress.hasType = YES; - resultPostalAddress.type = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearType { - resultPostalAddress.hasType = NO; - resultPostalAddress.type = SSKProtoDataMessageContactPostalAddressTypeHome; - return self; -} -- (BOOL) hasLabel { - return resultPostalAddress.hasLabel; -} -- (NSString*) label { - return resultPostalAddress.label; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setLabel:(NSString*) value { - resultPostalAddress.hasLabel = YES; - resultPostalAddress.label = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearLabel { - resultPostalAddress.hasLabel = NO; - resultPostalAddress.label = @""; - return self; -} -- (BOOL) hasStreet { - return resultPostalAddress.hasStreet; -} -- (NSString*) street { - return resultPostalAddress.street; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setStreet:(NSString*) value { - resultPostalAddress.hasStreet = YES; - resultPostalAddress.street = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearStreet { - resultPostalAddress.hasStreet = NO; - resultPostalAddress.street = @""; - return self; -} -- (BOOL) hasPobox { - return resultPostalAddress.hasPobox; -} -- (NSString*) pobox { - return resultPostalAddress.pobox; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setPobox:(NSString*) value { - resultPostalAddress.hasPobox = YES; - resultPostalAddress.pobox = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearPobox { - resultPostalAddress.hasPobox = NO; - resultPostalAddress.pobox = @""; - return self; -} -- (BOOL) hasNeighborhood { - return resultPostalAddress.hasNeighborhood; -} -- (NSString*) neighborhood { - return resultPostalAddress.neighborhood; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setNeighborhood:(NSString*) value { - resultPostalAddress.hasNeighborhood = YES; - resultPostalAddress.neighborhood = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearNeighborhood { - resultPostalAddress.hasNeighborhood = NO; - resultPostalAddress.neighborhood = @""; - return self; -} -- (BOOL) hasCity { - return resultPostalAddress.hasCity; -} -- (NSString*) city { - return resultPostalAddress.city; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setCity:(NSString*) value { - resultPostalAddress.hasCity = YES; - resultPostalAddress.city = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearCity { - resultPostalAddress.hasCity = NO; - resultPostalAddress.city = @""; - return self; -} -- (BOOL) hasRegion { - return resultPostalAddress.hasRegion; -} -- (NSString*) region { - return resultPostalAddress.region; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setRegion:(NSString*) value { - resultPostalAddress.hasRegion = YES; - resultPostalAddress.region = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearRegion { - resultPostalAddress.hasRegion = NO; - resultPostalAddress.region = @""; - return self; -} -- (BOOL) hasPostcode { - return resultPostalAddress.hasPostcode; -} -- (NSString*) postcode { - return resultPostalAddress.postcode; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setPostcode:(NSString*) value { - resultPostalAddress.hasPostcode = YES; - resultPostalAddress.postcode = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearPostcode { - resultPostalAddress.hasPostcode = NO; - resultPostalAddress.postcode = @""; - return self; -} -- (BOOL) hasCountry { - return resultPostalAddress.hasCountry; -} -- (NSString*) country { - return resultPostalAddress.country; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) setCountry:(NSString*) value { - resultPostalAddress.hasCountry = YES; - resultPostalAddress.country = value; - return self; -} -- (SSKProtoDataMessageContactPostalAddressBuilder*) clearCountry { - resultPostalAddress.hasCountry = NO; - resultPostalAddress.country = @""; - return self; -} -@end - -@interface SSKProtoDataMessageContactAvatar () -@property (strong) SSKProtoAttachmentPointer* avatar; -@property BOOL isProfile; -@end - -@implementation SSKProtoDataMessageContactAvatar - -- (BOOL) hasAvatar { - return !!hasAvatar_; -} -- (void) setHasAvatar:(BOOL) _value_ { - hasAvatar_ = !!_value_; -} -@synthesize avatar; -- (BOOL) hasIsProfile { - return !!hasIsProfile_; -} -- (void) setHasIsProfile:(BOOL) _value_ { - hasIsProfile_ = !!_value_; -} -- (BOOL) isProfile { - return !!isProfile_; -} -- (void) setIsProfile:(BOOL) _value_ { - isProfile_ = !!_value_; -} -- (instancetype) init { - if ((self = [super init])) { - self.avatar = [SSKProtoAttachmentPointer defaultInstance]; - self.isProfile = NO; - } - return self; -} -static SSKProtoDataMessageContactAvatar* defaultSSKProtoDataMessageContactAvatarInstance = nil; -+ (void) initialize { - if (self == [SSKProtoDataMessageContactAvatar class]) { - defaultSSKProtoDataMessageContactAvatarInstance = [[SSKProtoDataMessageContactAvatar alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactAvatarInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoDataMessageContactAvatarInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasAvatar) { - [output writeMessage:1 value:self.avatar]; - } - if (self.hasIsProfile) { - [output writeBool:2 value:self.isProfile]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasAvatar) { - size_ += computeMessageSize(1, self.avatar); - } - if (self.hasIsProfile) { - size_ += computeBoolSize(2, self.isProfile); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromData:(NSData*) data { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromData:data] build]; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoDataMessageContactAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoDataMessageContactAvatar*)[[[SSKProtoDataMessageContactAvatar builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoDataMessageContactAvatarBuilder*) builder { - return [[SSKProtoDataMessageContactAvatarBuilder alloc] init]; -} -+ (SSKProtoDataMessageContactAvatarBuilder*) builderWithPrototype:(SSKProtoDataMessageContactAvatar*) prototype { - return [[SSKProtoDataMessageContactAvatar builder] mergeFrom:prototype]; -} -- (SSKProtoDataMessageContactAvatarBuilder*) builder { - return [SSKProtoDataMessageContactAvatar builder]; -} -- (SSKProtoDataMessageContactAvatarBuilder*) toBuilder { - return [SSKProtoDataMessageContactAvatar builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasAvatar) { - [output appendFormat:@"%@%@ {\n", indent, @"avatar"]; - [self.avatar writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasIsProfile) { - [output appendFormat:@"%@%@: %@\n", indent, @"isProfile", [NSNumber numberWithBool:self.isProfile]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasAvatar) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.avatar storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"avatar"]; - } - if (self.hasIsProfile) { - [dictionary setObject: [NSNumber numberWithBool:self.isProfile] forKey: @"isProfile"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoDataMessageContactAvatar class]]) { - return NO; - } - SSKProtoDataMessageContactAvatar *otherMessage = other; - return - self.hasAvatar == otherMessage.hasAvatar && - (!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) && - self.hasIsProfile == otherMessage.hasIsProfile && - (!self.hasIsProfile || self.isProfile == otherMessage.isProfile) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasAvatar) { - hashCode = hashCode * 31 + [self.avatar hash]; - } - if (self.hasIsProfile) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.isProfile] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoDataMessageContactAvatarBuilder() -@property (strong) SSKProtoDataMessageContactAvatar* resultAvatar; -@end - -@implementation SSKProtoDataMessageContactAvatarBuilder -@synthesize resultAvatar; -- (instancetype) init { - if ((self = [super init])) { - self.resultAvatar = [[SSKProtoDataMessageContactAvatar alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultAvatar; -} -- (SSKProtoDataMessageContactAvatarBuilder*) clear { - self.resultAvatar = [[SSKProtoDataMessageContactAvatar alloc] init]; - return self; -} -- (SSKProtoDataMessageContactAvatarBuilder*) clone { - return [SSKProtoDataMessageContactAvatar builderWithPrototype:resultAvatar]; -} -- (SSKProtoDataMessageContactAvatar*) defaultInstance { - return [SSKProtoDataMessageContactAvatar defaultInstance]; -} -- (SSKProtoDataMessageContactAvatar*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContactAvatar*) buildPartial { - SSKProtoDataMessageContactAvatar* returnMe = resultAvatar; - self.resultAvatar = nil; - return returnMe; -} -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFrom:(SSKProtoDataMessageContactAvatar*) other { - if (other == [SSKProtoDataMessageContactAvatar defaultInstance]) { - return self; - } - if (other.hasAvatar) { - [self mergeAvatar:other.avatar]; - } - if (other.hasIsProfile) { - [self setIsProfile:other.isProfile]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - if (self.hasAvatar) { - [subBuilder mergeFrom:self.avatar]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAvatar:[subBuilder buildPartial]]; - break; - } - case 16: { - [self setIsProfile:[input readBool]]; - break; - } - } - } -} -- (BOOL) hasAvatar { - return resultAvatar.hasAvatar; -} -- (SSKProtoAttachmentPointer*) avatar { - return resultAvatar.avatar; -} -- (SSKProtoDataMessageContactAvatarBuilder*) setAvatar:(SSKProtoAttachmentPointer*) value { - resultAvatar.hasAvatar = YES; - resultAvatar.avatar = value; - return self; -} -- (SSKProtoDataMessageContactAvatarBuilder*) setAvatarBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue { - return [self setAvatar:[builderForValue build]]; -} -- (SSKProtoDataMessageContactAvatarBuilder*) mergeAvatar:(SSKProtoAttachmentPointer*) value { - if (resultAvatar.hasAvatar && - resultAvatar.avatar != [SSKProtoAttachmentPointer defaultInstance]) { - resultAvatar.avatar = - [[[SSKProtoAttachmentPointer builderWithPrototype:resultAvatar.avatar] mergeFrom:value] buildPartial]; - } else { - resultAvatar.avatar = value; - } - resultAvatar.hasAvatar = YES; - return self; -} -- (SSKProtoDataMessageContactAvatarBuilder*) clearAvatar { - resultAvatar.hasAvatar = NO; - resultAvatar.avatar = [SSKProtoAttachmentPointer defaultInstance]; - return self; -} -- (BOOL) hasIsProfile { - return resultAvatar.hasIsProfile; -} -- (BOOL) isProfile { - return resultAvatar.isProfile; -} -- (SSKProtoDataMessageContactAvatarBuilder*) setIsProfile:(BOOL) value { - resultAvatar.hasIsProfile = YES; - resultAvatar.isProfile = value; - return self; -} -- (SSKProtoDataMessageContactAvatarBuilder*) clearIsProfile { - resultAvatar.hasIsProfile = NO; - resultAvatar.isProfile = NO; - return self; -} -@end - -@interface SSKProtoDataMessageContactBuilder() -@property (strong) SSKProtoDataMessageContact* resultContact; -@end - -@implementation SSKProtoDataMessageContactBuilder -@synthesize resultContact; -- (instancetype) init { - if ((self = [super init])) { - self.resultContact = [[SSKProtoDataMessageContact alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultContact; -} -- (SSKProtoDataMessageContactBuilder*) clear { - self.resultContact = [[SSKProtoDataMessageContact alloc] init]; - return self; -} -- (SSKProtoDataMessageContactBuilder*) clone { - return [SSKProtoDataMessageContact builderWithPrototype:resultContact]; -} -- (SSKProtoDataMessageContact*) defaultInstance { - return [SSKProtoDataMessageContact defaultInstance]; -} -- (SSKProtoDataMessageContact*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessageContact*) buildPartial { - SSKProtoDataMessageContact* returnMe = resultContact; - self.resultContact = nil; - return returnMe; -} -- (SSKProtoDataMessageContactBuilder*) mergeFrom:(SSKProtoDataMessageContact*) other { - if (other == [SSKProtoDataMessageContact defaultInstance]) { - return self; - } - if (other.hasName) { - [self mergeName:other.name]; - } - if (other.numberArray.count > 0) { - if (resultContact.numberArray == nil) { - resultContact.numberArray = [[NSMutableArray alloc] initWithArray:other.numberArray]; - } else { - [resultContact.numberArray addObjectsFromArray:other.numberArray]; - } - } - if (other.emailArray.count > 0) { - if (resultContact.emailArray == nil) { - resultContact.emailArray = [[NSMutableArray alloc] initWithArray:other.emailArray]; - } else { - [resultContact.emailArray addObjectsFromArray:other.emailArray]; - } - } - if (other.addressArray.count > 0) { - if (resultContact.addressArray == nil) { - resultContact.addressArray = [[NSMutableArray alloc] initWithArray:other.addressArray]; - } else { - [resultContact.addressArray addObjectsFromArray:other.addressArray]; - } - } - if (other.hasAvatar) { - [self mergeAvatar:other.avatar]; - } - if (other.hasOrganization) { - [self setOrganization:other.organization]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageContactBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageContactBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoDataMessageContactNameBuilder* subBuilder = [SSKProtoDataMessageContactName builder]; - if (self.hasName) { - [subBuilder mergeFrom:self.name]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setName:[subBuilder buildPartial]]; - break; - } - case 26: { - SSKProtoDataMessageContactPhoneBuilder* subBuilder = [SSKProtoDataMessageContactPhone builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addNumber:[subBuilder buildPartial]]; - break; - } - case 34: { - SSKProtoDataMessageContactEmailBuilder* subBuilder = [SSKProtoDataMessageContactEmail builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addEmail:[subBuilder buildPartial]]; - break; - } - case 42: { - SSKProtoDataMessageContactPostalAddressBuilder* subBuilder = [SSKProtoDataMessageContactPostalAddress builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addAddress:[subBuilder buildPartial]]; - break; - } - case 50: { - SSKProtoDataMessageContactAvatarBuilder* subBuilder = [SSKProtoDataMessageContactAvatar builder]; - if (self.hasAvatar) { - [subBuilder mergeFrom:self.avatar]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAvatar:[subBuilder buildPartial]]; - break; - } - case 58: { - [self setOrganization:[input readString]]; - break; - } - } - } -} -- (BOOL) hasName { - return resultContact.hasName; -} -- (SSKProtoDataMessageContactName*) name { - return resultContact.name; -} -- (SSKProtoDataMessageContactBuilder*) setName:(SSKProtoDataMessageContactName*) value { - resultContact.hasName = YES; - resultContact.name = value; - return self; -} -- (SSKProtoDataMessageContactBuilder*) setNameBuilder:(SSKProtoDataMessageContactNameBuilder*) builderForValue { - return [self setName:[builderForValue build]]; -} -- (SSKProtoDataMessageContactBuilder*) mergeName:(SSKProtoDataMessageContactName*) value { - if (resultContact.hasName && - resultContact.name != [SSKProtoDataMessageContactName defaultInstance]) { - resultContact.name = - [[[SSKProtoDataMessageContactName builderWithPrototype:resultContact.name] mergeFrom:value] buildPartial]; - } else { - resultContact.name = value; - } - resultContact.hasName = YES; - return self; -} -- (SSKProtoDataMessageContactBuilder*) clearName { - resultContact.hasName = NO; - resultContact.name = [SSKProtoDataMessageContactName defaultInstance]; - return self; -} -- (NSMutableArray *)number { - return resultContact.numberArray; -} -- (SSKProtoDataMessageContactPhone*)numberAtIndex:(NSUInteger)index { - return [resultContact numberAtIndex:index]; -} -- (SSKProtoDataMessageContactBuilder *)addNumber:(SSKProtoDataMessageContactPhone*)value { - if (resultContact.numberArray == nil) { - resultContact.numberArray = [[NSMutableArray alloc]init]; - } - [resultContact.numberArray addObject:value]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)setNumberArray:(NSArray *)array { - resultContact.numberArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)clearNumber { - resultContact.numberArray = nil; - return self; -} -- (NSMutableArray *)email { - return resultContact.emailArray; -} -- (SSKProtoDataMessageContactEmail*)emailAtIndex:(NSUInteger)index { - return [resultContact emailAtIndex:index]; -} -- (SSKProtoDataMessageContactBuilder *)addEmail:(SSKProtoDataMessageContactEmail*)value { - if (resultContact.emailArray == nil) { - resultContact.emailArray = [[NSMutableArray alloc]init]; - } - [resultContact.emailArray addObject:value]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)setEmailArray:(NSArray *)array { - resultContact.emailArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)clearEmail { - resultContact.emailArray = nil; - return self; -} -- (NSMutableArray *)address { - return resultContact.addressArray; -} -- (SSKProtoDataMessageContactPostalAddress*)addressAtIndex:(NSUInteger)index { - return [resultContact addressAtIndex:index]; -} -- (SSKProtoDataMessageContactBuilder *)addAddress:(SSKProtoDataMessageContactPostalAddress*)value { - if (resultContact.addressArray == nil) { - resultContact.addressArray = [[NSMutableArray alloc]init]; - } - [resultContact.addressArray addObject:value]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)setAddressArray:(NSArray *)array { - resultContact.addressArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageContactBuilder *)clearAddress { - resultContact.addressArray = nil; - return self; -} -- (BOOL) hasAvatar { - return resultContact.hasAvatar; -} -- (SSKProtoDataMessageContactAvatar*) avatar { - return resultContact.avatar; -} -- (SSKProtoDataMessageContactBuilder*) setAvatar:(SSKProtoDataMessageContactAvatar*) value { - resultContact.hasAvatar = YES; - resultContact.avatar = value; - return self; -} -- (SSKProtoDataMessageContactBuilder*) setAvatarBuilder:(SSKProtoDataMessageContactAvatarBuilder*) builderForValue { - return [self setAvatar:[builderForValue build]]; -} -- (SSKProtoDataMessageContactBuilder*) mergeAvatar:(SSKProtoDataMessageContactAvatar*) value { - if (resultContact.hasAvatar && - resultContact.avatar != [SSKProtoDataMessageContactAvatar defaultInstance]) { - resultContact.avatar = - [[[SSKProtoDataMessageContactAvatar builderWithPrototype:resultContact.avatar] mergeFrom:value] buildPartial]; - } else { - resultContact.avatar = value; - } - resultContact.hasAvatar = YES; - return self; -} -- (SSKProtoDataMessageContactBuilder*) clearAvatar { - resultContact.hasAvatar = NO; - resultContact.avatar = [SSKProtoDataMessageContactAvatar defaultInstance]; - return self; -} -- (BOOL) hasOrganization { - return resultContact.hasOrganization; -} -- (NSString*) organization { - return resultContact.organization; -} -- (SSKProtoDataMessageContactBuilder*) setOrganization:(NSString*) value { - resultContact.hasOrganization = YES; - resultContact.organization = value; - return self; -} -- (SSKProtoDataMessageContactBuilder*) clearOrganization { - resultContact.hasOrganization = NO; - resultContact.organization = @""; - return self; -} -@end - -@interface SSKProtoDataMessageBuilder() -@property (strong) SSKProtoDataMessage* resultDataMessage; -@end - -@implementation SSKProtoDataMessageBuilder -@synthesize resultDataMessage; -- (instancetype) init { - if ((self = [super init])) { - self.resultDataMessage = [[SSKProtoDataMessage alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultDataMessage; -} -- (SSKProtoDataMessageBuilder*) clear { - self.resultDataMessage = [[SSKProtoDataMessage alloc] init]; - return self; -} -- (SSKProtoDataMessageBuilder*) clone { - return [SSKProtoDataMessage builderWithPrototype:resultDataMessage]; -} -- (SSKProtoDataMessage*) defaultInstance { - return [SSKProtoDataMessage defaultInstance]; -} -- (SSKProtoDataMessage*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoDataMessage*) buildPartial { - SSKProtoDataMessage* returnMe = resultDataMessage; - self.resultDataMessage = nil; - return returnMe; -} -- (SSKProtoDataMessageBuilder*) mergeFrom:(SSKProtoDataMessage*) other { - if (other == [SSKProtoDataMessage defaultInstance]) { - return self; - } - if (other.hasBody) { - [self setBody:other.body]; - } - if (other.attachmentsArray.count > 0) { - if (resultDataMessage.attachmentsArray == nil) { - resultDataMessage.attachmentsArray = [[NSMutableArray alloc] initWithArray:other.attachmentsArray]; - } else { - [resultDataMessage.attachmentsArray addObjectsFromArray:other.attachmentsArray]; - } - } - if (other.hasGroup) { - [self mergeGroup:other.group]; - } - if (other.hasFlags) { - [self setFlags:other.flags]; - } - if (other.hasExpireTimer) { - [self setExpireTimer:other.expireTimer]; - } - if (other.hasProfileKey) { - [self setProfileKey:other.profileKey]; - } - if (other.hasTimestamp) { - [self setTimestamp:other.timestamp]; - } - if (other.hasQuote) { - [self mergeQuote:other.quote]; - } - if (other.contactArray.count > 0) { - if (resultDataMessage.contactArray == nil) { - resultDataMessage.contactArray = [[NSMutableArray alloc] initWithArray:other.contactArray]; - } else { - [resultDataMessage.contactArray addObjectsFromArray:other.contactArray]; - } - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoDataMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoDataMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setBody:[input readString]]; - break; - } - case 18: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addAttachments:[subBuilder buildPartial]]; - break; - } - case 26: { - SSKProtoGroupContextBuilder* subBuilder = [SSKProtoGroupContext builder]; - if (self.hasGroup) { - [subBuilder mergeFrom:self.group]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setGroup:[subBuilder buildPartial]]; - break; - } - case 32: { - [self setFlags:[input readUInt32]]; - break; - } - case 40: { - [self setExpireTimer:[input readUInt32]]; - break; - } - case 50: { - [self setProfileKey:[input readData]]; - break; - } - case 56: { - [self setTimestamp:[input readUInt64]]; - break; - } - case 66: { - SSKProtoDataMessageQuoteBuilder* subBuilder = [SSKProtoDataMessageQuote builder]; - if (self.hasQuote) { - [subBuilder mergeFrom:self.quote]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setQuote:[subBuilder buildPartial]]; - break; - } - case 74: { - SSKProtoDataMessageContactBuilder* subBuilder = [SSKProtoDataMessageContact builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addContact:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasBody { - return resultDataMessage.hasBody; -} -- (NSString*) body { - return resultDataMessage.body; -} -- (SSKProtoDataMessageBuilder*) setBody:(NSString*) value { - resultDataMessage.hasBody = YES; - resultDataMessage.body = value; - return self; -} -- (SSKProtoDataMessageBuilder*) clearBody { - resultDataMessage.hasBody = NO; - resultDataMessage.body = @""; - return self; -} -- (NSMutableArray *)attachments { - return resultDataMessage.attachmentsArray; -} -- (SSKProtoAttachmentPointer*)attachmentsAtIndex:(NSUInteger)index { - return [resultDataMessage attachmentsAtIndex:index]; -} -- (SSKProtoDataMessageBuilder *)addAttachments:(SSKProtoAttachmentPointer*)value { - if (resultDataMessage.attachmentsArray == nil) { - resultDataMessage.attachmentsArray = [[NSMutableArray alloc]init]; - } - [resultDataMessage.attachmentsArray addObject:value]; - return self; -} -- (SSKProtoDataMessageBuilder *)setAttachmentsArray:(NSArray *)array { - resultDataMessage.attachmentsArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageBuilder *)clearAttachments { - resultDataMessage.attachmentsArray = nil; - return self; -} -- (BOOL) hasGroup { - return resultDataMessage.hasGroup; -} -- (SSKProtoGroupContext*) group { - return resultDataMessage.group; -} -- (SSKProtoDataMessageBuilder*) setGroup:(SSKProtoGroupContext*) value { - resultDataMessage.hasGroup = YES; - resultDataMessage.group = value; - return self; -} -- (SSKProtoDataMessageBuilder*) setGroupBuilder:(SSKProtoGroupContextBuilder*) builderForValue { - return [self setGroup:[builderForValue build]]; -} -- (SSKProtoDataMessageBuilder*) mergeGroup:(SSKProtoGroupContext*) value { - if (resultDataMessage.hasGroup && - resultDataMessage.group != [SSKProtoGroupContext defaultInstance]) { - resultDataMessage.group = - [[[SSKProtoGroupContext builderWithPrototype:resultDataMessage.group] mergeFrom:value] buildPartial]; - } else { - resultDataMessage.group = value; - } - resultDataMessage.hasGroup = YES; - return self; -} -- (SSKProtoDataMessageBuilder*) clearGroup { - resultDataMessage.hasGroup = NO; - resultDataMessage.group = [SSKProtoGroupContext defaultInstance]; - return self; -} -- (BOOL) hasFlags { - return resultDataMessage.hasFlags; -} -- (UInt32) flags { - return resultDataMessage.flags; -} -- (SSKProtoDataMessageBuilder*) setFlags:(UInt32) value { - resultDataMessage.hasFlags = YES; - resultDataMessage.flags = value; - return self; -} -- (SSKProtoDataMessageBuilder*) clearFlags { - resultDataMessage.hasFlags = NO; - resultDataMessage.flags = 0; - return self; -} -- (BOOL) hasExpireTimer { - return resultDataMessage.hasExpireTimer; -} -- (UInt32) expireTimer { - return resultDataMessage.expireTimer; -} -- (SSKProtoDataMessageBuilder*) setExpireTimer:(UInt32) value { - resultDataMessage.hasExpireTimer = YES; - resultDataMessage.expireTimer = value; - return self; -} -- (SSKProtoDataMessageBuilder*) clearExpireTimer { - resultDataMessage.hasExpireTimer = NO; - resultDataMessage.expireTimer = 0; - return self; -} -- (BOOL) hasProfileKey { - return resultDataMessage.hasProfileKey; -} -- (NSData*) profileKey { - return resultDataMessage.profileKey; -} -- (SSKProtoDataMessageBuilder*) setProfileKey:(NSData*) value { - resultDataMessage.hasProfileKey = YES; - resultDataMessage.profileKey = value; - return self; -} -- (SSKProtoDataMessageBuilder*) clearProfileKey { - resultDataMessage.hasProfileKey = NO; - resultDataMessage.profileKey = [NSData data]; - return self; -} -- (BOOL) hasTimestamp { - return resultDataMessage.hasTimestamp; -} -- (UInt64) timestamp { - return resultDataMessage.timestamp; -} -- (SSKProtoDataMessageBuilder*) setTimestamp:(UInt64) value { - resultDataMessage.hasTimestamp = YES; - resultDataMessage.timestamp = value; - return self; -} -- (SSKProtoDataMessageBuilder*) clearTimestamp { - resultDataMessage.hasTimestamp = NO; - resultDataMessage.timestamp = 0L; - return self; -} -- (BOOL) hasQuote { - return resultDataMessage.hasQuote; -} -- (SSKProtoDataMessageQuote*) quote { - return resultDataMessage.quote; -} -- (SSKProtoDataMessageBuilder*) setQuote:(SSKProtoDataMessageQuote*) value { - resultDataMessage.hasQuote = YES; - resultDataMessage.quote = value; - return self; -} -- (SSKProtoDataMessageBuilder*) setQuoteBuilder:(SSKProtoDataMessageQuoteBuilder*) builderForValue { - return [self setQuote:[builderForValue build]]; -} -- (SSKProtoDataMessageBuilder*) mergeQuote:(SSKProtoDataMessageQuote*) value { - if (resultDataMessage.hasQuote && - resultDataMessage.quote != [SSKProtoDataMessageQuote defaultInstance]) { - resultDataMessage.quote = - [[[SSKProtoDataMessageQuote builderWithPrototype:resultDataMessage.quote] mergeFrom:value] buildPartial]; - } else { - resultDataMessage.quote = value; - } - resultDataMessage.hasQuote = YES; - return self; -} -- (SSKProtoDataMessageBuilder*) clearQuote { - resultDataMessage.hasQuote = NO; - resultDataMessage.quote = [SSKProtoDataMessageQuote defaultInstance]; - return self; -} -- (NSMutableArray *)contact { - return resultDataMessage.contactArray; -} -- (SSKProtoDataMessageContact*)contactAtIndex:(NSUInteger)index { - return [resultDataMessage contactAtIndex:index]; -} -- (SSKProtoDataMessageBuilder *)addContact:(SSKProtoDataMessageContact*)value { - if (resultDataMessage.contactArray == nil) { - resultDataMessage.contactArray = [[NSMutableArray alloc]init]; - } - [resultDataMessage.contactArray addObject:value]; - return self; -} -- (SSKProtoDataMessageBuilder *)setContactArray:(NSArray *)array { - resultDataMessage.contactArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoDataMessageBuilder *)clearContact { - resultDataMessage.contactArray = nil; - return self; -} -@end - -@interface SSKProtoNullMessage () -@property (strong) NSData* padding; -@end - -@implementation SSKProtoNullMessage - -- (BOOL) hasPadding { - return !!hasPadding_; -} -- (void) setHasPadding:(BOOL) _value_ { - hasPadding_ = !!_value_; -} -@synthesize padding; -- (instancetype) init { - if ((self = [super init])) { - self.padding = [NSData data]; - } - return self; -} -static SSKProtoNullMessage* defaultSSKProtoNullMessageInstance = nil; -+ (void) initialize { - if (self == [SSKProtoNullMessage class]) { - defaultSSKProtoNullMessageInstance = [[SSKProtoNullMessage alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoNullMessageInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoNullMessageInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasPadding) { - [output writeData:1 value:self.padding]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasPadding) { - size_ += computeDataSize(1, self.padding); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoNullMessage*) parseFromData:(NSData*) data { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromData:data] build]; -} -+ (SSKProtoNullMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoNullMessage*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoNullMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoNullMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoNullMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoNullMessage*)[[[SSKProtoNullMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoNullMessageBuilder*) builder { - return [[SSKProtoNullMessageBuilder alloc] init]; -} -+ (SSKProtoNullMessageBuilder*) builderWithPrototype:(SSKProtoNullMessage*) prototype { - return [[SSKProtoNullMessage builder] mergeFrom:prototype]; -} -- (SSKProtoNullMessageBuilder*) builder { - return [SSKProtoNullMessage builder]; -} -- (SSKProtoNullMessageBuilder*) toBuilder { - return [SSKProtoNullMessage builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasPadding) { - [output appendFormat:@"%@%@: %@\n", indent, @"padding", self.padding]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasPadding) { - [dictionary setObject: self.padding forKey: @"padding"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoNullMessage class]]) { - return NO; - } - SSKProtoNullMessage *otherMessage = other; - return - self.hasPadding == otherMessage.hasPadding && - (!self.hasPadding || [self.padding isEqual:otherMessage.padding]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasPadding) { - hashCode = hashCode * 31 + [self.padding hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoNullMessageBuilder() -@property (strong) SSKProtoNullMessage* resultNullMessage; -@end - -@implementation SSKProtoNullMessageBuilder -@synthesize resultNullMessage; -- (instancetype) init { - if ((self = [super init])) { - self.resultNullMessage = [[SSKProtoNullMessage alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultNullMessage; -} -- (SSKProtoNullMessageBuilder*) clear { - self.resultNullMessage = [[SSKProtoNullMessage alloc] init]; - return self; -} -- (SSKProtoNullMessageBuilder*) clone { - return [SSKProtoNullMessage builderWithPrototype:resultNullMessage]; -} -- (SSKProtoNullMessage*) defaultInstance { - return [SSKProtoNullMessage defaultInstance]; -} -- (SSKProtoNullMessage*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoNullMessage*) buildPartial { - SSKProtoNullMessage* returnMe = resultNullMessage; - self.resultNullMessage = nil; - return returnMe; -} -- (SSKProtoNullMessageBuilder*) mergeFrom:(SSKProtoNullMessage*) other { - if (other == [SSKProtoNullMessage defaultInstance]) { - return self; - } - if (other.hasPadding) { - [self setPadding:other.padding]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoNullMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoNullMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setPadding:[input readData]]; - break; - } - } - } -} -- (BOOL) hasPadding { - return resultNullMessage.hasPadding; -} -- (NSData*) padding { - return resultNullMessage.padding; -} -- (SSKProtoNullMessageBuilder*) setPadding:(NSData*) value { - resultNullMessage.hasPadding = YES; - resultNullMessage.padding = value; - return self; -} -- (SSKProtoNullMessageBuilder*) clearPadding { - resultNullMessage.hasPadding = NO; - resultNullMessage.padding = [NSData data]; - return self; -} -@end - -@interface SSKProtoReceiptMessage () -@property SSKProtoReceiptMessageType type; -@property (strong) PBAppendableArray * timestampArray; -@end - -@implementation SSKProtoReceiptMessage - -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -@synthesize timestampArray; -@dynamic timestamp; -- (instancetype) init { - if ((self = [super init])) { - self.type = SSKProtoReceiptMessageTypeDelivery; - } - return self; -} -static SSKProtoReceiptMessage* defaultSSKProtoReceiptMessageInstance = nil; -+ (void) initialize { - if (self == [SSKProtoReceiptMessage class]) { - defaultSSKProtoReceiptMessageInstance = [[SSKProtoReceiptMessage alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoReceiptMessageInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoReceiptMessageInstance; -} -- (PBArray *)timestamp { - return timestampArray; -} -- (UInt64)timestampAtIndex:(NSUInteger)index { - return [timestampArray uint64AtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasType) { - [output writeEnum:1 value:self.type]; - } - const NSUInteger timestampArrayCount = self.timestampArray.count; - if (timestampArrayCount > 0) { - const UInt64 *values = (const UInt64 *)self.timestampArray.data; - for (NSUInteger i = 0; i < timestampArrayCount; ++i) { - [output writeUInt64:2 value:values[i]]; - } - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasType) { - size_ += computeEnumSize(1, self.type); - } - { - __block SInt32 dataSize = 0; - const NSUInteger count = self.timestampArray.count; - const UInt64 *values = (const UInt64 *)self.timestampArray.data; - for (NSUInteger i = 0; i < count; ++i) { - dataSize += computeUInt64SizeNoTag(values[i]); - } - size_ += dataSize; - size_ += (SInt32)(1 * count); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoReceiptMessage*) parseFromData:(NSData*) data { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromData:data] build]; -} -+ (SSKProtoReceiptMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoReceiptMessage*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoReceiptMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoReceiptMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoReceiptMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoReceiptMessage*)[[[SSKProtoReceiptMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoReceiptMessageBuilder*) builder { - return [[SSKProtoReceiptMessageBuilder alloc] init]; -} -+ (SSKProtoReceiptMessageBuilder*) builderWithPrototype:(SSKProtoReceiptMessage*) prototype { - return [[SSKProtoReceiptMessage builder] mergeFrom:prototype]; -} -- (SSKProtoReceiptMessageBuilder*) builder { - return [SSKProtoReceiptMessage builder]; -} -- (SSKProtoReceiptMessageBuilder*) toBuilder { - return [SSKProtoReceiptMessage builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoReceiptMessageType(self.type)]; - } - [self.timestampArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@: %@\n", indent, @"timestamp", obj]; - }]; - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - NSMutableArray * timestampArrayArray = [NSMutableArray new]; - NSUInteger timestampArrayCount=self.timestampArray.count; - for(int i=0;i 0) { - if (resultReceiptMessage.timestampArray == nil) { - resultReceiptMessage.timestampArray = [other.timestampArray copy]; - } else { - [resultReceiptMessage.timestampArray appendArray:other.timestampArray]; - } - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoReceiptMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoReceiptMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - SSKProtoReceiptMessageType value = (SSKProtoReceiptMessageType)[input readEnum]; - if (SSKProtoReceiptMessageTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - case 16: { - [self addTimestamp:[input readUInt64]]; - break; - } - } - } -} -- (BOOL) hasType { - return resultReceiptMessage.hasType; -} -- (SSKProtoReceiptMessageType) type { - return resultReceiptMessage.type; -} -- (SSKProtoReceiptMessageBuilder*) setType:(SSKProtoReceiptMessageType) value { - resultReceiptMessage.hasType = YES; - resultReceiptMessage.type = value; - return self; -} -- (SSKProtoReceiptMessageBuilder*) clearType { - resultReceiptMessage.hasType = NO; - resultReceiptMessage.type = SSKProtoReceiptMessageTypeDelivery; - return self; -} -- (PBAppendableArray *)timestamp { - return resultReceiptMessage.timestampArray; -} -- (UInt64)timestampAtIndex:(NSUInteger)index { - return [resultReceiptMessage timestampAtIndex:index]; -} -- (SSKProtoReceiptMessageBuilder *)addTimestamp:(UInt64)value { - if (resultReceiptMessage.timestampArray == nil) { - resultReceiptMessage.timestampArray = [PBAppendableArray arrayWithValueType:PBArrayValueTypeUInt64]; - } - [resultReceiptMessage.timestampArray addUint64:value]; - return self; -} -- (SSKProtoReceiptMessageBuilder *)setTimestampArray:(NSArray *)array { - resultReceiptMessage.timestampArray = [PBAppendableArray arrayWithArray:array valueType:PBArrayValueTypeUInt64]; - return self; -} -- (SSKProtoReceiptMessageBuilder *)setTimestampValues:(const UInt64 *)values count:(NSUInteger)count { - resultReceiptMessage.timestampArray = [PBAppendableArray arrayWithValues:values count:count valueType:PBArrayValueTypeUInt64]; - return self; -} -- (SSKProtoReceiptMessageBuilder *)clearTimestamp { - resultReceiptMessage.timestampArray = nil; - return self; -} -@end - -@interface SSKProtoVerified () -@property (strong) NSString* destination; -@property (strong) NSData* identityKey; -@property SSKProtoVerifiedState state; -@property (strong) NSData* nullMessage; -@end - -@implementation SSKProtoVerified - -- (BOOL) hasDestination { - return !!hasDestination_; -} -- (void) setHasDestination:(BOOL) _value_ { - hasDestination_ = !!_value_; -} -@synthesize destination; -- (BOOL) hasIdentityKey { - return !!hasIdentityKey_; -} -- (void) setHasIdentityKey:(BOOL) _value_ { - hasIdentityKey_ = !!_value_; -} -@synthesize identityKey; -- (BOOL) hasState { - return !!hasState_; -} -- (void) setHasState:(BOOL) _value_ { - hasState_ = !!_value_; -} -@synthesize state; -- (BOOL) hasNullMessage { - return !!hasNullMessage_; -} -- (void) setHasNullMessage:(BOOL) _value_ { - hasNullMessage_ = !!_value_; -} -@synthesize nullMessage; -- (instancetype) init { - if ((self = [super init])) { - self.destination = @""; - self.identityKey = [NSData data]; - self.state = SSKProtoVerifiedStateDefault; - self.nullMessage = [NSData data]; - } - return self; -} -static SSKProtoVerified* defaultSSKProtoVerifiedInstance = nil; -+ (void) initialize { - if (self == [SSKProtoVerified class]) { - defaultSSKProtoVerifiedInstance = [[SSKProtoVerified alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoVerifiedInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoVerifiedInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasDestination) { - [output writeString:1 value:self.destination]; - } - if (self.hasIdentityKey) { - [output writeData:2 value:self.identityKey]; - } - if (self.hasState) { - [output writeEnum:3 value:self.state]; - } - if (self.hasNullMessage) { - [output writeData:4 value:self.nullMessage]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasDestination) { - size_ += computeStringSize(1, self.destination); - } - if (self.hasIdentityKey) { - size_ += computeDataSize(2, self.identityKey); - } - if (self.hasState) { - size_ += computeEnumSize(3, self.state); - } - if (self.hasNullMessage) { - size_ += computeDataSize(4, self.nullMessage); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoVerified*) parseFromData:(NSData*) data { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromData:data] build]; -} -+ (SSKProtoVerified*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoVerified*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoVerified*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoVerified*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoVerified*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoVerified*)[[[SSKProtoVerified builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoVerifiedBuilder*) builder { - return [[SSKProtoVerifiedBuilder alloc] init]; -} -+ (SSKProtoVerifiedBuilder*) builderWithPrototype:(SSKProtoVerified*) prototype { - return [[SSKProtoVerified builder] mergeFrom:prototype]; -} -- (SSKProtoVerifiedBuilder*) builder { - return [SSKProtoVerified builder]; -} -- (SSKProtoVerifiedBuilder*) toBuilder { - return [SSKProtoVerified builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasDestination) { - [output appendFormat:@"%@%@: %@\n", indent, @"destination", self.destination]; - } - if (self.hasIdentityKey) { - [output appendFormat:@"%@%@: %@\n", indent, @"identityKey", self.identityKey]; - } - if (self.hasState) { - [output appendFormat:@"%@%@: %@\n", indent, @"state", NSStringFromSSKProtoVerifiedState(self.state)]; - } - if (self.hasNullMessage) { - [output appendFormat:@"%@%@: %@\n", indent, @"nullMessage", self.nullMessage]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasDestination) { - [dictionary setObject: self.destination forKey: @"destination"]; - } - if (self.hasIdentityKey) { - [dictionary setObject: self.identityKey forKey: @"identityKey"]; - } - if (self.hasState) { - [dictionary setObject: @(self.state) forKey: @"state"]; - } - if (self.hasNullMessage) { - [dictionary setObject: self.nullMessage forKey: @"nullMessage"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoVerified class]]) { - return NO; - } - SSKProtoVerified *otherMessage = other; - return - self.hasDestination == otherMessage.hasDestination && - (!self.hasDestination || [self.destination isEqual:otherMessage.destination]) && - self.hasIdentityKey == otherMessage.hasIdentityKey && - (!self.hasIdentityKey || [self.identityKey isEqual:otherMessage.identityKey]) && - self.hasState == otherMessage.hasState && - (!self.hasState || self.state == otherMessage.state) && - self.hasNullMessage == otherMessage.hasNullMessage && - (!self.hasNullMessage || [self.nullMessage isEqual:otherMessage.nullMessage]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasDestination) { - hashCode = hashCode * 31 + [self.destination hash]; - } - if (self.hasIdentityKey) { - hashCode = hashCode * 31 + [self.identityKey hash]; - } - if (self.hasState) { - hashCode = hashCode * 31 + self.state; - } - if (self.hasNullMessage) { - hashCode = hashCode * 31 + [self.nullMessage hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoVerifiedStateIsValidValue(SSKProtoVerifiedState value) { - switch (value) { - case SSKProtoVerifiedStateDefault: - case SSKProtoVerifiedStateVerified: - case SSKProtoVerifiedStateUnverified: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoVerifiedState(SSKProtoVerifiedState value) { - switch (value) { - case SSKProtoVerifiedStateDefault: - return @"SSKProtoVerifiedStateDefault"; - case SSKProtoVerifiedStateVerified: - return @"SSKProtoVerifiedStateVerified"; - case SSKProtoVerifiedStateUnverified: - return @"SSKProtoVerifiedStateUnverified"; - default: - return nil; - } -} - -@interface SSKProtoVerifiedBuilder() -@property (strong) SSKProtoVerified* resultVerified; -@end - -@implementation SSKProtoVerifiedBuilder -@synthesize resultVerified; -- (instancetype) init { - if ((self = [super init])) { - self.resultVerified = [[SSKProtoVerified alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultVerified; -} -- (SSKProtoVerifiedBuilder*) clear { - self.resultVerified = [[SSKProtoVerified alloc] init]; - return self; -} -- (SSKProtoVerifiedBuilder*) clone { - return [SSKProtoVerified builderWithPrototype:resultVerified]; -} -- (SSKProtoVerified*) defaultInstance { - return [SSKProtoVerified defaultInstance]; -} -- (SSKProtoVerified*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoVerified*) buildPartial { - SSKProtoVerified* returnMe = resultVerified; - self.resultVerified = nil; - return returnMe; -} -- (SSKProtoVerifiedBuilder*) mergeFrom:(SSKProtoVerified*) other { - if (other == [SSKProtoVerified defaultInstance]) { - return self; - } - if (other.hasDestination) { - [self setDestination:other.destination]; - } - if (other.hasIdentityKey) { - [self setIdentityKey:other.identityKey]; - } - if (other.hasState) { - [self setState:other.state]; - } - if (other.hasNullMessage) { - [self setNullMessage:other.nullMessage]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoVerifiedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoVerifiedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setDestination:[input readString]]; - break; - } - case 18: { - [self setIdentityKey:[input readData]]; - break; - } - case 24: { - SSKProtoVerifiedState value = (SSKProtoVerifiedState)[input readEnum]; - if (SSKProtoVerifiedStateIsValidValue(value)) { - [self setState:value]; - } else { - [unknownFields mergeVarintField:3 value:value]; - } - break; - } - case 34: { - [self setNullMessage:[input readData]]; - break; - } - } - } -} -- (BOOL) hasDestination { - return resultVerified.hasDestination; -} -- (NSString*) destination { - return resultVerified.destination; -} -- (SSKProtoVerifiedBuilder*) setDestination:(NSString*) value { - resultVerified.hasDestination = YES; - resultVerified.destination = value; - return self; -} -- (SSKProtoVerifiedBuilder*) clearDestination { - resultVerified.hasDestination = NO; - resultVerified.destination = @""; - return self; -} -- (BOOL) hasIdentityKey { - return resultVerified.hasIdentityKey; -} -- (NSData*) identityKey { - return resultVerified.identityKey; -} -- (SSKProtoVerifiedBuilder*) setIdentityKey:(NSData*) value { - resultVerified.hasIdentityKey = YES; - resultVerified.identityKey = value; - return self; -} -- (SSKProtoVerifiedBuilder*) clearIdentityKey { - resultVerified.hasIdentityKey = NO; - resultVerified.identityKey = [NSData data]; - return self; -} -- (BOOL) hasState { - return resultVerified.hasState; -} -- (SSKProtoVerifiedState) state { - return resultVerified.state; -} -- (SSKProtoVerifiedBuilder*) setState:(SSKProtoVerifiedState) value { - resultVerified.hasState = YES; - resultVerified.state = value; - return self; -} -- (SSKProtoVerifiedBuilder*) clearState { - resultVerified.hasState = NO; - resultVerified.state = SSKProtoVerifiedStateDefault; - return self; -} -- (BOOL) hasNullMessage { - return resultVerified.hasNullMessage; -} -- (NSData*) nullMessage { - return resultVerified.nullMessage; -} -- (SSKProtoVerifiedBuilder*) setNullMessage:(NSData*) value { - resultVerified.hasNullMessage = YES; - resultVerified.nullMessage = value; - return self; -} -- (SSKProtoVerifiedBuilder*) clearNullMessage { - resultVerified.hasNullMessage = NO; - resultVerified.nullMessage = [NSData data]; - return self; -} -@end - -@interface SSKProtoSyncMessage () -@property (strong) SSKProtoSyncMessageSent* sent; -@property (strong) SSKProtoSyncMessageContacts* contacts; -@property (strong) SSKProtoSyncMessageGroups* groups; -@property (strong) SSKProtoSyncMessageRequest* request; -@property (strong) NSMutableArray * readArray; -@property (strong) SSKProtoSyncMessageBlocked* blocked; -@property (strong) SSKProtoVerified* verified; -@property (strong) SSKProtoSyncMessageConfiguration* configuration; -@property (strong) NSData* padding; -@end - -@implementation SSKProtoSyncMessage - -- (BOOL) hasSent { - return !!hasSent_; -} -- (void) setHasSent:(BOOL) _value_ { - hasSent_ = !!_value_; -} -@synthesize sent; -- (BOOL) hasContacts { - return !!hasContacts_; -} -- (void) setHasContacts:(BOOL) _value_ { - hasContacts_ = !!_value_; -} -@synthesize contacts; -- (BOOL) hasGroups { - return !!hasGroups_; -} -- (void) setHasGroups:(BOOL) _value_ { - hasGroups_ = !!_value_; -} -@synthesize groups; -- (BOOL) hasRequest { - return !!hasRequest_; -} -- (void) setHasRequest:(BOOL) _value_ { - hasRequest_ = !!_value_; -} -@synthesize request; -@synthesize readArray; -@dynamic read; -- (BOOL) hasBlocked { - return !!hasBlocked_; -} -- (void) setHasBlocked:(BOOL) _value_ { - hasBlocked_ = !!_value_; -} -@synthesize blocked; -- (BOOL) hasVerified { - return !!hasVerified_; -} -- (void) setHasVerified:(BOOL) _value_ { - hasVerified_ = !!_value_; -} -@synthesize verified; -- (BOOL) hasConfiguration { - return !!hasConfiguration_; -} -- (void) setHasConfiguration:(BOOL) _value_ { - hasConfiguration_ = !!_value_; -} -@synthesize configuration; -- (BOOL) hasPadding { - return !!hasPadding_; -} -- (void) setHasPadding:(BOOL) _value_ { - hasPadding_ = !!_value_; -} -@synthesize padding; -- (instancetype) init { - if ((self = [super init])) { - self.sent = [SSKProtoSyncMessageSent defaultInstance]; - self.contacts = [SSKProtoSyncMessageContacts defaultInstance]; - self.groups = [SSKProtoSyncMessageGroups defaultInstance]; - self.request = [SSKProtoSyncMessageRequest defaultInstance]; - self.blocked = [SSKProtoSyncMessageBlocked defaultInstance]; - self.verified = [SSKProtoVerified defaultInstance]; - self.configuration = [SSKProtoSyncMessageConfiguration defaultInstance]; - self.padding = [NSData data]; - } - return self; -} -static SSKProtoSyncMessage* defaultSSKProtoSyncMessageInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessage class]) { - defaultSSKProtoSyncMessageInstance = [[SSKProtoSyncMessage alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageInstance; -} -- (NSArray *)read { - return readArray; -} -- (SSKProtoSyncMessageRead*)readAtIndex:(NSUInteger)index { - return [readArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasSent) { - [output writeMessage:1 value:self.sent]; - } - if (self.hasContacts) { - [output writeMessage:2 value:self.contacts]; - } - if (self.hasGroups) { - [output writeMessage:3 value:self.groups]; - } - if (self.hasRequest) { - [output writeMessage:4 value:self.request]; - } - [self.readArray enumerateObjectsUsingBlock:^(SSKProtoSyncMessageRead *element, NSUInteger idx, BOOL *stop) { - [output writeMessage:5 value:element]; - }]; - if (self.hasBlocked) { - [output writeMessage:6 value:self.blocked]; - } - if (self.hasVerified) { - [output writeMessage:7 value:self.verified]; - } - if (self.hasPadding) { - [output writeData:8 value:self.padding]; - } - if (self.hasConfiguration) { - [output writeMessage:9 value:self.configuration]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasSent) { - size_ += computeMessageSize(1, self.sent); - } - if (self.hasContacts) { - size_ += computeMessageSize(2, self.contacts); - } - if (self.hasGroups) { - size_ += computeMessageSize(3, self.groups); - } - if (self.hasRequest) { - size_ += computeMessageSize(4, self.request); - } - [self.readArray enumerateObjectsUsingBlock:^(SSKProtoSyncMessageRead *element, NSUInteger idx, BOOL *stop) { - size_ += computeMessageSize(5, element); - }]; - if (self.hasBlocked) { - size_ += computeMessageSize(6, self.blocked); - } - if (self.hasVerified) { - size_ += computeMessageSize(7, self.verified); - } - if (self.hasPadding) { - size_ += computeDataSize(8, self.padding); - } - if (self.hasConfiguration) { - size_ += computeMessageSize(9, self.configuration); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessage*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessage*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessage*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessage*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessage*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessage*)[[[SSKProtoSyncMessage builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageBuilder*) builder { - return [[SSKProtoSyncMessageBuilder alloc] init]; -} -+ (SSKProtoSyncMessageBuilder*) builderWithPrototype:(SSKProtoSyncMessage*) prototype { - return [[SSKProtoSyncMessage builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageBuilder*) builder { - return [SSKProtoSyncMessage builder]; -} -- (SSKProtoSyncMessageBuilder*) toBuilder { - return [SSKProtoSyncMessage builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasSent) { - [output appendFormat:@"%@%@ {\n", indent, @"sent"]; - [self.sent writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasContacts) { - [output appendFormat:@"%@%@ {\n", indent, @"contacts"]; - [self.contacts writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasGroups) { - [output appendFormat:@"%@%@ {\n", indent, @"groups"]; - [self.groups writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasRequest) { - [output appendFormat:@"%@%@ {\n", indent, @"request"]; - [self.request writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.readArray enumerateObjectsUsingBlock:^(SSKProtoSyncMessageRead *element, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@ {\n", indent, @"read"]; - [element writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - }]; - if (self.hasBlocked) { - [output appendFormat:@"%@%@ {\n", indent, @"blocked"]; - [self.blocked writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasVerified) { - [output appendFormat:@"%@%@ {\n", indent, @"verified"]; - [self.verified writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasPadding) { - [output appendFormat:@"%@%@: %@\n", indent, @"padding", self.padding]; - } - if (self.hasConfiguration) { - [output appendFormat:@"%@%@ {\n", indent, @"configuration"]; - [self.configuration writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasSent) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.sent storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"sent"]; - } - if (self.hasContacts) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.contacts storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"contacts"]; - } - if (self.hasGroups) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.groups storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"groups"]; - } - if (self.hasRequest) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.request storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"request"]; - } - for (SSKProtoSyncMessageRead* element in self.readArray) { - NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary]; - [element storeInDictionary:elementDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"read"]; - } - if (self.hasBlocked) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.blocked storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"blocked"]; - } - if (self.hasVerified) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.verified storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"verified"]; - } - if (self.hasPadding) { - [dictionary setObject: self.padding forKey: @"padding"]; - } - if (self.hasConfiguration) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.configuration storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"configuration"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessage class]]) { - return NO; - } - SSKProtoSyncMessage *otherMessage = other; - return - self.hasSent == otherMessage.hasSent && - (!self.hasSent || [self.sent isEqual:otherMessage.sent]) && - self.hasContacts == otherMessage.hasContacts && - (!self.hasContacts || [self.contacts isEqual:otherMessage.contacts]) && - self.hasGroups == otherMessage.hasGroups && - (!self.hasGroups || [self.groups isEqual:otherMessage.groups]) && - self.hasRequest == otherMessage.hasRequest && - (!self.hasRequest || [self.request isEqual:otherMessage.request]) && - [self.readArray isEqualToArray:otherMessage.readArray] && - self.hasBlocked == otherMessage.hasBlocked && - (!self.hasBlocked || [self.blocked isEqual:otherMessage.blocked]) && - self.hasVerified == otherMessage.hasVerified && - (!self.hasVerified || [self.verified isEqual:otherMessage.verified]) && - self.hasPadding == otherMessage.hasPadding && - (!self.hasPadding || [self.padding isEqual:otherMessage.padding]) && - self.hasConfiguration == otherMessage.hasConfiguration && - (!self.hasConfiguration || [self.configuration isEqual:otherMessage.configuration]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasSent) { - hashCode = hashCode * 31 + [self.sent hash]; - } - if (self.hasContacts) { - hashCode = hashCode * 31 + [self.contacts hash]; - } - if (self.hasGroups) { - hashCode = hashCode * 31 + [self.groups hash]; - } - if (self.hasRequest) { - hashCode = hashCode * 31 + [self.request hash]; - } - [self.readArray enumerateObjectsUsingBlock:^(SSKProtoSyncMessageRead *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasBlocked) { - hashCode = hashCode * 31 + [self.blocked hash]; - } - if (self.hasVerified) { - hashCode = hashCode * 31 + [self.verified hash]; - } - if (self.hasPadding) { - hashCode = hashCode * 31 + [self.padding hash]; - } - if (self.hasConfiguration) { - hashCode = hashCode * 31 + [self.configuration hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageSent () -@property (strong) NSString* destination; -@property UInt64 timestamp; -@property (strong) SSKProtoDataMessage* message; -@property UInt64 expirationStartTimestamp; -@end - -@implementation SSKProtoSyncMessageSent - -- (BOOL) hasDestination { - return !!hasDestination_; -} -- (void) setHasDestination:(BOOL) _value_ { - hasDestination_ = !!_value_; -} -@synthesize destination; -- (BOOL) hasTimestamp { - return !!hasTimestamp_; -} -- (void) setHasTimestamp:(BOOL) _value_ { - hasTimestamp_ = !!_value_; -} -@synthesize timestamp; -- (BOOL) hasMessage { - return !!hasMessage_; -} -- (void) setHasMessage:(BOOL) _value_ { - hasMessage_ = !!_value_; -} -@synthesize message; -- (BOOL) hasExpirationStartTimestamp { - return !!hasExpirationStartTimestamp_; -} -- (void) setHasExpirationStartTimestamp:(BOOL) _value_ { - hasExpirationStartTimestamp_ = !!_value_; -} -@synthesize expirationStartTimestamp; -- (instancetype) init { - if ((self = [super init])) { - self.destination = @""; - self.timestamp = 0L; - self.message = [SSKProtoDataMessage defaultInstance]; - self.expirationStartTimestamp = 0L; - } - return self; -} -static SSKProtoSyncMessageSent* defaultSSKProtoSyncMessageSentInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageSent class]) { - defaultSSKProtoSyncMessageSentInstance = [[SSKProtoSyncMessageSent alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageSentInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageSentInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasDestination) { - [output writeString:1 value:self.destination]; - } - if (self.hasTimestamp) { - [output writeUInt64:2 value:self.timestamp]; - } - if (self.hasMessage) { - [output writeMessage:3 value:self.message]; - } - if (self.hasExpirationStartTimestamp) { - [output writeUInt64:4 value:self.expirationStartTimestamp]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasDestination) { - size_ += computeStringSize(1, self.destination); - } - if (self.hasTimestamp) { - size_ += computeUInt64Size(2, self.timestamp); - } - if (self.hasMessage) { - size_ += computeMessageSize(3, self.message); - } - if (self.hasExpirationStartTimestamp) { - size_ += computeUInt64Size(4, self.expirationStartTimestamp); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageSent*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageSent*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageSent*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageSent*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageSent*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageSent*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageSent*)[[[SSKProtoSyncMessageSent builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageSentBuilder*) builder { - return [[SSKProtoSyncMessageSentBuilder alloc] init]; -} -+ (SSKProtoSyncMessageSentBuilder*) builderWithPrototype:(SSKProtoSyncMessageSent*) prototype { - return [[SSKProtoSyncMessageSent builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageSentBuilder*) builder { - return [SSKProtoSyncMessageSent builder]; -} -- (SSKProtoSyncMessageSentBuilder*) toBuilder { - return [SSKProtoSyncMessageSent builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasDestination) { - [output appendFormat:@"%@%@: %@\n", indent, @"destination", self.destination]; - } - if (self.hasTimestamp) { - [output appendFormat:@"%@%@: %@\n", indent, @"timestamp", [NSNumber numberWithLongLong:self.timestamp]]; - } - if (self.hasMessage) { - [output appendFormat:@"%@%@ {\n", indent, @"message"]; - [self.message writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasExpirationStartTimestamp) { - [output appendFormat:@"%@%@: %@\n", indent, @"expirationStartTimestamp", [NSNumber numberWithLongLong:self.expirationStartTimestamp]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasDestination) { - [dictionary setObject: self.destination forKey: @"destination"]; - } - if (self.hasTimestamp) { - [dictionary setObject: [NSNumber numberWithLongLong:self.timestamp] forKey: @"timestamp"]; - } - if (self.hasMessage) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.message storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"message"]; - } - if (self.hasExpirationStartTimestamp) { - [dictionary setObject: [NSNumber numberWithLongLong:self.expirationStartTimestamp] forKey: @"expirationStartTimestamp"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageSent class]]) { - return NO; - } - SSKProtoSyncMessageSent *otherMessage = other; - return - self.hasDestination == otherMessage.hasDestination && - (!self.hasDestination || [self.destination isEqual:otherMessage.destination]) && - self.hasTimestamp == otherMessage.hasTimestamp && - (!self.hasTimestamp || self.timestamp == otherMessage.timestamp) && - self.hasMessage == otherMessage.hasMessage && - (!self.hasMessage || [self.message isEqual:otherMessage.message]) && - self.hasExpirationStartTimestamp == otherMessage.hasExpirationStartTimestamp && - (!self.hasExpirationStartTimestamp || self.expirationStartTimestamp == otherMessage.expirationStartTimestamp) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasDestination) { - hashCode = hashCode * 31 + [self.destination hash]; - } - if (self.hasTimestamp) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestamp] hash]; - } - if (self.hasMessage) { - hashCode = hashCode * 31 + [self.message hash]; - } - if (self.hasExpirationStartTimestamp) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.expirationStartTimestamp] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageSentBuilder() -@property (strong) SSKProtoSyncMessageSent* resultSent; -@end - -@implementation SSKProtoSyncMessageSentBuilder -@synthesize resultSent; -- (instancetype) init { - if ((self = [super init])) { - self.resultSent = [[SSKProtoSyncMessageSent alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultSent; -} -- (SSKProtoSyncMessageSentBuilder*) clear { - self.resultSent = [[SSKProtoSyncMessageSent alloc] init]; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) clone { - return [SSKProtoSyncMessageSent builderWithPrototype:resultSent]; -} -- (SSKProtoSyncMessageSent*) defaultInstance { - return [SSKProtoSyncMessageSent defaultInstance]; -} -- (SSKProtoSyncMessageSent*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageSent*) buildPartial { - SSKProtoSyncMessageSent* returnMe = resultSent; - self.resultSent = nil; - return returnMe; -} -- (SSKProtoSyncMessageSentBuilder*) mergeFrom:(SSKProtoSyncMessageSent*) other { - if (other == [SSKProtoSyncMessageSent defaultInstance]) { - return self; - } - if (other.hasDestination) { - [self setDestination:other.destination]; - } - if (other.hasTimestamp) { - [self setTimestamp:other.timestamp]; - } - if (other.hasMessage) { - [self mergeMessage:other.message]; - } - if (other.hasExpirationStartTimestamp) { - [self setExpirationStartTimestamp:other.expirationStartTimestamp]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageSentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setDestination:[input readString]]; - break; - } - case 16: { - [self setTimestamp:[input readUInt64]]; - break; - } - case 26: { - SSKProtoDataMessageBuilder* subBuilder = [SSKProtoDataMessage builder]; - if (self.hasMessage) { - [subBuilder mergeFrom:self.message]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setMessage:[subBuilder buildPartial]]; - break; - } - case 32: { - [self setExpirationStartTimestamp:[input readUInt64]]; - break; - } - } - } -} -- (BOOL) hasDestination { - return resultSent.hasDestination; -} -- (NSString*) destination { - return resultSent.destination; -} -- (SSKProtoSyncMessageSentBuilder*) setDestination:(NSString*) value { - resultSent.hasDestination = YES; - resultSent.destination = value; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) clearDestination { - resultSent.hasDestination = NO; - resultSent.destination = @""; - return self; -} -- (BOOL) hasTimestamp { - return resultSent.hasTimestamp; -} -- (UInt64) timestamp { - return resultSent.timestamp; -} -- (SSKProtoSyncMessageSentBuilder*) setTimestamp:(UInt64) value { - resultSent.hasTimestamp = YES; - resultSent.timestamp = value; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) clearTimestamp { - resultSent.hasTimestamp = NO; - resultSent.timestamp = 0L; - return self; -} -- (BOOL) hasMessage { - return resultSent.hasMessage; -} -- (SSKProtoDataMessage*) message { - return resultSent.message; -} -- (SSKProtoSyncMessageSentBuilder*) setMessage:(SSKProtoDataMessage*) value { - resultSent.hasMessage = YES; - resultSent.message = value; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) setMessageBuilder:(SSKProtoDataMessageBuilder*) builderForValue { - return [self setMessage:[builderForValue build]]; -} -- (SSKProtoSyncMessageSentBuilder*) mergeMessage:(SSKProtoDataMessage*) value { - if (resultSent.hasMessage && - resultSent.message != [SSKProtoDataMessage defaultInstance]) { - resultSent.message = - [[[SSKProtoDataMessage builderWithPrototype:resultSent.message] mergeFrom:value] buildPartial]; - } else { - resultSent.message = value; - } - resultSent.hasMessage = YES; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) clearMessage { - resultSent.hasMessage = NO; - resultSent.message = [SSKProtoDataMessage defaultInstance]; - return self; -} -- (BOOL) hasExpirationStartTimestamp { - return resultSent.hasExpirationStartTimestamp; -} -- (UInt64) expirationStartTimestamp { - return resultSent.expirationStartTimestamp; -} -- (SSKProtoSyncMessageSentBuilder*) setExpirationStartTimestamp:(UInt64) value { - resultSent.hasExpirationStartTimestamp = YES; - resultSent.expirationStartTimestamp = value; - return self; -} -- (SSKProtoSyncMessageSentBuilder*) clearExpirationStartTimestamp { - resultSent.hasExpirationStartTimestamp = NO; - resultSent.expirationStartTimestamp = 0L; - return self; -} -@end - -@interface SSKProtoSyncMessageContacts () -@property (strong) SSKProtoAttachmentPointer* blob; -@property BOOL isComplete; -@end - -@implementation SSKProtoSyncMessageContacts - -- (BOOL) hasBlob { - return !!hasBlob_; -} -- (void) setHasBlob:(BOOL) _value_ { - hasBlob_ = !!_value_; -} -@synthesize blob; -- (BOOL) hasIsComplete { - return !!hasIsComplete_; -} -- (void) setHasIsComplete:(BOOL) _value_ { - hasIsComplete_ = !!_value_; -} -- (BOOL) isComplete { - return !!isComplete_; -} -- (void) setIsComplete:(BOOL) _value_ { - isComplete_ = !!_value_; -} -- (instancetype) init { - if ((self = [super init])) { - self.blob = [SSKProtoAttachmentPointer defaultInstance]; - self.isComplete = NO; - } - return self; -} -static SSKProtoSyncMessageContacts* defaultSSKProtoSyncMessageContactsInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageContacts class]) { - defaultSSKProtoSyncMessageContactsInstance = [[SSKProtoSyncMessageContacts alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageContactsInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageContactsInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasBlob) { - [output writeMessage:1 value:self.blob]; - } - if (self.hasIsComplete) { - [output writeBool:2 value:self.isComplete]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasBlob) { - size_ += computeMessageSize(1, self.blob); - } - if (self.hasIsComplete) { - size_ += computeBoolSize(2, self.isComplete); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageContacts*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageContacts*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageContacts*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageContacts*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageContacts*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageContacts*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageContacts*)[[[SSKProtoSyncMessageContacts builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageContactsBuilder*) builder { - return [[SSKProtoSyncMessageContactsBuilder alloc] init]; -} -+ (SSKProtoSyncMessageContactsBuilder*) builderWithPrototype:(SSKProtoSyncMessageContacts*) prototype { - return [[SSKProtoSyncMessageContacts builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageContactsBuilder*) builder { - return [SSKProtoSyncMessageContacts builder]; -} -- (SSKProtoSyncMessageContactsBuilder*) toBuilder { - return [SSKProtoSyncMessageContacts builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasBlob) { - [output appendFormat:@"%@%@ {\n", indent, @"blob"]; - [self.blob writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasIsComplete) { - [output appendFormat:@"%@%@: %@\n", indent, @"isComplete", [NSNumber numberWithBool:self.isComplete]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasBlob) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.blob storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"blob"]; - } - if (self.hasIsComplete) { - [dictionary setObject: [NSNumber numberWithBool:self.isComplete] forKey: @"isComplete"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageContacts class]]) { - return NO; - } - SSKProtoSyncMessageContacts *otherMessage = other; - return - self.hasBlob == otherMessage.hasBlob && - (!self.hasBlob || [self.blob isEqual:otherMessage.blob]) && - self.hasIsComplete == otherMessage.hasIsComplete && - (!self.hasIsComplete || self.isComplete == otherMessage.isComplete) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasBlob) { - hashCode = hashCode * 31 + [self.blob hash]; - } - if (self.hasIsComplete) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.isComplete] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageContactsBuilder() -@property (strong) SSKProtoSyncMessageContacts* resultContacts; -@end - -@implementation SSKProtoSyncMessageContactsBuilder -@synthesize resultContacts; -- (instancetype) init { - if ((self = [super init])) { - self.resultContacts = [[SSKProtoSyncMessageContacts alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultContacts; -} -- (SSKProtoSyncMessageContactsBuilder*) clear { - self.resultContacts = [[SSKProtoSyncMessageContacts alloc] init]; - return self; -} -- (SSKProtoSyncMessageContactsBuilder*) clone { - return [SSKProtoSyncMessageContacts builderWithPrototype:resultContacts]; -} -- (SSKProtoSyncMessageContacts*) defaultInstance { - return [SSKProtoSyncMessageContacts defaultInstance]; -} -- (SSKProtoSyncMessageContacts*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageContacts*) buildPartial { - SSKProtoSyncMessageContacts* returnMe = resultContacts; - self.resultContacts = nil; - return returnMe; -} -- (SSKProtoSyncMessageContactsBuilder*) mergeFrom:(SSKProtoSyncMessageContacts*) other { - if (other == [SSKProtoSyncMessageContacts defaultInstance]) { - return self; - } - if (other.hasBlob) { - [self mergeBlob:other.blob]; - } - if (other.hasIsComplete) { - [self setIsComplete:other.isComplete]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageContactsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageContactsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - if (self.hasBlob) { - [subBuilder mergeFrom:self.blob]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setBlob:[subBuilder buildPartial]]; - break; - } - case 16: { - [self setIsComplete:[input readBool]]; - break; - } - } - } -} -- (BOOL) hasBlob { - return resultContacts.hasBlob; -} -- (SSKProtoAttachmentPointer*) blob { - return resultContacts.blob; -} -- (SSKProtoSyncMessageContactsBuilder*) setBlob:(SSKProtoAttachmentPointer*) value { - resultContacts.hasBlob = YES; - resultContacts.blob = value; - return self; -} -- (SSKProtoSyncMessageContactsBuilder*) setBlobBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue { - return [self setBlob:[builderForValue build]]; -} -- (SSKProtoSyncMessageContactsBuilder*) mergeBlob:(SSKProtoAttachmentPointer*) value { - if (resultContacts.hasBlob && - resultContacts.blob != [SSKProtoAttachmentPointer defaultInstance]) { - resultContacts.blob = - [[[SSKProtoAttachmentPointer builderWithPrototype:resultContacts.blob] mergeFrom:value] buildPartial]; - } else { - resultContacts.blob = value; - } - resultContacts.hasBlob = YES; - return self; -} -- (SSKProtoSyncMessageContactsBuilder*) clearBlob { - resultContacts.hasBlob = NO; - resultContacts.blob = [SSKProtoAttachmentPointer defaultInstance]; - return self; -} -- (BOOL) hasIsComplete { - return resultContacts.hasIsComplete; -} -- (BOOL) isComplete { - return resultContacts.isComplete; -} -- (SSKProtoSyncMessageContactsBuilder*) setIsComplete:(BOOL) value { - resultContacts.hasIsComplete = YES; - resultContacts.isComplete = value; - return self; -} -- (SSKProtoSyncMessageContactsBuilder*) clearIsComplete { - resultContacts.hasIsComplete = NO; - resultContacts.isComplete = NO; - return self; -} -@end - -@interface SSKProtoSyncMessageGroups () -@property (strong) SSKProtoAttachmentPointer* blob; -@end - -@implementation SSKProtoSyncMessageGroups - -- (BOOL) hasBlob { - return !!hasBlob_; -} -- (void) setHasBlob:(BOOL) _value_ { - hasBlob_ = !!_value_; -} -@synthesize blob; -- (instancetype) init { - if ((self = [super init])) { - self.blob = [SSKProtoAttachmentPointer defaultInstance]; - } - return self; -} -static SSKProtoSyncMessageGroups* defaultSSKProtoSyncMessageGroupsInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageGroups class]) { - defaultSSKProtoSyncMessageGroupsInstance = [[SSKProtoSyncMessageGroups alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageGroupsInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageGroupsInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasBlob) { - [output writeMessage:1 value:self.blob]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasBlob) { - size_ += computeMessageSize(1, self.blob); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageGroups*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageGroups*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageGroups*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageGroups*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageGroups*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageGroups*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageGroups*)[[[SSKProtoSyncMessageGroups builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageGroupsBuilder*) builder { - return [[SSKProtoSyncMessageGroupsBuilder alloc] init]; -} -+ (SSKProtoSyncMessageGroupsBuilder*) builderWithPrototype:(SSKProtoSyncMessageGroups*) prototype { - return [[SSKProtoSyncMessageGroups builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageGroupsBuilder*) builder { - return [SSKProtoSyncMessageGroups builder]; -} -- (SSKProtoSyncMessageGroupsBuilder*) toBuilder { - return [SSKProtoSyncMessageGroups builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasBlob) { - [output appendFormat:@"%@%@ {\n", indent, @"blob"]; - [self.blob writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasBlob) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.blob storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"blob"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageGroups class]]) { - return NO; - } - SSKProtoSyncMessageGroups *otherMessage = other; - return - self.hasBlob == otherMessage.hasBlob && - (!self.hasBlob || [self.blob isEqual:otherMessage.blob]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasBlob) { - hashCode = hashCode * 31 + [self.blob hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageGroupsBuilder() -@property (strong) SSKProtoSyncMessageGroups* resultGroups; -@end - -@implementation SSKProtoSyncMessageGroupsBuilder -@synthesize resultGroups; -- (instancetype) init { - if ((self = [super init])) { - self.resultGroups = [[SSKProtoSyncMessageGroups alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultGroups; -} -- (SSKProtoSyncMessageGroupsBuilder*) clear { - self.resultGroups = [[SSKProtoSyncMessageGroups alloc] init]; - return self; -} -- (SSKProtoSyncMessageGroupsBuilder*) clone { - return [SSKProtoSyncMessageGroups builderWithPrototype:resultGroups]; -} -- (SSKProtoSyncMessageGroups*) defaultInstance { - return [SSKProtoSyncMessageGroups defaultInstance]; -} -- (SSKProtoSyncMessageGroups*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageGroups*) buildPartial { - SSKProtoSyncMessageGroups* returnMe = resultGroups; - self.resultGroups = nil; - return returnMe; -} -- (SSKProtoSyncMessageGroupsBuilder*) mergeFrom:(SSKProtoSyncMessageGroups*) other { - if (other == [SSKProtoSyncMessageGroups defaultInstance]) { - return self; - } - if (other.hasBlob) { - [self mergeBlob:other.blob]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageGroupsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageGroupsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - if (self.hasBlob) { - [subBuilder mergeFrom:self.blob]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setBlob:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasBlob { - return resultGroups.hasBlob; -} -- (SSKProtoAttachmentPointer*) blob { - return resultGroups.blob; -} -- (SSKProtoSyncMessageGroupsBuilder*) setBlob:(SSKProtoAttachmentPointer*) value { - resultGroups.hasBlob = YES; - resultGroups.blob = value; - return self; -} -- (SSKProtoSyncMessageGroupsBuilder*) setBlobBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue { - return [self setBlob:[builderForValue build]]; -} -- (SSKProtoSyncMessageGroupsBuilder*) mergeBlob:(SSKProtoAttachmentPointer*) value { - if (resultGroups.hasBlob && - resultGroups.blob != [SSKProtoAttachmentPointer defaultInstance]) { - resultGroups.blob = - [[[SSKProtoAttachmentPointer builderWithPrototype:resultGroups.blob] mergeFrom:value] buildPartial]; - } else { - resultGroups.blob = value; - } - resultGroups.hasBlob = YES; - return self; -} -- (SSKProtoSyncMessageGroupsBuilder*) clearBlob { - resultGroups.hasBlob = NO; - resultGroups.blob = [SSKProtoAttachmentPointer defaultInstance]; - return self; -} -@end - -@interface SSKProtoSyncMessageBlocked () -@property (strong) NSMutableArray * numbersArray; -@end - -@implementation SSKProtoSyncMessageBlocked - -@synthesize numbersArray; -@dynamic numbers; -- (instancetype) init { - if ((self = [super init])) { - } - return self; -} -static SSKProtoSyncMessageBlocked* defaultSSKProtoSyncMessageBlockedInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageBlocked class]) { - defaultSSKProtoSyncMessageBlockedInstance = [[SSKProtoSyncMessageBlocked alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageBlockedInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageBlockedInstance; -} -- (NSArray *)numbers { - return numbersArray; -} -- (NSString*)numbersAtIndex:(NSUInteger)index { - return [numbersArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - [self.numbersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - [output writeString:1 value:element]; - }]; - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - { - __block SInt32 dataSize = 0; - const NSUInteger count = self.numbersArray.count; - [self.numbersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - dataSize += computeStringSizeNoTag(element); - }]; - size_ += dataSize; - size_ += (SInt32)(1 * count); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageBlocked*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageBlocked*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageBlocked*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageBlocked*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageBlocked*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageBlocked*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageBlocked*)[[[SSKProtoSyncMessageBlocked builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageBlockedBuilder*) builder { - return [[SSKProtoSyncMessageBlockedBuilder alloc] init]; -} -+ (SSKProtoSyncMessageBlockedBuilder*) builderWithPrototype:(SSKProtoSyncMessageBlocked*) prototype { - return [[SSKProtoSyncMessageBlocked builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageBlockedBuilder*) builder { - return [SSKProtoSyncMessageBlocked builder]; -} -- (SSKProtoSyncMessageBlockedBuilder*) toBuilder { - return [SSKProtoSyncMessageBlocked builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - [self.numbersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@: %@\n", indent, @"numbers", obj]; - }]; - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - [dictionary setObject:self.numbers forKey: @"numbers"]; - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageBlocked class]]) { - return NO; - } - SSKProtoSyncMessageBlocked *otherMessage = other; - return - [self.numbersArray isEqualToArray:otherMessage.numbersArray] && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - [self.numbersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageBlockedBuilder() -@property (strong) SSKProtoSyncMessageBlocked* resultBlocked; -@end - -@implementation SSKProtoSyncMessageBlockedBuilder -@synthesize resultBlocked; -- (instancetype) init { - if ((self = [super init])) { - self.resultBlocked = [[SSKProtoSyncMessageBlocked alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultBlocked; -} -- (SSKProtoSyncMessageBlockedBuilder*) clear { - self.resultBlocked = [[SSKProtoSyncMessageBlocked alloc] init]; - return self; -} -- (SSKProtoSyncMessageBlockedBuilder*) clone { - return [SSKProtoSyncMessageBlocked builderWithPrototype:resultBlocked]; -} -- (SSKProtoSyncMessageBlocked*) defaultInstance { - return [SSKProtoSyncMessageBlocked defaultInstance]; -} -- (SSKProtoSyncMessageBlocked*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageBlocked*) buildPartial { - SSKProtoSyncMessageBlocked* returnMe = resultBlocked; - self.resultBlocked = nil; - return returnMe; -} -- (SSKProtoSyncMessageBlockedBuilder*) mergeFrom:(SSKProtoSyncMessageBlocked*) other { - if (other == [SSKProtoSyncMessageBlocked defaultInstance]) { - return self; - } - if (other.numbersArray.count > 0) { - if (resultBlocked.numbersArray == nil) { - resultBlocked.numbersArray = [[NSMutableArray alloc] initWithArray:other.numbersArray]; - } else { - [resultBlocked.numbersArray addObjectsFromArray:other.numbersArray]; - } - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageBlockedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageBlockedBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self addNumbers:[input readString]]; - break; - } - } - } -} -- (NSMutableArray *)numbers { - return resultBlocked.numbersArray; -} -- (NSString*)numbersAtIndex:(NSUInteger)index { - return [resultBlocked numbersAtIndex:index]; -} -- (SSKProtoSyncMessageBlockedBuilder *)addNumbers:(NSString*)value { - if (resultBlocked.numbersArray == nil) { - resultBlocked.numbersArray = [[NSMutableArray alloc]init]; - } - [resultBlocked.numbersArray addObject:value]; - return self; -} -- (SSKProtoSyncMessageBlockedBuilder *)setNumbersArray:(NSArray *)array { - resultBlocked.numbersArray = [[NSMutableArray alloc] initWithArray:array]; - return self; -} -- (SSKProtoSyncMessageBlockedBuilder *)clearNumbers { - resultBlocked.numbersArray = nil; - return self; -} -@end - -@interface SSKProtoSyncMessageRequest () -@property SSKProtoSyncMessageRequestType type; -@end - -@implementation SSKProtoSyncMessageRequest - -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (instancetype) init { - if ((self = [super init])) { - self.type = SSKProtoSyncMessageRequestTypeUnknown; - } - return self; -} -static SSKProtoSyncMessageRequest* defaultSSKProtoSyncMessageRequestInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageRequest class]) { - defaultSSKProtoSyncMessageRequestInstance = [[SSKProtoSyncMessageRequest alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageRequestInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageRequestInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasType) { - [output writeEnum:1 value:self.type]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasType) { - size_ += computeEnumSize(1, self.type); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageRequest*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageRequest*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageRequest*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageRequest*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageRequest*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRequest*)[[[SSKProtoSyncMessageRequest builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageRequestBuilder*) builder { - return [[SSKProtoSyncMessageRequestBuilder alloc] init]; -} -+ (SSKProtoSyncMessageRequestBuilder*) builderWithPrototype:(SSKProtoSyncMessageRequest*) prototype { - return [[SSKProtoSyncMessageRequest builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageRequestBuilder*) builder { - return [SSKProtoSyncMessageRequest builder]; -} -- (SSKProtoSyncMessageRequestBuilder*) toBuilder { - return [SSKProtoSyncMessageRequest builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoSyncMessageRequestType(self.type)]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageRequest class]]) { - return NO; - } - SSKProtoSyncMessageRequest *otherMessage = other; - return - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoSyncMessageRequestTypeIsValidValue(SSKProtoSyncMessageRequestType value) { - switch (value) { - case SSKProtoSyncMessageRequestTypeUnknown: - case SSKProtoSyncMessageRequestTypeContacts: - case SSKProtoSyncMessageRequestTypeGroups: - case SSKProtoSyncMessageRequestTypeBlocked: - case SSKProtoSyncMessageRequestTypeConfiguration: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoSyncMessageRequestType(SSKProtoSyncMessageRequestType value) { - switch (value) { - case SSKProtoSyncMessageRequestTypeUnknown: - return @"SSKProtoSyncMessageRequestTypeUnknown"; - case SSKProtoSyncMessageRequestTypeContacts: - return @"SSKProtoSyncMessageRequestTypeContacts"; - case SSKProtoSyncMessageRequestTypeGroups: - return @"SSKProtoSyncMessageRequestTypeGroups"; - case SSKProtoSyncMessageRequestTypeBlocked: - return @"SSKProtoSyncMessageRequestTypeBlocked"; - case SSKProtoSyncMessageRequestTypeConfiguration: - return @"SSKProtoSyncMessageRequestTypeConfiguration"; - default: - return nil; - } -} - -@interface SSKProtoSyncMessageRequestBuilder() -@property (strong) SSKProtoSyncMessageRequest* resultRequest; -@end - -@implementation SSKProtoSyncMessageRequestBuilder -@synthesize resultRequest; -- (instancetype) init { - if ((self = [super init])) { - self.resultRequest = [[SSKProtoSyncMessageRequest alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultRequest; -} -- (SSKProtoSyncMessageRequestBuilder*) clear { - self.resultRequest = [[SSKProtoSyncMessageRequest alloc] init]; - return self; -} -- (SSKProtoSyncMessageRequestBuilder*) clone { - return [SSKProtoSyncMessageRequest builderWithPrototype:resultRequest]; -} -- (SSKProtoSyncMessageRequest*) defaultInstance { - return [SSKProtoSyncMessageRequest defaultInstance]; -} -- (SSKProtoSyncMessageRequest*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageRequest*) buildPartial { - SSKProtoSyncMessageRequest* returnMe = resultRequest; - self.resultRequest = nil; - return returnMe; -} -- (SSKProtoSyncMessageRequestBuilder*) mergeFrom:(SSKProtoSyncMessageRequest*) other { - if (other == [SSKProtoSyncMessageRequest defaultInstance]) { - return self; - } - if (other.hasType) { - [self setType:other.type]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageRequestBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - SSKProtoSyncMessageRequestType value = (SSKProtoSyncMessageRequestType)[input readEnum]; - if (SSKProtoSyncMessageRequestTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:1 value:value]; - } - break; - } - } - } -} -- (BOOL) hasType { - return resultRequest.hasType; -} -- (SSKProtoSyncMessageRequestType) type { - return resultRequest.type; -} -- (SSKProtoSyncMessageRequestBuilder*) setType:(SSKProtoSyncMessageRequestType) value { - resultRequest.hasType = YES; - resultRequest.type = value; - return self; -} -- (SSKProtoSyncMessageRequestBuilder*) clearType { - resultRequest.hasType = NO; - resultRequest.type = SSKProtoSyncMessageRequestTypeUnknown; - return self; -} -@end - -@interface SSKProtoSyncMessageRead () -@property (strong) NSString* sender; -@property UInt64 timestamp; -@end - -@implementation SSKProtoSyncMessageRead - -- (BOOL) hasSender { - return !!hasSender_; -} -- (void) setHasSender:(BOOL) _value_ { - hasSender_ = !!_value_; -} -@synthesize sender; -- (BOOL) hasTimestamp { - return !!hasTimestamp_; -} -- (void) setHasTimestamp:(BOOL) _value_ { - hasTimestamp_ = !!_value_; -} -@synthesize timestamp; -- (instancetype) init { - if ((self = [super init])) { - self.sender = @""; - self.timestamp = 0L; - } - return self; -} -static SSKProtoSyncMessageRead* defaultSSKProtoSyncMessageReadInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageRead class]) { - defaultSSKProtoSyncMessageReadInstance = [[SSKProtoSyncMessageRead alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageReadInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageReadInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasSender) { - [output writeString:1 value:self.sender]; - } - if (self.hasTimestamp) { - [output writeUInt64:2 value:self.timestamp]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasSender) { - size_ += computeStringSize(1, self.sender); - } - if (self.hasTimestamp) { - size_ += computeUInt64Size(2, self.timestamp); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageRead*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageRead*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageRead*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageRead*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageRead*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageRead*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageRead*)[[[SSKProtoSyncMessageRead builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageReadBuilder*) builder { - return [[SSKProtoSyncMessageReadBuilder alloc] init]; -} -+ (SSKProtoSyncMessageReadBuilder*) builderWithPrototype:(SSKProtoSyncMessageRead*) prototype { - return [[SSKProtoSyncMessageRead builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageReadBuilder*) builder { - return [SSKProtoSyncMessageRead builder]; -} -- (SSKProtoSyncMessageReadBuilder*) toBuilder { - return [SSKProtoSyncMessageRead builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasSender) { - [output appendFormat:@"%@%@: %@\n", indent, @"sender", self.sender]; - } - if (self.hasTimestamp) { - [output appendFormat:@"%@%@: %@\n", indent, @"timestamp", [NSNumber numberWithLongLong:self.timestamp]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasSender) { - [dictionary setObject: self.sender forKey: @"sender"]; - } - if (self.hasTimestamp) { - [dictionary setObject: [NSNumber numberWithLongLong:self.timestamp] forKey: @"timestamp"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageRead class]]) { - return NO; - } - SSKProtoSyncMessageRead *otherMessage = other; - return - self.hasSender == otherMessage.hasSender && - (!self.hasSender || [self.sender isEqual:otherMessage.sender]) && - self.hasTimestamp == otherMessage.hasTimestamp && - (!self.hasTimestamp || self.timestamp == otherMessage.timestamp) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasSender) { - hashCode = hashCode * 31 + [self.sender hash]; - } - if (self.hasTimestamp) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestamp] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageReadBuilder() -@property (strong) SSKProtoSyncMessageRead* resultRead; -@end - -@implementation SSKProtoSyncMessageReadBuilder -@synthesize resultRead; -- (instancetype) init { - if ((self = [super init])) { - self.resultRead = [[SSKProtoSyncMessageRead alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultRead; -} -- (SSKProtoSyncMessageReadBuilder*) clear { - self.resultRead = [[SSKProtoSyncMessageRead alloc] init]; - return self; -} -- (SSKProtoSyncMessageReadBuilder*) clone { - return [SSKProtoSyncMessageRead builderWithPrototype:resultRead]; -} -- (SSKProtoSyncMessageRead*) defaultInstance { - return [SSKProtoSyncMessageRead defaultInstance]; -} -- (SSKProtoSyncMessageRead*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageRead*) buildPartial { - SSKProtoSyncMessageRead* returnMe = resultRead; - self.resultRead = nil; - return returnMe; -} -- (SSKProtoSyncMessageReadBuilder*) mergeFrom:(SSKProtoSyncMessageRead*) other { - if (other == [SSKProtoSyncMessageRead defaultInstance]) { - return self; - } - if (other.hasSender) { - [self setSender:other.sender]; - } - if (other.hasTimestamp) { - [self setTimestamp:other.timestamp]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageReadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageReadBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setSender:[input readString]]; - break; - } - case 16: { - [self setTimestamp:[input readUInt64]]; - break; - } - } - } -} -- (BOOL) hasSender { - return resultRead.hasSender; -} -- (NSString*) sender { - return resultRead.sender; -} -- (SSKProtoSyncMessageReadBuilder*) setSender:(NSString*) value { - resultRead.hasSender = YES; - resultRead.sender = value; - return self; -} -- (SSKProtoSyncMessageReadBuilder*) clearSender { - resultRead.hasSender = NO; - resultRead.sender = @""; - return self; -} -- (BOOL) hasTimestamp { - return resultRead.hasTimestamp; -} -- (UInt64) timestamp { - return resultRead.timestamp; -} -- (SSKProtoSyncMessageReadBuilder*) setTimestamp:(UInt64) value { - resultRead.hasTimestamp = YES; - resultRead.timestamp = value; - return self; -} -- (SSKProtoSyncMessageReadBuilder*) clearTimestamp { - resultRead.hasTimestamp = NO; - resultRead.timestamp = 0L; - return self; -} -@end - -@interface SSKProtoSyncMessageConfiguration () -@property BOOL readReceipts; -@end - -@implementation SSKProtoSyncMessageConfiguration - -- (BOOL) hasReadReceipts { - return !!hasReadReceipts_; -} -- (void) setHasReadReceipts:(BOOL) _value_ { - hasReadReceipts_ = !!_value_; -} -- (BOOL) readReceipts { - return !!readReceipts_; -} -- (void) setReadReceipts:(BOOL) _value_ { - readReceipts_ = !!_value_; -} -- (instancetype) init { - if ((self = [super init])) { - self.readReceipts = NO; - } - return self; -} -static SSKProtoSyncMessageConfiguration* defaultSSKProtoSyncMessageConfigurationInstance = nil; -+ (void) initialize { - if (self == [SSKProtoSyncMessageConfiguration class]) { - defaultSSKProtoSyncMessageConfigurationInstance = [[SSKProtoSyncMessageConfiguration alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageConfigurationInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoSyncMessageConfigurationInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasReadReceipts) { - [output writeBool:1 value:self.readReceipts]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasReadReceipts) { - size_ += computeBoolSize(1, self.readReceipts); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromData:(NSData*) data { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromData:data] build]; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoSyncMessageConfiguration*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoSyncMessageConfiguration*)[[[SSKProtoSyncMessageConfiguration builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoSyncMessageConfigurationBuilder*) builder { - return [[SSKProtoSyncMessageConfigurationBuilder alloc] init]; -} -+ (SSKProtoSyncMessageConfigurationBuilder*) builderWithPrototype:(SSKProtoSyncMessageConfiguration*) prototype { - return [[SSKProtoSyncMessageConfiguration builder] mergeFrom:prototype]; -} -- (SSKProtoSyncMessageConfigurationBuilder*) builder { - return [SSKProtoSyncMessageConfiguration builder]; -} -- (SSKProtoSyncMessageConfigurationBuilder*) toBuilder { - return [SSKProtoSyncMessageConfiguration builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasReadReceipts) { - [output appendFormat:@"%@%@: %@\n", indent, @"readReceipts", [NSNumber numberWithBool:self.readReceipts]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasReadReceipts) { - [dictionary setObject: [NSNumber numberWithBool:self.readReceipts] forKey: @"readReceipts"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoSyncMessageConfiguration class]]) { - return NO; - } - SSKProtoSyncMessageConfiguration *otherMessage = other; - return - self.hasReadReceipts == otherMessage.hasReadReceipts && - (!self.hasReadReceipts || self.readReceipts == otherMessage.readReceipts) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasReadReceipts) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.readReceipts] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoSyncMessageConfigurationBuilder() -@property (strong) SSKProtoSyncMessageConfiguration* resultConfiguration; -@end - -@implementation SSKProtoSyncMessageConfigurationBuilder -@synthesize resultConfiguration; -- (instancetype) init { - if ((self = [super init])) { - self.resultConfiguration = [[SSKProtoSyncMessageConfiguration alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultConfiguration; -} -- (SSKProtoSyncMessageConfigurationBuilder*) clear { - self.resultConfiguration = [[SSKProtoSyncMessageConfiguration alloc] init]; - return self; -} -- (SSKProtoSyncMessageConfigurationBuilder*) clone { - return [SSKProtoSyncMessageConfiguration builderWithPrototype:resultConfiguration]; -} -- (SSKProtoSyncMessageConfiguration*) defaultInstance { - return [SSKProtoSyncMessageConfiguration defaultInstance]; -} -- (SSKProtoSyncMessageConfiguration*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessageConfiguration*) buildPartial { - SSKProtoSyncMessageConfiguration* returnMe = resultConfiguration; - self.resultConfiguration = nil; - return returnMe; -} -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFrom:(SSKProtoSyncMessageConfiguration*) other { - if (other == [SSKProtoSyncMessageConfiguration defaultInstance]) { - return self; - } - if (other.hasReadReceipts) { - [self setReadReceipts:other.readReceipts]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageConfigurationBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 8: { - [self setReadReceipts:[input readBool]]; - break; - } - } - } -} -- (BOOL) hasReadReceipts { - return resultConfiguration.hasReadReceipts; -} -- (BOOL) readReceipts { - return resultConfiguration.readReceipts; -} -- (SSKProtoSyncMessageConfigurationBuilder*) setReadReceipts:(BOOL) value { - resultConfiguration.hasReadReceipts = YES; - resultConfiguration.readReceipts = value; - return self; -} -- (SSKProtoSyncMessageConfigurationBuilder*) clearReadReceipts { - resultConfiguration.hasReadReceipts = NO; - resultConfiguration.readReceipts = NO; - return self; -} -@end - -@interface SSKProtoSyncMessageBuilder() -@property (strong) SSKProtoSyncMessage* resultSyncMessage; -@end - -@implementation SSKProtoSyncMessageBuilder -@synthesize resultSyncMessage; -- (instancetype) init { - if ((self = [super init])) { - self.resultSyncMessage = [[SSKProtoSyncMessage alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultSyncMessage; -} -- (SSKProtoSyncMessageBuilder*) clear { - self.resultSyncMessage = [[SSKProtoSyncMessage alloc] init]; - return self; -} -- (SSKProtoSyncMessageBuilder*) clone { - return [SSKProtoSyncMessage builderWithPrototype:resultSyncMessage]; -} -- (SSKProtoSyncMessage*) defaultInstance { - return [SSKProtoSyncMessage defaultInstance]; -} -- (SSKProtoSyncMessage*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoSyncMessage*) buildPartial { - SSKProtoSyncMessage* returnMe = resultSyncMessage; - self.resultSyncMessage = nil; - return returnMe; -} -- (SSKProtoSyncMessageBuilder*) mergeFrom:(SSKProtoSyncMessage*) other { - if (other == [SSKProtoSyncMessage defaultInstance]) { - return self; - } - if (other.hasSent) { - [self mergeSent:other.sent]; - } - if (other.hasContacts) { - [self mergeContacts:other.contacts]; - } - if (other.hasGroups) { - [self mergeGroups:other.groups]; - } - if (other.hasRequest) { - [self mergeRequest:other.request]; - } - if (other.readArray.count > 0) { - if (resultSyncMessage.readArray == nil) { - resultSyncMessage.readArray = [[NSMutableArray alloc] initWithArray:other.readArray]; - } else { - [resultSyncMessage.readArray addObjectsFromArray:other.readArray]; - } - } - if (other.hasBlocked) { - [self mergeBlocked:other.blocked]; - } - if (other.hasVerified) { - [self mergeVerified:other.verified]; - } - if (other.hasConfiguration) { - [self mergeConfiguration:other.configuration]; - } - if (other.hasPadding) { - [self setPadding:other.padding]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoSyncMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoSyncMessageBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - SSKProtoSyncMessageSentBuilder* subBuilder = [SSKProtoSyncMessageSent builder]; - if (self.hasSent) { - [subBuilder mergeFrom:self.sent]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setSent:[subBuilder buildPartial]]; - break; - } - case 18: { - SSKProtoSyncMessageContactsBuilder* subBuilder = [SSKProtoSyncMessageContacts builder]; - if (self.hasContacts) { - [subBuilder mergeFrom:self.contacts]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setContacts:[subBuilder buildPartial]]; - break; - } - case 26: { - SSKProtoSyncMessageGroupsBuilder* subBuilder = [SSKProtoSyncMessageGroups builder]; - if (self.hasGroups) { - [subBuilder mergeFrom:self.groups]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setGroups:[subBuilder buildPartial]]; - break; - } - case 34: { - SSKProtoSyncMessageRequestBuilder* subBuilder = [SSKProtoSyncMessageRequest builder]; - if (self.hasRequest) { - [subBuilder mergeFrom:self.request]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setRequest:[subBuilder buildPartial]]; - break; - } - case 42: { - SSKProtoSyncMessageReadBuilder* subBuilder = [SSKProtoSyncMessageRead builder]; - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self addRead:[subBuilder buildPartial]]; - break; - } - case 50: { - SSKProtoSyncMessageBlockedBuilder* subBuilder = [SSKProtoSyncMessageBlocked builder]; - if (self.hasBlocked) { - [subBuilder mergeFrom:self.blocked]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setBlocked:[subBuilder buildPartial]]; - break; - } - case 58: { - SSKProtoVerifiedBuilder* subBuilder = [SSKProtoVerified builder]; - if (self.hasVerified) { - [subBuilder mergeFrom:self.verified]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setVerified:[subBuilder buildPartial]]; - break; - } - case 66: { - [self setPadding:[input readData]]; - break; - } - case 74: { - SSKProtoSyncMessageConfigurationBuilder* subBuilder = [SSKProtoSyncMessageConfiguration builder]; - if (self.hasConfiguration) { - [subBuilder mergeFrom:self.configuration]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setConfiguration:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasSent { - return resultSyncMessage.hasSent; -} -- (SSKProtoSyncMessageSent*) sent { - return resultSyncMessage.sent; -} -- (SSKProtoSyncMessageBuilder*) setSent:(SSKProtoSyncMessageSent*) value { - resultSyncMessage.hasSent = YES; - resultSyncMessage.sent = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setSentBuilder:(SSKProtoSyncMessageSentBuilder*) builderForValue { - return [self setSent:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeSent:(SSKProtoSyncMessageSent*) value { - if (resultSyncMessage.hasSent && - resultSyncMessage.sent != [SSKProtoSyncMessageSent defaultInstance]) { - resultSyncMessage.sent = - [[[SSKProtoSyncMessageSent builderWithPrototype:resultSyncMessage.sent] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.sent = value; - } - resultSyncMessage.hasSent = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearSent { - resultSyncMessage.hasSent = NO; - resultSyncMessage.sent = [SSKProtoSyncMessageSent defaultInstance]; - return self; -} -- (BOOL) hasContacts { - return resultSyncMessage.hasContacts; -} -- (SSKProtoSyncMessageContacts*) contacts { - return resultSyncMessage.contacts; -} -- (SSKProtoSyncMessageBuilder*) setContacts:(SSKProtoSyncMessageContacts*) value { - resultSyncMessage.hasContacts = YES; - resultSyncMessage.contacts = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setContactsBuilder:(SSKProtoSyncMessageContactsBuilder*) builderForValue { - return [self setContacts:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeContacts:(SSKProtoSyncMessageContacts*) value { - if (resultSyncMessage.hasContacts && - resultSyncMessage.contacts != [SSKProtoSyncMessageContacts defaultInstance]) { - resultSyncMessage.contacts = - [[[SSKProtoSyncMessageContacts builderWithPrototype:resultSyncMessage.contacts] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.contacts = value; - } - resultSyncMessage.hasContacts = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearContacts { - resultSyncMessage.hasContacts = NO; - resultSyncMessage.contacts = [SSKProtoSyncMessageContacts defaultInstance]; - return self; -} -- (BOOL) hasGroups { - return resultSyncMessage.hasGroups; -} -- (SSKProtoSyncMessageGroups*) groups { - return resultSyncMessage.groups; -} -- (SSKProtoSyncMessageBuilder*) setGroups:(SSKProtoSyncMessageGroups*) value { - resultSyncMessage.hasGroups = YES; - resultSyncMessage.groups = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setGroupsBuilder:(SSKProtoSyncMessageGroupsBuilder*) builderForValue { - return [self setGroups:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeGroups:(SSKProtoSyncMessageGroups*) value { - if (resultSyncMessage.hasGroups && - resultSyncMessage.groups != [SSKProtoSyncMessageGroups defaultInstance]) { - resultSyncMessage.groups = - [[[SSKProtoSyncMessageGroups builderWithPrototype:resultSyncMessage.groups] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.groups = value; - } - resultSyncMessage.hasGroups = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearGroups { - resultSyncMessage.hasGroups = NO; - resultSyncMessage.groups = [SSKProtoSyncMessageGroups defaultInstance]; - return self; -} -- (BOOL) hasRequest { - return resultSyncMessage.hasRequest; -} -- (SSKProtoSyncMessageRequest*) request { - return resultSyncMessage.request; -} -- (SSKProtoSyncMessageBuilder*) setRequest:(SSKProtoSyncMessageRequest*) value { - resultSyncMessage.hasRequest = YES; - resultSyncMessage.request = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setRequestBuilder:(SSKProtoSyncMessageRequestBuilder*) builderForValue { - return [self setRequest:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeRequest:(SSKProtoSyncMessageRequest*) value { - if (resultSyncMessage.hasRequest && - resultSyncMessage.request != [SSKProtoSyncMessageRequest defaultInstance]) { - resultSyncMessage.request = - [[[SSKProtoSyncMessageRequest builderWithPrototype:resultSyncMessage.request] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.request = value; - } - resultSyncMessage.hasRequest = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearRequest { - resultSyncMessage.hasRequest = NO; - resultSyncMessage.request = [SSKProtoSyncMessageRequest defaultInstance]; - return self; -} -- (NSMutableArray *)read { - return resultSyncMessage.readArray; -} -- (SSKProtoSyncMessageRead*)readAtIndex:(NSUInteger)index { - return [resultSyncMessage readAtIndex:index]; -} -- (SSKProtoSyncMessageBuilder *)addRead:(SSKProtoSyncMessageRead*)value { - if (resultSyncMessage.readArray == nil) { - resultSyncMessage.readArray = [[NSMutableArray alloc]init]; - } - [resultSyncMessage.readArray addObject:value]; - return self; -} -- (SSKProtoSyncMessageBuilder *)setReadArray:(NSArray *)array { - resultSyncMessage.readArray = [[NSMutableArray alloc]initWithArray:array]; - return self; -} -- (SSKProtoSyncMessageBuilder *)clearRead { - resultSyncMessage.readArray = nil; - return self; -} -- (BOOL) hasBlocked { - return resultSyncMessage.hasBlocked; -} -- (SSKProtoSyncMessageBlocked*) blocked { - return resultSyncMessage.blocked; -} -- (SSKProtoSyncMessageBuilder*) setBlocked:(SSKProtoSyncMessageBlocked*) value { - resultSyncMessage.hasBlocked = YES; - resultSyncMessage.blocked = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setBlockedBuilder:(SSKProtoSyncMessageBlockedBuilder*) builderForValue { - return [self setBlocked:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeBlocked:(SSKProtoSyncMessageBlocked*) value { - if (resultSyncMessage.hasBlocked && - resultSyncMessage.blocked != [SSKProtoSyncMessageBlocked defaultInstance]) { - resultSyncMessage.blocked = - [[[SSKProtoSyncMessageBlocked builderWithPrototype:resultSyncMessage.blocked] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.blocked = value; - } - resultSyncMessage.hasBlocked = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearBlocked { - resultSyncMessage.hasBlocked = NO; - resultSyncMessage.blocked = [SSKProtoSyncMessageBlocked defaultInstance]; - return self; -} -- (BOOL) hasVerified { - return resultSyncMessage.hasVerified; -} -- (SSKProtoVerified*) verified { - return resultSyncMessage.verified; -} -- (SSKProtoSyncMessageBuilder*) setVerified:(SSKProtoVerified*) value { - resultSyncMessage.hasVerified = YES; - resultSyncMessage.verified = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setVerifiedBuilder:(SSKProtoVerifiedBuilder*) builderForValue { - return [self setVerified:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeVerified:(SSKProtoVerified*) value { - if (resultSyncMessage.hasVerified && - resultSyncMessage.verified != [SSKProtoVerified defaultInstance]) { - resultSyncMessage.verified = - [[[SSKProtoVerified builderWithPrototype:resultSyncMessage.verified] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.verified = value; - } - resultSyncMessage.hasVerified = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearVerified { - resultSyncMessage.hasVerified = NO; - resultSyncMessage.verified = [SSKProtoVerified defaultInstance]; - return self; -} -- (BOOL) hasConfiguration { - return resultSyncMessage.hasConfiguration; -} -- (SSKProtoSyncMessageConfiguration*) configuration { - return resultSyncMessage.configuration; -} -- (SSKProtoSyncMessageBuilder*) setConfiguration:(SSKProtoSyncMessageConfiguration*) value { - resultSyncMessage.hasConfiguration = YES; - resultSyncMessage.configuration = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) setConfigurationBuilder:(SSKProtoSyncMessageConfigurationBuilder*) builderForValue { - return [self setConfiguration:[builderForValue build]]; -} -- (SSKProtoSyncMessageBuilder*) mergeConfiguration:(SSKProtoSyncMessageConfiguration*) value { - if (resultSyncMessage.hasConfiguration && - resultSyncMessage.configuration != [SSKProtoSyncMessageConfiguration defaultInstance]) { - resultSyncMessage.configuration = - [[[SSKProtoSyncMessageConfiguration builderWithPrototype:resultSyncMessage.configuration] mergeFrom:value] buildPartial]; - } else { - resultSyncMessage.configuration = value; - } - resultSyncMessage.hasConfiguration = YES; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearConfiguration { - resultSyncMessage.hasConfiguration = NO; - resultSyncMessage.configuration = [SSKProtoSyncMessageConfiguration defaultInstance]; - return self; -} -- (BOOL) hasPadding { - return resultSyncMessage.hasPadding; -} -- (NSData*) padding { - return resultSyncMessage.padding; -} -- (SSKProtoSyncMessageBuilder*) setPadding:(NSData*) value { - resultSyncMessage.hasPadding = YES; - resultSyncMessage.padding = value; - return self; -} -- (SSKProtoSyncMessageBuilder*) clearPadding { - resultSyncMessage.hasPadding = NO; - resultSyncMessage.padding = [NSData data]; - return self; -} -@end - -@interface SSKProtoAttachmentPointer () -@property UInt64 id; -@property (strong) NSString* contentType; -@property (strong) NSData* key; -@property UInt32 size; -@property (strong) NSData* thumbnail; -@property (strong) NSData* digest; -@property (strong) NSString* fileName; -@property UInt32 flags; -@property UInt32 width; -@property UInt32 height; -@end - -@implementation SSKProtoAttachmentPointer - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasContentType { - return !!hasContentType_; -} -- (void) setHasContentType:(BOOL) _value_ { - hasContentType_ = !!_value_; -} -@synthesize contentType; -- (BOOL) hasKey { - return !!hasKey_; -} -- (void) setHasKey:(BOOL) _value_ { - hasKey_ = !!_value_; -} -@synthesize key; -- (BOOL) hasSize { - return !!hasSize_; -} -- (void) setHasSize:(BOOL) _value_ { - hasSize_ = !!_value_; -} -@synthesize size; -- (BOOL) hasThumbnail { - return !!hasThumbnail_; -} -- (void) setHasThumbnail:(BOOL) _value_ { - hasThumbnail_ = !!_value_; -} -@synthesize thumbnail; -- (BOOL) hasDigest { - return !!hasDigest_; -} -- (void) setHasDigest:(BOOL) _value_ { - hasDigest_ = !!_value_; -} -@synthesize digest; -- (BOOL) hasFileName { - return !!hasFileName_; -} -- (void) setHasFileName:(BOOL) _value_ { - hasFileName_ = !!_value_; -} -@synthesize fileName; -- (BOOL) hasFlags { - return !!hasFlags_; -} -- (void) setHasFlags:(BOOL) _value_ { - hasFlags_ = !!_value_; -} -@synthesize flags; -- (BOOL) hasWidth { - return !!hasWidth_; -} -- (void) setHasWidth:(BOOL) _value_ { - hasWidth_ = !!_value_; -} -@synthesize width; -- (BOOL) hasHeight { - return !!hasHeight_; -} -- (void) setHasHeight:(BOOL) _value_ { - hasHeight_ = !!_value_; -} -@synthesize height; -- (instancetype) init { - if ((self = [super init])) { - self.id = 0L; - self.contentType = @""; - self.key = [NSData data]; - self.size = 0; - self.thumbnail = [NSData data]; - self.digest = [NSData data]; - self.fileName = @""; - self.flags = 0; - self.width = 0; - self.height = 0; - } - return self; -} -static SSKProtoAttachmentPointer* defaultSSKProtoAttachmentPointerInstance = nil; -+ (void) initialize { - if (self == [SSKProtoAttachmentPointer class]) { - defaultSSKProtoAttachmentPointerInstance = [[SSKProtoAttachmentPointer alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoAttachmentPointerInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoAttachmentPointerInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeFixed64:1 value:self.id]; - } - if (self.hasContentType) { - [output writeString:2 value:self.contentType]; - } - if (self.hasKey) { - [output writeData:3 value:self.key]; - } - if (self.hasSize) { - [output writeUInt32:4 value:self.size]; - } - if (self.hasThumbnail) { - [output writeData:5 value:self.thumbnail]; - } - if (self.hasDigest) { - [output writeData:6 value:self.digest]; - } - if (self.hasFileName) { - [output writeString:7 value:self.fileName]; - } - if (self.hasFlags) { - [output writeUInt32:8 value:self.flags]; - } - if (self.hasWidth) { - [output writeUInt32:9 value:self.width]; - } - if (self.hasHeight) { - [output writeUInt32:10 value:self.height]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeFixed64Size(1, self.id); - } - if (self.hasContentType) { - size_ += computeStringSize(2, self.contentType); - } - if (self.hasKey) { - size_ += computeDataSize(3, self.key); - } - if (self.hasSize) { - size_ += computeUInt32Size(4, self.size); - } - if (self.hasThumbnail) { - size_ += computeDataSize(5, self.thumbnail); - } - if (self.hasDigest) { - size_ += computeDataSize(6, self.digest); - } - if (self.hasFileName) { - size_ += computeStringSize(7, self.fileName); - } - if (self.hasFlags) { - size_ += computeUInt32Size(8, self.flags); - } - if (self.hasWidth) { - size_ += computeUInt32Size(9, self.width); - } - if (self.hasHeight) { - size_ += computeUInt32Size(10, self.height); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoAttachmentPointer*) parseFromData:(NSData*) data { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromData:data] build]; -} -+ (SSKProtoAttachmentPointer*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoAttachmentPointer*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoAttachmentPointer*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoAttachmentPointer*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoAttachmentPointer*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoAttachmentPointer*)[[[SSKProtoAttachmentPointer builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoAttachmentPointerBuilder*) builder { - return [[SSKProtoAttachmentPointerBuilder alloc] init]; -} -+ (SSKProtoAttachmentPointerBuilder*) builderWithPrototype:(SSKProtoAttachmentPointer*) prototype { - return [[SSKProtoAttachmentPointer builder] mergeFrom:prototype]; -} -- (SSKProtoAttachmentPointerBuilder*) builder { - return [SSKProtoAttachmentPointer builder]; -} -- (SSKProtoAttachmentPointerBuilder*) toBuilder { - return [SSKProtoAttachmentPointer builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", [NSNumber numberWithLongLong:self.id]]; - } - if (self.hasContentType) { - [output appendFormat:@"%@%@: %@\n", indent, @"contentType", self.contentType]; - } - if (self.hasKey) { - [output appendFormat:@"%@%@: %@\n", indent, @"key", self.key]; - } - if (self.hasSize) { - [output appendFormat:@"%@%@: %@\n", indent, @"size", [NSNumber numberWithInteger:self.size]]; - } - if (self.hasThumbnail) { - [output appendFormat:@"%@%@: %@\n", indent, @"thumbnail", self.thumbnail]; - } - if (self.hasDigest) { - [output appendFormat:@"%@%@: %@\n", indent, @"digest", self.digest]; - } - if (self.hasFileName) { - [output appendFormat:@"%@%@: %@\n", indent, @"fileName", self.fileName]; - } - if (self.hasFlags) { - [output appendFormat:@"%@%@: %@\n", indent, @"flags", [NSNumber numberWithInteger:self.flags]]; - } - if (self.hasWidth) { - [output appendFormat:@"%@%@: %@\n", indent, @"width", [NSNumber numberWithInteger:self.width]]; - } - if (self.hasHeight) { - [output appendFormat:@"%@%@: %@\n", indent, @"height", [NSNumber numberWithInteger:self.height]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: [NSNumber numberWithLongLong:self.id] forKey: @"id"]; - } - if (self.hasContentType) { - [dictionary setObject: self.contentType forKey: @"contentType"]; - } - if (self.hasKey) { - [dictionary setObject: self.key forKey: @"key"]; - } - if (self.hasSize) { - [dictionary setObject: [NSNumber numberWithInteger:self.size] forKey: @"size"]; - } - if (self.hasThumbnail) { - [dictionary setObject: self.thumbnail forKey: @"thumbnail"]; - } - if (self.hasDigest) { - [dictionary setObject: self.digest forKey: @"digest"]; - } - if (self.hasFileName) { - [dictionary setObject: self.fileName forKey: @"fileName"]; - } - if (self.hasFlags) { - [dictionary setObject: [NSNumber numberWithInteger:self.flags] forKey: @"flags"]; - } - if (self.hasWidth) { - [dictionary setObject: [NSNumber numberWithInteger:self.width] forKey: @"width"]; - } - if (self.hasHeight) { - [dictionary setObject: [NSNumber numberWithInteger:self.height] forKey: @"height"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoAttachmentPointer class]]) { - return NO; - } - SSKProtoAttachmentPointer *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || self.id == otherMessage.id) && - self.hasContentType == otherMessage.hasContentType && - (!self.hasContentType || [self.contentType isEqual:otherMessage.contentType]) && - self.hasKey == otherMessage.hasKey && - (!self.hasKey || [self.key isEqual:otherMessage.key]) && - self.hasSize == otherMessage.hasSize && - (!self.hasSize || self.size == otherMessage.size) && - self.hasThumbnail == otherMessage.hasThumbnail && - (!self.hasThumbnail || [self.thumbnail isEqual:otherMessage.thumbnail]) && - self.hasDigest == otherMessage.hasDigest && - (!self.hasDigest || [self.digest isEqual:otherMessage.digest]) && - self.hasFileName == otherMessage.hasFileName && - (!self.hasFileName || [self.fileName isEqual:otherMessage.fileName]) && - self.hasFlags == otherMessage.hasFlags && - (!self.hasFlags || self.flags == otherMessage.flags) && - self.hasWidth == otherMessage.hasWidth && - (!self.hasWidth || self.width == otherMessage.width) && - self.hasHeight == otherMessage.hasHeight && - (!self.hasHeight || self.height == otherMessage.height) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.id] hash]; - } - if (self.hasContentType) { - hashCode = hashCode * 31 + [self.contentType hash]; - } - if (self.hasKey) { - hashCode = hashCode * 31 + [self.key hash]; - } - if (self.hasSize) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.size] hash]; - } - if (self.hasThumbnail) { - hashCode = hashCode * 31 + [self.thumbnail hash]; - } - if (self.hasDigest) { - hashCode = hashCode * 31 + [self.digest hash]; - } - if (self.hasFileName) { - hashCode = hashCode * 31 + [self.fileName hash]; - } - if (self.hasFlags) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.flags] hash]; - } - if (self.hasWidth) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.width] hash]; - } - if (self.hasHeight) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.height] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoAttachmentPointerFlagsIsValidValue(SSKProtoAttachmentPointerFlags value) { - switch (value) { - case SSKProtoAttachmentPointerFlagsVoiceMessage: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoAttachmentPointerFlags(SSKProtoAttachmentPointerFlags value) { - switch (value) { - case SSKProtoAttachmentPointerFlagsVoiceMessage: - return @"SSKProtoAttachmentPointerFlagsVoiceMessage"; - default: - return nil; - } -} - -@interface SSKProtoAttachmentPointerBuilder() -@property (strong) SSKProtoAttachmentPointer* resultAttachmentPointer; -@end - -@implementation SSKProtoAttachmentPointerBuilder -@synthesize resultAttachmentPointer; -- (instancetype) init { - if ((self = [super init])) { - self.resultAttachmentPointer = [[SSKProtoAttachmentPointer alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultAttachmentPointer; -} -- (SSKProtoAttachmentPointerBuilder*) clear { - self.resultAttachmentPointer = [[SSKProtoAttachmentPointer alloc] init]; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clone { - return [SSKProtoAttachmentPointer builderWithPrototype:resultAttachmentPointer]; -} -- (SSKProtoAttachmentPointer*) defaultInstance { - return [SSKProtoAttachmentPointer defaultInstance]; -} -- (SSKProtoAttachmentPointer*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoAttachmentPointer*) buildPartial { - SSKProtoAttachmentPointer* returnMe = resultAttachmentPointer; - self.resultAttachmentPointer = nil; - return returnMe; -} -- (SSKProtoAttachmentPointerBuilder*) mergeFrom:(SSKProtoAttachmentPointer*) other { - if (other == [SSKProtoAttachmentPointer defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasContentType) { - [self setContentType:other.contentType]; - } - if (other.hasKey) { - [self setKey:other.key]; - } - if (other.hasSize) { - [self setSize:other.size]; - } - if (other.hasThumbnail) { - [self setThumbnail:other.thumbnail]; - } - if (other.hasDigest) { - [self setDigest:other.digest]; - } - if (other.hasFileName) { - [self setFileName:other.fileName]; - } - if (other.hasFlags) { - [self setFlags:other.flags]; - } - if (other.hasWidth) { - [self setWidth:other.width]; - } - if (other.hasHeight) { - [self setHeight:other.height]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoAttachmentPointerBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 9: { - [self setId:[input readFixed64]]; - break; - } - case 18: { - [self setContentType:[input readString]]; - break; - } - case 26: { - [self setKey:[input readData]]; - break; - } - case 32: { - [self setSize:[input readUInt32]]; - break; - } - case 42: { - [self setThumbnail:[input readData]]; - break; - } - case 50: { - [self setDigest:[input readData]]; - break; - } - case 58: { - [self setFileName:[input readString]]; - break; - } - case 64: { - [self setFlags:[input readUInt32]]; - break; - } - case 72: { - [self setWidth:[input readUInt32]]; - break; - } - case 80: { - [self setHeight:[input readUInt32]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultAttachmentPointer.hasId; -} -- (UInt64) id { - return resultAttachmentPointer.id; -} -- (SSKProtoAttachmentPointerBuilder*) setId:(UInt64) value { - resultAttachmentPointer.hasId = YES; - resultAttachmentPointer.id = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearId { - resultAttachmentPointer.hasId = NO; - resultAttachmentPointer.id = 0L; - return self; -} -- (BOOL) hasContentType { - return resultAttachmentPointer.hasContentType; -} -- (NSString*) contentType { - return resultAttachmentPointer.contentType; -} -- (SSKProtoAttachmentPointerBuilder*) setContentType:(NSString*) value { - resultAttachmentPointer.hasContentType = YES; - resultAttachmentPointer.contentType = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearContentType { - resultAttachmentPointer.hasContentType = NO; - resultAttachmentPointer.contentType = @""; - return self; -} -- (BOOL) hasKey { - return resultAttachmentPointer.hasKey; -} -- (NSData*) key { - return resultAttachmentPointer.key; -} -- (SSKProtoAttachmentPointerBuilder*) setKey:(NSData*) value { - resultAttachmentPointer.hasKey = YES; - resultAttachmentPointer.key = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearKey { - resultAttachmentPointer.hasKey = NO; - resultAttachmentPointer.key = [NSData data]; - return self; -} -- (BOOL) hasSize { - return resultAttachmentPointer.hasSize; -} -- (UInt32) size { - return resultAttachmentPointer.size; -} -- (SSKProtoAttachmentPointerBuilder*) setSize:(UInt32) value { - resultAttachmentPointer.hasSize = YES; - resultAttachmentPointer.size = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearSize { - resultAttachmentPointer.hasSize = NO; - resultAttachmentPointer.size = 0; - return self; -} -- (BOOL) hasThumbnail { - return resultAttachmentPointer.hasThumbnail; -} -- (NSData*) thumbnail { - return resultAttachmentPointer.thumbnail; -} -- (SSKProtoAttachmentPointerBuilder*) setThumbnail:(NSData*) value { - resultAttachmentPointer.hasThumbnail = YES; - resultAttachmentPointer.thumbnail = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearThumbnail { - resultAttachmentPointer.hasThumbnail = NO; - resultAttachmentPointer.thumbnail = [NSData data]; - return self; -} -- (BOOL) hasDigest { - return resultAttachmentPointer.hasDigest; -} -- (NSData*) digest { - return resultAttachmentPointer.digest; -} -- (SSKProtoAttachmentPointerBuilder*) setDigest:(NSData*) value { - resultAttachmentPointer.hasDigest = YES; - resultAttachmentPointer.digest = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearDigest { - resultAttachmentPointer.hasDigest = NO; - resultAttachmentPointer.digest = [NSData data]; - return self; -} -- (BOOL) hasFileName { - return resultAttachmentPointer.hasFileName; -} -- (NSString*) fileName { - return resultAttachmentPointer.fileName; -} -- (SSKProtoAttachmentPointerBuilder*) setFileName:(NSString*) value { - resultAttachmentPointer.hasFileName = YES; - resultAttachmentPointer.fileName = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearFileName { - resultAttachmentPointer.hasFileName = NO; - resultAttachmentPointer.fileName = @""; - return self; -} -- (BOOL) hasFlags { - return resultAttachmentPointer.hasFlags; -} -- (UInt32) flags { - return resultAttachmentPointer.flags; -} -- (SSKProtoAttachmentPointerBuilder*) setFlags:(UInt32) value { - resultAttachmentPointer.hasFlags = YES; - resultAttachmentPointer.flags = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearFlags { - resultAttachmentPointer.hasFlags = NO; - resultAttachmentPointer.flags = 0; - return self; -} -- (BOOL) hasWidth { - return resultAttachmentPointer.hasWidth; -} -- (UInt32) width { - return resultAttachmentPointer.width; -} -- (SSKProtoAttachmentPointerBuilder*) setWidth:(UInt32) value { - resultAttachmentPointer.hasWidth = YES; - resultAttachmentPointer.width = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearWidth { - resultAttachmentPointer.hasWidth = NO; - resultAttachmentPointer.width = 0; - return self; -} -- (BOOL) hasHeight { - return resultAttachmentPointer.hasHeight; -} -- (UInt32) height { - return resultAttachmentPointer.height; -} -- (SSKProtoAttachmentPointerBuilder*) setHeight:(UInt32) value { - resultAttachmentPointer.hasHeight = YES; - resultAttachmentPointer.height = value; - return self; -} -- (SSKProtoAttachmentPointerBuilder*) clearHeight { - resultAttachmentPointer.hasHeight = NO; - resultAttachmentPointer.height = 0; - return self; -} -@end - -@interface SSKProtoGroupContext () -@property (strong) NSData* id; -@property SSKProtoGroupContextType type; -@property (strong) NSString* name; -@property (strong) NSMutableArray * membersArray; -@property (strong) SSKProtoAttachmentPointer* avatar; -@end - -@implementation SSKProtoGroupContext - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasType { - return !!hasType_; -} -- (void) setHasType:(BOOL) _value_ { - hasType_ = !!_value_; -} -@synthesize type; -- (BOOL) hasName { - return !!hasName_; -} -- (void) setHasName:(BOOL) _value_ { - hasName_ = !!_value_; -} -@synthesize name; -@synthesize membersArray; -@dynamic members; -- (BOOL) hasAvatar { - return !!hasAvatar_; -} -- (void) setHasAvatar:(BOOL) _value_ { - hasAvatar_ = !!_value_; -} -@synthesize avatar; -- (instancetype) init { - if ((self = [super init])) { - self.id = [NSData data]; - self.type = SSKProtoGroupContextTypeUnknown; - self.name = @""; - self.avatar = [SSKProtoAttachmentPointer defaultInstance]; - } - return self; -} -static SSKProtoGroupContext* defaultSSKProtoGroupContextInstance = nil; -+ (void) initialize { - if (self == [SSKProtoGroupContext class]) { - defaultSSKProtoGroupContextInstance = [[SSKProtoGroupContext alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoGroupContextInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoGroupContextInstance; -} -- (NSArray *)members { - return membersArray; -} -- (NSString*)membersAtIndex:(NSUInteger)index { - return [membersArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeData:1 value:self.id]; - } - if (self.hasType) { - [output writeEnum:2 value:self.type]; - } - if (self.hasName) { - [output writeString:3 value:self.name]; - } - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - [output writeString:4 value:element]; - }]; - if (self.hasAvatar) { - [output writeMessage:5 value:self.avatar]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeDataSize(1, self.id); - } - if (self.hasType) { - size_ += computeEnumSize(2, self.type); - } - if (self.hasName) { - size_ += computeStringSize(3, self.name); - } - { - __block SInt32 dataSize = 0; - const NSUInteger count = self.membersArray.count; - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - dataSize += computeStringSizeNoTag(element); - }]; - size_ += dataSize; - size_ += (SInt32)(1 * count); - } - if (self.hasAvatar) { - size_ += computeMessageSize(5, self.avatar); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoGroupContext*) parseFromData:(NSData*) data { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromData:data] build]; -} -+ (SSKProtoGroupContext*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupContext*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoGroupContext*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupContext*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoGroupContext*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupContext*)[[[SSKProtoGroupContext builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupContextBuilder*) builder { - return [[SSKProtoGroupContextBuilder alloc] init]; -} -+ (SSKProtoGroupContextBuilder*) builderWithPrototype:(SSKProtoGroupContext*) prototype { - return [[SSKProtoGroupContext builder] mergeFrom:prototype]; -} -- (SSKProtoGroupContextBuilder*) builder { - return [SSKProtoGroupContext builder]; -} -- (SSKProtoGroupContextBuilder*) toBuilder { - return [SSKProtoGroupContext builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", self.id]; - } - if (self.hasType) { - [output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromSSKProtoGroupContextType(self.type)]; - } - if (self.hasName) { - [output appendFormat:@"%@%@: %@\n", indent, @"name", self.name]; - } - [self.membersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@: %@\n", indent, @"members", obj]; - }]; - if (self.hasAvatar) { - [output appendFormat:@"%@%@ {\n", indent, @"avatar"]; - [self.avatar writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: self.id forKey: @"id"]; - } - if (self.hasType) { - [dictionary setObject: @(self.type) forKey: @"type"]; - } - if (self.hasName) { - [dictionary setObject: self.name forKey: @"name"]; - } - [dictionary setObject:self.members forKey: @"members"]; - if (self.hasAvatar) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.avatar storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"avatar"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoGroupContext class]]) { - return NO; - } - SSKProtoGroupContext *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || [self.id isEqual:otherMessage.id]) && - self.hasType == otherMessage.hasType && - (!self.hasType || self.type == otherMessage.type) && - self.hasName == otherMessage.hasName && - (!self.hasName || [self.name isEqual:otherMessage.name]) && - [self.membersArray isEqualToArray:otherMessage.membersArray] && - self.hasAvatar == otherMessage.hasAvatar && - (!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [self.id hash]; - } - if (self.hasType) { - hashCode = hashCode * 31 + self.type; - } - if (self.hasName) { - hashCode = hashCode * 31 + [self.name hash]; - } - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasAvatar) { - hashCode = hashCode * 31 + [self.avatar hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -BOOL SSKProtoGroupContextTypeIsValidValue(SSKProtoGroupContextType value) { - switch (value) { - case SSKProtoGroupContextTypeUnknown: - case SSKProtoGroupContextTypeUpdate: - case SSKProtoGroupContextTypeDeliver: - case SSKProtoGroupContextTypeQuit: - case SSKProtoGroupContextTypeRequestInfo: - return YES; - default: - return NO; - } -} -NSString *NSStringFromSSKProtoGroupContextType(SSKProtoGroupContextType value) { - switch (value) { - case SSKProtoGroupContextTypeUnknown: - return @"SSKProtoGroupContextTypeUnknown"; - case SSKProtoGroupContextTypeUpdate: - return @"SSKProtoGroupContextTypeUpdate"; - case SSKProtoGroupContextTypeDeliver: - return @"SSKProtoGroupContextTypeDeliver"; - case SSKProtoGroupContextTypeQuit: - return @"SSKProtoGroupContextTypeQuit"; - case SSKProtoGroupContextTypeRequestInfo: - return @"SSKProtoGroupContextTypeRequestInfo"; - default: - return nil; - } -} - -@interface SSKProtoGroupContextBuilder() -@property (strong) SSKProtoGroupContext* resultGroupContext; -@end - -@implementation SSKProtoGroupContextBuilder -@synthesize resultGroupContext; -- (instancetype) init { - if ((self = [super init])) { - self.resultGroupContext = [[SSKProtoGroupContext alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultGroupContext; -} -- (SSKProtoGroupContextBuilder*) clear { - self.resultGroupContext = [[SSKProtoGroupContext alloc] init]; - return self; -} -- (SSKProtoGroupContextBuilder*) clone { - return [SSKProtoGroupContext builderWithPrototype:resultGroupContext]; -} -- (SSKProtoGroupContext*) defaultInstance { - return [SSKProtoGroupContext defaultInstance]; -} -- (SSKProtoGroupContext*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoGroupContext*) buildPartial { - SSKProtoGroupContext* returnMe = resultGroupContext; - self.resultGroupContext = nil; - return returnMe; -} -- (SSKProtoGroupContextBuilder*) mergeFrom:(SSKProtoGroupContext*) other { - if (other == [SSKProtoGroupContext defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasType) { - [self setType:other.type]; - } - if (other.hasName) { - [self setName:other.name]; - } - if (other.membersArray.count > 0) { - if (resultGroupContext.membersArray == nil) { - resultGroupContext.membersArray = [[NSMutableArray alloc] initWithArray:other.membersArray]; - } else { - [resultGroupContext.membersArray addObjectsFromArray:other.membersArray]; - } - } - if (other.hasAvatar) { - [self mergeAvatar:other.avatar]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoGroupContextBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoGroupContextBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setId:[input readData]]; - break; - } - case 16: { - SSKProtoGroupContextType value = (SSKProtoGroupContextType)[input readEnum]; - if (SSKProtoGroupContextTypeIsValidValue(value)) { - [self setType:value]; - } else { - [unknownFields mergeVarintField:2 value:value]; - } - break; - } - case 26: { - [self setName:[input readString]]; - break; - } - case 34: { - [self addMembers:[input readString]]; - break; - } - case 42: { - SSKProtoAttachmentPointerBuilder* subBuilder = [SSKProtoAttachmentPointer builder]; - if (self.hasAvatar) { - [subBuilder mergeFrom:self.avatar]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAvatar:[subBuilder buildPartial]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultGroupContext.hasId; -} -- (NSData*) id { - return resultGroupContext.id; -} -- (SSKProtoGroupContextBuilder*) setId:(NSData*) value { - resultGroupContext.hasId = YES; - resultGroupContext.id = value; - return self; -} -- (SSKProtoGroupContextBuilder*) clearId { - resultGroupContext.hasId = NO; - resultGroupContext.id = [NSData data]; - return self; -} -- (BOOL) hasType { - return resultGroupContext.hasType; -} -- (SSKProtoGroupContextType) type { - return resultGroupContext.type; -} -- (SSKProtoGroupContextBuilder*) setType:(SSKProtoGroupContextType) value { - resultGroupContext.hasType = YES; - resultGroupContext.type = value; - return self; -} -- (SSKProtoGroupContextBuilder*) clearType { - resultGroupContext.hasType = NO; - resultGroupContext.type = SSKProtoGroupContextTypeUnknown; - return self; -} -- (BOOL) hasName { - return resultGroupContext.hasName; -} -- (NSString*) name { - return resultGroupContext.name; -} -- (SSKProtoGroupContextBuilder*) setName:(NSString*) value { - resultGroupContext.hasName = YES; - resultGroupContext.name = value; - return self; -} -- (SSKProtoGroupContextBuilder*) clearName { - resultGroupContext.hasName = NO; - resultGroupContext.name = @""; - return self; -} -- (NSMutableArray *)members { - return resultGroupContext.membersArray; -} -- (NSString*)membersAtIndex:(NSUInteger)index { - return [resultGroupContext membersAtIndex:index]; -} -- (SSKProtoGroupContextBuilder *)addMembers:(NSString*)value { - if (resultGroupContext.membersArray == nil) { - resultGroupContext.membersArray = [[NSMutableArray alloc]init]; - } - [resultGroupContext.membersArray addObject:value]; - return self; -} -- (SSKProtoGroupContextBuilder *)setMembersArray:(NSArray *)array { - resultGroupContext.membersArray = [[NSMutableArray alloc] initWithArray:array]; - return self; -} -- (SSKProtoGroupContextBuilder *)clearMembers { - resultGroupContext.membersArray = nil; - return self; -} -- (BOOL) hasAvatar { - return resultGroupContext.hasAvatar; -} -- (SSKProtoAttachmentPointer*) avatar { - return resultGroupContext.avatar; -} -- (SSKProtoGroupContextBuilder*) setAvatar:(SSKProtoAttachmentPointer*) value { - resultGroupContext.hasAvatar = YES; - resultGroupContext.avatar = value; - return self; -} -- (SSKProtoGroupContextBuilder*) setAvatarBuilder:(SSKProtoAttachmentPointerBuilder*) builderForValue { - return [self setAvatar:[builderForValue build]]; -} -- (SSKProtoGroupContextBuilder*) mergeAvatar:(SSKProtoAttachmentPointer*) value { - if (resultGroupContext.hasAvatar && - resultGroupContext.avatar != [SSKProtoAttachmentPointer defaultInstance]) { - resultGroupContext.avatar = - [[[SSKProtoAttachmentPointer builderWithPrototype:resultGroupContext.avatar] mergeFrom:value] buildPartial]; - } else { - resultGroupContext.avatar = value; - } - resultGroupContext.hasAvatar = YES; - return self; -} -- (SSKProtoGroupContextBuilder*) clearAvatar { - resultGroupContext.hasAvatar = NO; - resultGroupContext.avatar = [SSKProtoAttachmentPointer defaultInstance]; - return self; -} -@end - -@interface SSKProtoContactDetails () -@property (strong) NSString* number; -@property (strong) NSString* name; -@property (strong) SSKProtoContactDetailsAvatar* avatar; -@property (strong) NSString* color; -@property (strong) SSKProtoVerified* verified; -@property (strong) NSData* profileKey; -@property BOOL blocked; -@property UInt32 expireTimer; -@end - -@implementation SSKProtoContactDetails - -- (BOOL) hasNumber { - return !!hasNumber_; -} -- (void) setHasNumber:(BOOL) _value_ { - hasNumber_ = !!_value_; -} -@synthesize number; -- (BOOL) hasName { - return !!hasName_; -} -- (void) setHasName:(BOOL) _value_ { - hasName_ = !!_value_; -} -@synthesize name; -- (BOOL) hasAvatar { - return !!hasAvatar_; -} -- (void) setHasAvatar:(BOOL) _value_ { - hasAvatar_ = !!_value_; -} -@synthesize avatar; -- (BOOL) hasColor { - return !!hasColor_; -} -- (void) setHasColor:(BOOL) _value_ { - hasColor_ = !!_value_; -} -@synthesize color; -- (BOOL) hasVerified { - return !!hasVerified_; -} -- (void) setHasVerified:(BOOL) _value_ { - hasVerified_ = !!_value_; -} -@synthesize verified; -- (BOOL) hasProfileKey { - return !!hasProfileKey_; -} -- (void) setHasProfileKey:(BOOL) _value_ { - hasProfileKey_ = !!_value_; -} -@synthesize profileKey; -- (BOOL) hasBlocked { - return !!hasBlocked_; -} -- (void) setHasBlocked:(BOOL) _value_ { - hasBlocked_ = !!_value_; -} -- (BOOL) blocked { - return !!blocked_; -} -- (void) setBlocked:(BOOL) _value_ { - blocked_ = !!_value_; -} -- (BOOL) hasExpireTimer { - return !!hasExpireTimer_; -} -- (void) setHasExpireTimer:(BOOL) _value_ { - hasExpireTimer_ = !!_value_; -} -@synthesize expireTimer; -- (instancetype) init { - if ((self = [super init])) { - self.number = @""; - self.name = @""; - self.avatar = [SSKProtoContactDetailsAvatar defaultInstance]; - self.color = @""; - self.verified = [SSKProtoVerified defaultInstance]; - self.profileKey = [NSData data]; - self.blocked = NO; - self.expireTimer = 0; - } - return self; -} -static SSKProtoContactDetails* defaultSSKProtoContactDetailsInstance = nil; -+ (void) initialize { - if (self == [SSKProtoContactDetails class]) { - defaultSSKProtoContactDetailsInstance = [[SSKProtoContactDetails alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoContactDetailsInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoContactDetailsInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasNumber) { - [output writeString:1 value:self.number]; - } - if (self.hasName) { - [output writeString:2 value:self.name]; - } - if (self.hasAvatar) { - [output writeMessage:3 value:self.avatar]; - } - if (self.hasColor) { - [output writeString:4 value:self.color]; - } - if (self.hasVerified) { - [output writeMessage:5 value:self.verified]; - } - if (self.hasProfileKey) { - [output writeData:6 value:self.profileKey]; - } - if (self.hasBlocked) { - [output writeBool:7 value:self.blocked]; - } - if (self.hasExpireTimer) { - [output writeUInt32:8 value:self.expireTimer]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasNumber) { - size_ += computeStringSize(1, self.number); - } - if (self.hasName) { - size_ += computeStringSize(2, self.name); - } - if (self.hasAvatar) { - size_ += computeMessageSize(3, self.avatar); - } - if (self.hasColor) { - size_ += computeStringSize(4, self.color); - } - if (self.hasVerified) { - size_ += computeMessageSize(5, self.verified); - } - if (self.hasProfileKey) { - size_ += computeDataSize(6, self.profileKey); - } - if (self.hasBlocked) { - size_ += computeBoolSize(7, self.blocked); - } - if (self.hasExpireTimer) { - size_ += computeUInt32Size(8, self.expireTimer); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoContactDetails*) parseFromData:(NSData*) data { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromData:data] build]; -} -+ (SSKProtoContactDetails*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetails*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoContactDetails*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoContactDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetails*)[[[SSKProtoContactDetails builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetailsBuilder*) builder { - return [[SSKProtoContactDetailsBuilder alloc] init]; -} -+ (SSKProtoContactDetailsBuilder*) builderWithPrototype:(SSKProtoContactDetails*) prototype { - return [[SSKProtoContactDetails builder] mergeFrom:prototype]; -} -- (SSKProtoContactDetailsBuilder*) builder { - return [SSKProtoContactDetails builder]; -} -- (SSKProtoContactDetailsBuilder*) toBuilder { - return [SSKProtoContactDetails builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasNumber) { - [output appendFormat:@"%@%@: %@\n", indent, @"number", self.number]; - } - if (self.hasName) { - [output appendFormat:@"%@%@: %@\n", indent, @"name", self.name]; - } - if (self.hasAvatar) { - [output appendFormat:@"%@%@ {\n", indent, @"avatar"]; - [self.avatar writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasColor) { - [output appendFormat:@"%@%@: %@\n", indent, @"color", self.color]; - } - if (self.hasVerified) { - [output appendFormat:@"%@%@ {\n", indent, @"verified"]; - [self.verified writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasProfileKey) { - [output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey]; - } - if (self.hasBlocked) { - [output appendFormat:@"%@%@: %@\n", indent, @"blocked", [NSNumber numberWithBool:self.blocked]]; - } - if (self.hasExpireTimer) { - [output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasNumber) { - [dictionary setObject: self.number forKey: @"number"]; - } - if (self.hasName) { - [dictionary setObject: self.name forKey: @"name"]; - } - if (self.hasAvatar) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.avatar storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"avatar"]; - } - if (self.hasColor) { - [dictionary setObject: self.color forKey: @"color"]; - } - if (self.hasVerified) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.verified storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"verified"]; - } - if (self.hasProfileKey) { - [dictionary setObject: self.profileKey forKey: @"profileKey"]; - } - if (self.hasBlocked) { - [dictionary setObject: [NSNumber numberWithBool:self.blocked] forKey: @"blocked"]; - } - if (self.hasExpireTimer) { - [dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoContactDetails class]]) { - return NO; - } - SSKProtoContactDetails *otherMessage = other; - return - self.hasNumber == otherMessage.hasNumber && - (!self.hasNumber || [self.number isEqual:otherMessage.number]) && - self.hasName == otherMessage.hasName && - (!self.hasName || [self.name isEqual:otherMessage.name]) && - self.hasAvatar == otherMessage.hasAvatar && - (!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) && - self.hasColor == otherMessage.hasColor && - (!self.hasColor || [self.color isEqual:otherMessage.color]) && - self.hasVerified == otherMessage.hasVerified && - (!self.hasVerified || [self.verified isEqual:otherMessage.verified]) && - self.hasProfileKey == otherMessage.hasProfileKey && - (!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) && - self.hasBlocked == otherMessage.hasBlocked && - (!self.hasBlocked || self.blocked == otherMessage.blocked) && - self.hasExpireTimer == otherMessage.hasExpireTimer && - (!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasNumber) { - hashCode = hashCode * 31 + [self.number hash]; - } - if (self.hasName) { - hashCode = hashCode * 31 + [self.name hash]; - } - if (self.hasAvatar) { - hashCode = hashCode * 31 + [self.avatar hash]; - } - if (self.hasColor) { - hashCode = hashCode * 31 + [self.color hash]; - } - if (self.hasVerified) { - hashCode = hashCode * 31 + [self.verified hash]; - } - if (self.hasProfileKey) { - hashCode = hashCode * 31 + [self.profileKey hash]; - } - if (self.hasBlocked) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.blocked] hash]; - } - if (self.hasExpireTimer) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoContactDetailsAvatar () -@property (strong) NSString* contentType; -@property UInt32 length; -@end - -@implementation SSKProtoContactDetailsAvatar - -- (BOOL) hasContentType { - return !!hasContentType_; -} -- (void) setHasContentType:(BOOL) _value_ { - hasContentType_ = !!_value_; -} -@synthesize contentType; -- (BOOL) hasLength { - return !!hasLength_; -} -- (void) setHasLength:(BOOL) _value_ { - hasLength_ = !!_value_; -} -@synthesize length; -- (instancetype) init { - if ((self = [super init])) { - self.contentType = @""; - self.length = 0; - } - return self; -} -static SSKProtoContactDetailsAvatar* defaultSSKProtoContactDetailsAvatarInstance = nil; -+ (void) initialize { - if (self == [SSKProtoContactDetailsAvatar class]) { - defaultSSKProtoContactDetailsAvatarInstance = [[SSKProtoContactDetailsAvatar alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoContactDetailsAvatarInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoContactDetailsAvatarInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasContentType) { - [output writeString:1 value:self.contentType]; - } - if (self.hasLength) { - [output writeUInt32:2 value:self.length]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasContentType) { - size_ += computeStringSize(1, self.contentType); - } - if (self.hasLength) { - size_ += computeUInt32Size(2, self.length); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoContactDetailsAvatar*) parseFromData:(NSData*) data { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromData:data] build]; -} -+ (SSKProtoContactDetailsAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetailsAvatar*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoContactDetailsAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoContactDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoContactDetailsAvatar*)[[[SSKProtoContactDetailsAvatar builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoContactDetailsAvatarBuilder*) builder { - return [[SSKProtoContactDetailsAvatarBuilder alloc] init]; -} -+ (SSKProtoContactDetailsAvatarBuilder*) builderWithPrototype:(SSKProtoContactDetailsAvatar*) prototype { - return [[SSKProtoContactDetailsAvatar builder] mergeFrom:prototype]; -} -- (SSKProtoContactDetailsAvatarBuilder*) builder { - return [SSKProtoContactDetailsAvatar builder]; -} -- (SSKProtoContactDetailsAvatarBuilder*) toBuilder { - return [SSKProtoContactDetailsAvatar builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasContentType) { - [output appendFormat:@"%@%@: %@\n", indent, @"contentType", self.contentType]; - } - if (self.hasLength) { - [output appendFormat:@"%@%@: %@\n", indent, @"length", [NSNumber numberWithInteger:self.length]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasContentType) { - [dictionary setObject: self.contentType forKey: @"contentType"]; - } - if (self.hasLength) { - [dictionary setObject: [NSNumber numberWithInteger:self.length] forKey: @"length"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoContactDetailsAvatar class]]) { - return NO; - } - SSKProtoContactDetailsAvatar *otherMessage = other; - return - self.hasContentType == otherMessage.hasContentType && - (!self.hasContentType || [self.contentType isEqual:otherMessage.contentType]) && - self.hasLength == otherMessage.hasLength && - (!self.hasLength || self.length == otherMessage.length) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasContentType) { - hashCode = hashCode * 31 + [self.contentType hash]; - } - if (self.hasLength) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.length] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoContactDetailsAvatarBuilder() -@property (strong) SSKProtoContactDetailsAvatar* resultAvatar; -@end - -@implementation SSKProtoContactDetailsAvatarBuilder -@synthesize resultAvatar; -- (instancetype) init { - if ((self = [super init])) { - self.resultAvatar = [[SSKProtoContactDetailsAvatar alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultAvatar; -} -- (SSKProtoContactDetailsAvatarBuilder*) clear { - self.resultAvatar = [[SSKProtoContactDetailsAvatar alloc] init]; - return self; -} -- (SSKProtoContactDetailsAvatarBuilder*) clone { - return [SSKProtoContactDetailsAvatar builderWithPrototype:resultAvatar]; -} -- (SSKProtoContactDetailsAvatar*) defaultInstance { - return [SSKProtoContactDetailsAvatar defaultInstance]; -} -- (SSKProtoContactDetailsAvatar*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoContactDetailsAvatar*) buildPartial { - SSKProtoContactDetailsAvatar* returnMe = resultAvatar; - self.resultAvatar = nil; - return returnMe; -} -- (SSKProtoContactDetailsAvatarBuilder*) mergeFrom:(SSKProtoContactDetailsAvatar*) other { - if (other == [SSKProtoContactDetailsAvatar defaultInstance]) { - return self; - } - if (other.hasContentType) { - [self setContentType:other.contentType]; - } - if (other.hasLength) { - [self setLength:other.length]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoContactDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoContactDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setContentType:[input readString]]; - break; - } - case 16: { - [self setLength:[input readUInt32]]; - break; - } - } - } -} -- (BOOL) hasContentType { - return resultAvatar.hasContentType; -} -- (NSString*) contentType { - return resultAvatar.contentType; -} -- (SSKProtoContactDetailsAvatarBuilder*) setContentType:(NSString*) value { - resultAvatar.hasContentType = YES; - resultAvatar.contentType = value; - return self; -} -- (SSKProtoContactDetailsAvatarBuilder*) clearContentType { - resultAvatar.hasContentType = NO; - resultAvatar.contentType = @""; - return self; -} -- (BOOL) hasLength { - return resultAvatar.hasLength; -} -- (UInt32) length { - return resultAvatar.length; -} -- (SSKProtoContactDetailsAvatarBuilder*) setLength:(UInt32) value { - resultAvatar.hasLength = YES; - resultAvatar.length = value; - return self; -} -- (SSKProtoContactDetailsAvatarBuilder*) clearLength { - resultAvatar.hasLength = NO; - resultAvatar.length = 0; - return self; -} -@end - -@interface SSKProtoContactDetailsBuilder() -@property (strong) SSKProtoContactDetails* resultContactDetails; -@end - -@implementation SSKProtoContactDetailsBuilder -@synthesize resultContactDetails; -- (instancetype) init { - if ((self = [super init])) { - self.resultContactDetails = [[SSKProtoContactDetails alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultContactDetails; -} -- (SSKProtoContactDetailsBuilder*) clear { - self.resultContactDetails = [[SSKProtoContactDetails alloc] init]; - return self; -} -- (SSKProtoContactDetailsBuilder*) clone { - return [SSKProtoContactDetails builderWithPrototype:resultContactDetails]; -} -- (SSKProtoContactDetails*) defaultInstance { - return [SSKProtoContactDetails defaultInstance]; -} -- (SSKProtoContactDetails*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoContactDetails*) buildPartial { - SSKProtoContactDetails* returnMe = resultContactDetails; - self.resultContactDetails = nil; - return returnMe; -} -- (SSKProtoContactDetailsBuilder*) mergeFrom:(SSKProtoContactDetails*) other { - if (other == [SSKProtoContactDetails defaultInstance]) { - return self; - } - if (other.hasNumber) { - [self setNumber:other.number]; - } - if (other.hasName) { - [self setName:other.name]; - } - if (other.hasAvatar) { - [self mergeAvatar:other.avatar]; - } - if (other.hasColor) { - [self setColor:other.color]; - } - if (other.hasVerified) { - [self mergeVerified:other.verified]; - } - if (other.hasProfileKey) { - [self setProfileKey:other.profileKey]; - } - if (other.hasBlocked) { - [self setBlocked:other.blocked]; - } - if (other.hasExpireTimer) { - [self setExpireTimer:other.expireTimer]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoContactDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoContactDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setNumber:[input readString]]; - break; - } - case 18: { - [self setName:[input readString]]; - break; - } - case 26: { - SSKProtoContactDetailsAvatarBuilder* subBuilder = [SSKProtoContactDetailsAvatar builder]; - if (self.hasAvatar) { - [subBuilder mergeFrom:self.avatar]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAvatar:[subBuilder buildPartial]]; - break; - } - case 34: { - [self setColor:[input readString]]; - break; - } - case 42: { - SSKProtoVerifiedBuilder* subBuilder = [SSKProtoVerified builder]; - if (self.hasVerified) { - [subBuilder mergeFrom:self.verified]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setVerified:[subBuilder buildPartial]]; - break; - } - case 50: { - [self setProfileKey:[input readData]]; - break; - } - case 56: { - [self setBlocked:[input readBool]]; - break; - } - case 64: { - [self setExpireTimer:[input readUInt32]]; - break; - } - } - } -} -- (BOOL) hasNumber { - return resultContactDetails.hasNumber; -} -- (NSString*) number { - return resultContactDetails.number; -} -- (SSKProtoContactDetailsBuilder*) setNumber:(NSString*) value { - resultContactDetails.hasNumber = YES; - resultContactDetails.number = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearNumber { - resultContactDetails.hasNumber = NO; - resultContactDetails.number = @""; - return self; -} -- (BOOL) hasName { - return resultContactDetails.hasName; -} -- (NSString*) name { - return resultContactDetails.name; -} -- (SSKProtoContactDetailsBuilder*) setName:(NSString*) value { - resultContactDetails.hasName = YES; - resultContactDetails.name = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearName { - resultContactDetails.hasName = NO; - resultContactDetails.name = @""; - return self; -} -- (BOOL) hasAvatar { - return resultContactDetails.hasAvatar; -} -- (SSKProtoContactDetailsAvatar*) avatar { - return resultContactDetails.avatar; -} -- (SSKProtoContactDetailsBuilder*) setAvatar:(SSKProtoContactDetailsAvatar*) value { - resultContactDetails.hasAvatar = YES; - resultContactDetails.avatar = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) setAvatarBuilder:(SSKProtoContactDetailsAvatarBuilder*) builderForValue { - return [self setAvatar:[builderForValue build]]; -} -- (SSKProtoContactDetailsBuilder*) mergeAvatar:(SSKProtoContactDetailsAvatar*) value { - if (resultContactDetails.hasAvatar && - resultContactDetails.avatar != [SSKProtoContactDetailsAvatar defaultInstance]) { - resultContactDetails.avatar = - [[[SSKProtoContactDetailsAvatar builderWithPrototype:resultContactDetails.avatar] mergeFrom:value] buildPartial]; - } else { - resultContactDetails.avatar = value; - } - resultContactDetails.hasAvatar = YES; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearAvatar { - resultContactDetails.hasAvatar = NO; - resultContactDetails.avatar = [SSKProtoContactDetailsAvatar defaultInstance]; - return self; -} -- (BOOL) hasColor { - return resultContactDetails.hasColor; -} -- (NSString*) color { - return resultContactDetails.color; -} -- (SSKProtoContactDetailsBuilder*) setColor:(NSString*) value { - resultContactDetails.hasColor = YES; - resultContactDetails.color = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearColor { - resultContactDetails.hasColor = NO; - resultContactDetails.color = @""; - return self; -} -- (BOOL) hasVerified { - return resultContactDetails.hasVerified; -} -- (SSKProtoVerified*) verified { - return resultContactDetails.verified; -} -- (SSKProtoContactDetailsBuilder*) setVerified:(SSKProtoVerified*) value { - resultContactDetails.hasVerified = YES; - resultContactDetails.verified = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) setVerifiedBuilder:(SSKProtoVerifiedBuilder*) builderForValue { - return [self setVerified:[builderForValue build]]; -} -- (SSKProtoContactDetailsBuilder*) mergeVerified:(SSKProtoVerified*) value { - if (resultContactDetails.hasVerified && - resultContactDetails.verified != [SSKProtoVerified defaultInstance]) { - resultContactDetails.verified = - [[[SSKProtoVerified builderWithPrototype:resultContactDetails.verified] mergeFrom:value] buildPartial]; - } else { - resultContactDetails.verified = value; - } - resultContactDetails.hasVerified = YES; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearVerified { - resultContactDetails.hasVerified = NO; - resultContactDetails.verified = [SSKProtoVerified defaultInstance]; - return self; -} -- (BOOL) hasProfileKey { - return resultContactDetails.hasProfileKey; -} -- (NSData*) profileKey { - return resultContactDetails.profileKey; -} -- (SSKProtoContactDetailsBuilder*) setProfileKey:(NSData*) value { - resultContactDetails.hasProfileKey = YES; - resultContactDetails.profileKey = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearProfileKey { - resultContactDetails.hasProfileKey = NO; - resultContactDetails.profileKey = [NSData data]; - return self; -} -- (BOOL) hasBlocked { - return resultContactDetails.hasBlocked; -} -- (BOOL) blocked { - return resultContactDetails.blocked; -} -- (SSKProtoContactDetailsBuilder*) setBlocked:(BOOL) value { - resultContactDetails.hasBlocked = YES; - resultContactDetails.blocked = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearBlocked { - resultContactDetails.hasBlocked = NO; - resultContactDetails.blocked = NO; - return self; -} -- (BOOL) hasExpireTimer { - return resultContactDetails.hasExpireTimer; -} -- (UInt32) expireTimer { - return resultContactDetails.expireTimer; -} -- (SSKProtoContactDetailsBuilder*) setExpireTimer:(UInt32) value { - resultContactDetails.hasExpireTimer = YES; - resultContactDetails.expireTimer = value; - return self; -} -- (SSKProtoContactDetailsBuilder*) clearExpireTimer { - resultContactDetails.hasExpireTimer = NO; - resultContactDetails.expireTimer = 0; - return self; -} -@end - -@interface SSKProtoGroupDetails () -@property (strong) NSData* id; -@property (strong) NSString* name; -@property (strong) NSMutableArray * membersArray; -@property (strong) SSKProtoGroupDetailsAvatar* avatar; -@property BOOL active; -@property UInt32 expireTimer; -@property (strong) NSString* color; -@end - -@implementation SSKProtoGroupDetails - -- (BOOL) hasId { - return !!hasId_; -} -- (void) setHasId:(BOOL) _value_ { - hasId_ = !!_value_; -} -@synthesize id; -- (BOOL) hasName { - return !!hasName_; -} -- (void) setHasName:(BOOL) _value_ { - hasName_ = !!_value_; -} -@synthesize name; -@synthesize membersArray; -@dynamic members; -- (BOOL) hasAvatar { - return !!hasAvatar_; -} -- (void) setHasAvatar:(BOOL) _value_ { - hasAvatar_ = !!_value_; -} -@synthesize avatar; -- (BOOL) hasActive { - return !!hasActive_; -} -- (void) setHasActive:(BOOL) _value_ { - hasActive_ = !!_value_; -} -- (BOOL) active { - return !!active_; -} -- (void) setActive:(BOOL) _value_ { - active_ = !!_value_; -} -- (BOOL) hasExpireTimer { - return !!hasExpireTimer_; -} -- (void) setHasExpireTimer:(BOOL) _value_ { - hasExpireTimer_ = !!_value_; -} -@synthesize expireTimer; -- (BOOL) hasColor { - return !!hasColor_; -} -- (void) setHasColor:(BOOL) _value_ { - hasColor_ = !!_value_; -} -@synthesize color; -- (instancetype) init { - if ((self = [super init])) { - self.id = [NSData data]; - self.name = @""; - self.avatar = [SSKProtoGroupDetailsAvatar defaultInstance]; - self.active = YES; - self.expireTimer = 0; - self.color = @""; - } - return self; -} -static SSKProtoGroupDetails* defaultSSKProtoGroupDetailsInstance = nil; -+ (void) initialize { - if (self == [SSKProtoGroupDetails class]) { - defaultSSKProtoGroupDetailsInstance = [[SSKProtoGroupDetails alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoGroupDetailsInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoGroupDetailsInstance; -} -- (NSArray *)members { - return membersArray; -} -- (NSString*)membersAtIndex:(NSUInteger)index { - return [membersArray objectAtIndex:index]; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasId) { - [output writeData:1 value:self.id]; - } - if (self.hasName) { - [output writeString:2 value:self.name]; - } - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - [output writeString:3 value:element]; - }]; - if (self.hasAvatar) { - [output writeMessage:4 value:self.avatar]; - } - if (self.hasActive) { - [output writeBool:5 value:self.active]; - } - if (self.hasExpireTimer) { - [output writeUInt32:6 value:self.expireTimer]; - } - if (self.hasColor) { - [output writeString:7 value:self.color]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasId) { - size_ += computeDataSize(1, self.id); - } - if (self.hasName) { - size_ += computeStringSize(2, self.name); - } - { - __block SInt32 dataSize = 0; - const NSUInteger count = self.membersArray.count; - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - dataSize += computeStringSizeNoTag(element); - }]; - size_ += dataSize; - size_ += (SInt32)(1 * count); - } - if (self.hasAvatar) { - size_ += computeMessageSize(4, self.avatar); - } - if (self.hasActive) { - size_ += computeBoolSize(5, self.active); - } - if (self.hasExpireTimer) { - size_ += computeUInt32Size(6, self.expireTimer); - } - if (self.hasColor) { - size_ += computeStringSize(7, self.color); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoGroupDetails*) parseFromData:(NSData*) data { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromData:data] build]; -} -+ (SSKProtoGroupDetails*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetails*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoGroupDetails*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoGroupDetails*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetails*)[[[SSKProtoGroupDetails builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetailsBuilder*) builder { - return [[SSKProtoGroupDetailsBuilder alloc] init]; -} -+ (SSKProtoGroupDetailsBuilder*) builderWithPrototype:(SSKProtoGroupDetails*) prototype { - return [[SSKProtoGroupDetails builder] mergeFrom:prototype]; -} -- (SSKProtoGroupDetailsBuilder*) builder { - return [SSKProtoGroupDetails builder]; -} -- (SSKProtoGroupDetailsBuilder*) toBuilder { - return [SSKProtoGroupDetails builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasId) { - [output appendFormat:@"%@%@: %@\n", indent, @"id", self.id]; - } - if (self.hasName) { - [output appendFormat:@"%@%@: %@\n", indent, @"name", self.name]; - } - [self.membersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - [output appendFormat:@"%@%@: %@\n", indent, @"members", obj]; - }]; - if (self.hasAvatar) { - [output appendFormat:@"%@%@ {\n", indent, @"avatar"]; - [self.avatar writeDescriptionTo:output - withIndent:[NSString stringWithFormat:@"%@ ", indent]]; - [output appendFormat:@"%@}\n", indent]; - } - if (self.hasActive) { - [output appendFormat:@"%@%@: %@\n", indent, @"active", [NSNumber numberWithBool:self.active]]; - } - if (self.hasExpireTimer) { - [output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]]; - } - if (self.hasColor) { - [output appendFormat:@"%@%@: %@\n", indent, @"color", self.color]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasId) { - [dictionary setObject: self.id forKey: @"id"]; - } - if (self.hasName) { - [dictionary setObject: self.name forKey: @"name"]; - } - [dictionary setObject:self.members forKey: @"members"]; - if (self.hasAvatar) { - NSMutableDictionary *messageDictionary = [NSMutableDictionary dictionary]; - [self.avatar storeInDictionary:messageDictionary]; - [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"avatar"]; - } - if (self.hasActive) { - [dictionary setObject: [NSNumber numberWithBool:self.active] forKey: @"active"]; - } - if (self.hasExpireTimer) { - [dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"]; - } - if (self.hasColor) { - [dictionary setObject: self.color forKey: @"color"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoGroupDetails class]]) { - return NO; - } - SSKProtoGroupDetails *otherMessage = other; - return - self.hasId == otherMessage.hasId && - (!self.hasId || [self.id isEqual:otherMessage.id]) && - self.hasName == otherMessage.hasName && - (!self.hasName || [self.name isEqual:otherMessage.name]) && - [self.membersArray isEqualToArray:otherMessage.membersArray] && - self.hasAvatar == otherMessage.hasAvatar && - (!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) && - self.hasActive == otherMessage.hasActive && - (!self.hasActive || self.active == otherMessage.active) && - self.hasExpireTimer == otherMessage.hasExpireTimer && - (!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) && - self.hasColor == otherMessage.hasColor && - (!self.hasColor || [self.color isEqual:otherMessage.color]) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasId) { - hashCode = hashCode * 31 + [self.id hash]; - } - if (self.hasName) { - hashCode = hashCode * 31 + [self.name hash]; - } - [self.membersArray enumerateObjectsUsingBlock:^(NSString *element, NSUInteger idx, BOOL *stop) { - hashCode = hashCode * 31 + [element hash]; - }]; - if (self.hasAvatar) { - hashCode = hashCode * 31 + [self.avatar hash]; - } - if (self.hasActive) { - hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.active] hash]; - } - if (self.hasExpireTimer) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash]; - } - if (self.hasColor) { - hashCode = hashCode * 31 + [self.color hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoGroupDetailsAvatar () -@property (strong) NSString* contentType; -@property UInt32 length; -@end - -@implementation SSKProtoGroupDetailsAvatar - -- (BOOL) hasContentType { - return !!hasContentType_; -} -- (void) setHasContentType:(BOOL) _value_ { - hasContentType_ = !!_value_; -} -@synthesize contentType; -- (BOOL) hasLength { - return !!hasLength_; -} -- (void) setHasLength:(BOOL) _value_ { - hasLength_ = !!_value_; -} -@synthesize length; -- (instancetype) init { - if ((self = [super init])) { - self.contentType = @""; - self.length = 0; - } - return self; -} -static SSKProtoGroupDetailsAvatar* defaultSSKProtoGroupDetailsAvatarInstance = nil; -+ (void) initialize { - if (self == [SSKProtoGroupDetailsAvatar class]) { - defaultSSKProtoGroupDetailsAvatarInstance = [[SSKProtoGroupDetailsAvatar alloc] init]; - } -} -+ (instancetype) defaultInstance { - return defaultSSKProtoGroupDetailsAvatarInstance; -} -- (instancetype) defaultInstance { - return defaultSSKProtoGroupDetailsAvatarInstance; -} -- (BOOL) isInitialized { - return YES; -} -- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { - if (self.hasContentType) { - [output writeString:1 value:self.contentType]; - } - if (self.hasLength) { - [output writeUInt32:2 value:self.length]; - } - [self.unknownFields writeToCodedOutputStream:output]; -} -- (SInt32) serializedSize { - __block SInt32 size_ = memoizedSerializedSize; - if (size_ != -1) { - return size_; - } - - size_ = 0; - if (self.hasContentType) { - size_ += computeStringSize(1, self.contentType); - } - if (self.hasLength) { - size_ += computeUInt32Size(2, self.length); - } - size_ += self.unknownFields.serializedSize; - memoizedSerializedSize = size_; - return size_; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromData:(NSData*) data { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromData:data] build]; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromInputStream:(NSInputStream*) input { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromInputStream:input] build]; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromCodedInputStream:input] build]; -} -+ (SSKProtoGroupDetailsAvatar*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - return (SSKProtoGroupDetailsAvatar*)[[[SSKProtoGroupDetailsAvatar builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; -} -+ (SSKProtoGroupDetailsAvatarBuilder*) builder { - return [[SSKProtoGroupDetailsAvatarBuilder alloc] init]; -} -+ (SSKProtoGroupDetailsAvatarBuilder*) builderWithPrototype:(SSKProtoGroupDetailsAvatar*) prototype { - return [[SSKProtoGroupDetailsAvatar builder] mergeFrom:prototype]; -} -- (SSKProtoGroupDetailsAvatarBuilder*) builder { - return [SSKProtoGroupDetailsAvatar builder]; -} -- (SSKProtoGroupDetailsAvatarBuilder*) toBuilder { - return [SSKProtoGroupDetailsAvatar builderWithPrototype:self]; -} -- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { - if (self.hasContentType) { - [output appendFormat:@"%@%@: %@\n", indent, @"contentType", self.contentType]; - } - if (self.hasLength) { - [output appendFormat:@"%@%@: %@\n", indent, @"length", [NSNumber numberWithInteger:self.length]]; - } - [self.unknownFields writeDescriptionTo:output withIndent:indent]; -} -- (void) storeInDictionary:(NSMutableDictionary *)dictionary { - if (self.hasContentType) { - [dictionary setObject: self.contentType forKey: @"contentType"]; - } - if (self.hasLength) { - [dictionary setObject: [NSNumber numberWithInteger:self.length] forKey: @"length"]; - } - [self.unknownFields storeInDictionary:dictionary]; -} -- (BOOL) isEqual:(id)other { - if (other == self) { - return YES; - } - if (![other isKindOfClass:[SSKProtoGroupDetailsAvatar class]]) { - return NO; - } - SSKProtoGroupDetailsAvatar *otherMessage = other; - return - self.hasContentType == otherMessage.hasContentType && - (!self.hasContentType || [self.contentType isEqual:otherMessage.contentType]) && - self.hasLength == otherMessage.hasLength && - (!self.hasLength || self.length == otherMessage.length) && - (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); -} -- (NSUInteger) hash { - __block NSUInteger hashCode = 7; - if (self.hasContentType) { - hashCode = hashCode * 31 + [self.contentType hash]; - } - if (self.hasLength) { - hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.length] hash]; - } - hashCode = hashCode * 31 + [self.unknownFields hash]; - return hashCode; -} -@end - -@interface SSKProtoGroupDetailsAvatarBuilder() -@property (strong) SSKProtoGroupDetailsAvatar* resultAvatar; -@end - -@implementation SSKProtoGroupDetailsAvatarBuilder -@synthesize resultAvatar; -- (instancetype) init { - if ((self = [super init])) { - self.resultAvatar = [[SSKProtoGroupDetailsAvatar alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultAvatar; -} -- (SSKProtoGroupDetailsAvatarBuilder*) clear { - self.resultAvatar = [[SSKProtoGroupDetailsAvatar alloc] init]; - return self; -} -- (SSKProtoGroupDetailsAvatarBuilder*) clone { - return [SSKProtoGroupDetailsAvatar builderWithPrototype:resultAvatar]; -} -- (SSKProtoGroupDetailsAvatar*) defaultInstance { - return [SSKProtoGroupDetailsAvatar defaultInstance]; -} -- (SSKProtoGroupDetailsAvatar*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoGroupDetailsAvatar*) buildPartial { - SSKProtoGroupDetailsAvatar* returnMe = resultAvatar; - self.resultAvatar = nil; - return returnMe; -} -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFrom:(SSKProtoGroupDetailsAvatar*) other { - if (other == [SSKProtoGroupDetailsAvatar defaultInstance]) { - return self; - } - if (other.hasContentType) { - [self setContentType:other.contentType]; - } - if (other.hasLength) { - [self setLength:other.length]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoGroupDetailsAvatarBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setContentType:[input readString]]; - break; - } - case 16: { - [self setLength:[input readUInt32]]; - break; - } - } - } -} -- (BOOL) hasContentType { - return resultAvatar.hasContentType; -} -- (NSString*) contentType { - return resultAvatar.contentType; -} -- (SSKProtoGroupDetailsAvatarBuilder*) setContentType:(NSString*) value { - resultAvatar.hasContentType = YES; - resultAvatar.contentType = value; - return self; -} -- (SSKProtoGroupDetailsAvatarBuilder*) clearContentType { - resultAvatar.hasContentType = NO; - resultAvatar.contentType = @""; - return self; -} -- (BOOL) hasLength { - return resultAvatar.hasLength; -} -- (UInt32) length { - return resultAvatar.length; -} -- (SSKProtoGroupDetailsAvatarBuilder*) setLength:(UInt32) value { - resultAvatar.hasLength = YES; - resultAvatar.length = value; - return self; -} -- (SSKProtoGroupDetailsAvatarBuilder*) clearLength { - resultAvatar.hasLength = NO; - resultAvatar.length = 0; - return self; -} -@end - -@interface SSKProtoGroupDetailsBuilder() -@property (strong) SSKProtoGroupDetails* resultGroupDetails; -@end - -@implementation SSKProtoGroupDetailsBuilder -@synthesize resultGroupDetails; -- (instancetype) init { - if ((self = [super init])) { - self.resultGroupDetails = [[SSKProtoGroupDetails alloc] init]; - } - return self; -} -- (PBGeneratedMessage*) internalGetResult { - return resultGroupDetails; -} -- (SSKProtoGroupDetailsBuilder*) clear { - self.resultGroupDetails = [[SSKProtoGroupDetails alloc] init]; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clone { - return [SSKProtoGroupDetails builderWithPrototype:resultGroupDetails]; -} -- (SSKProtoGroupDetails*) defaultInstance { - return [SSKProtoGroupDetails defaultInstance]; -} -- (SSKProtoGroupDetails*) build { - [self checkInitialized]; - return [self buildPartial]; -} -- (SSKProtoGroupDetails*) buildPartial { - SSKProtoGroupDetails* returnMe = resultGroupDetails; - self.resultGroupDetails = nil; - return returnMe; -} -- (SSKProtoGroupDetailsBuilder*) mergeFrom:(SSKProtoGroupDetails*) other { - if (other == [SSKProtoGroupDetails defaultInstance]) { - return self; - } - if (other.hasId) { - [self setId:other.id]; - } - if (other.hasName) { - [self setName:other.name]; - } - if (other.membersArray.count > 0) { - if (resultGroupDetails.membersArray == nil) { - resultGroupDetails.membersArray = [[NSMutableArray alloc] initWithArray:other.membersArray]; - } else { - [resultGroupDetails.membersArray addObjectsFromArray:other.membersArray]; - } - } - if (other.hasAvatar) { - [self mergeAvatar:other.avatar]; - } - if (other.hasActive) { - [self setActive:other.active]; - } - if (other.hasExpireTimer) { - [self setExpireTimer:other.expireTimer]; - } - if (other.hasColor) { - [self setColor:other.color]; - } - [self mergeUnknownFields:other.unknownFields]; - return self; -} -- (SSKProtoGroupDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { - return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; -} -- (SSKProtoGroupDetailsBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { - PBUnknownFieldSetBuilder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields]; - while (YES) { - SInt32 tag = [input readTag]; - switch (tag) { - case 0: - [self setUnknownFields:[unknownFields build]]; - return self; - default: { - if (![self parseUnknownField:input unknownFields:unknownFields extensionRegistry:extensionRegistry tag:tag]) { - [self setUnknownFields:[unknownFields build]]; - return self; - } - break; - } - case 10: { - [self setId:[input readData]]; - break; - } - case 18: { - [self setName:[input readString]]; - break; - } - case 26: { - [self addMembers:[input readString]]; - break; - } - case 34: { - SSKProtoGroupDetailsAvatarBuilder* subBuilder = [SSKProtoGroupDetailsAvatar builder]; - if (self.hasAvatar) { - [subBuilder mergeFrom:self.avatar]; - } - [input readMessage:subBuilder extensionRegistry:extensionRegistry]; - [self setAvatar:[subBuilder buildPartial]]; - break; - } - case 40: { - [self setActive:[input readBool]]; - break; - } - case 48: { - [self setExpireTimer:[input readUInt32]]; - break; - } - case 58: { - [self setColor:[input readString]]; - break; - } - } - } -} -- (BOOL) hasId { - return resultGroupDetails.hasId; -} -- (NSData*) id { - return resultGroupDetails.id; -} -- (SSKProtoGroupDetailsBuilder*) setId:(NSData*) value { - resultGroupDetails.hasId = YES; - resultGroupDetails.id = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearId { - resultGroupDetails.hasId = NO; - resultGroupDetails.id = [NSData data]; - return self; -} -- (BOOL) hasName { - return resultGroupDetails.hasName; -} -- (NSString*) name { - return resultGroupDetails.name; -} -- (SSKProtoGroupDetailsBuilder*) setName:(NSString*) value { - resultGroupDetails.hasName = YES; - resultGroupDetails.name = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearName { - resultGroupDetails.hasName = NO; - resultGroupDetails.name = @""; - return self; -} -- (NSMutableArray *)members { - return resultGroupDetails.membersArray; -} -- (NSString*)membersAtIndex:(NSUInteger)index { - return [resultGroupDetails membersAtIndex:index]; -} -- (SSKProtoGroupDetailsBuilder *)addMembers:(NSString*)value { - if (resultGroupDetails.membersArray == nil) { - resultGroupDetails.membersArray = [[NSMutableArray alloc]init]; - } - [resultGroupDetails.membersArray addObject:value]; - return self; -} -- (SSKProtoGroupDetailsBuilder *)setMembersArray:(NSArray *)array { - resultGroupDetails.membersArray = [[NSMutableArray alloc] initWithArray:array]; - return self; -} -- (SSKProtoGroupDetailsBuilder *)clearMembers { - resultGroupDetails.membersArray = nil; - return self; -} -- (BOOL) hasAvatar { - return resultGroupDetails.hasAvatar; -} -- (SSKProtoGroupDetailsAvatar*) avatar { - return resultGroupDetails.avatar; -} -- (SSKProtoGroupDetailsBuilder*) setAvatar:(SSKProtoGroupDetailsAvatar*) value { - resultGroupDetails.hasAvatar = YES; - resultGroupDetails.avatar = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) setAvatarBuilder:(SSKProtoGroupDetailsAvatarBuilder*) builderForValue { - return [self setAvatar:[builderForValue build]]; -} -- (SSKProtoGroupDetailsBuilder*) mergeAvatar:(SSKProtoGroupDetailsAvatar*) value { - if (resultGroupDetails.hasAvatar && - resultGroupDetails.avatar != [SSKProtoGroupDetailsAvatar defaultInstance]) { - resultGroupDetails.avatar = - [[[SSKProtoGroupDetailsAvatar builderWithPrototype:resultGroupDetails.avatar] mergeFrom:value] buildPartial]; - } else { - resultGroupDetails.avatar = value; - } - resultGroupDetails.hasAvatar = YES; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearAvatar { - resultGroupDetails.hasAvatar = NO; - resultGroupDetails.avatar = [SSKProtoGroupDetailsAvatar defaultInstance]; - return self; -} -- (BOOL) hasActive { - return resultGroupDetails.hasActive; -} -- (BOOL) active { - return resultGroupDetails.active; -} -- (SSKProtoGroupDetailsBuilder*) setActive:(BOOL) value { - resultGroupDetails.hasActive = YES; - resultGroupDetails.active = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearActive { - resultGroupDetails.hasActive = NO; - resultGroupDetails.active = YES; - return self; -} -- (BOOL) hasExpireTimer { - return resultGroupDetails.hasExpireTimer; -} -- (UInt32) expireTimer { - return resultGroupDetails.expireTimer; -} -- (SSKProtoGroupDetailsBuilder*) setExpireTimer:(UInt32) value { - resultGroupDetails.hasExpireTimer = YES; - resultGroupDetails.expireTimer = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearExpireTimer { - resultGroupDetails.hasExpireTimer = NO; - resultGroupDetails.expireTimer = 0; - return self; -} -- (BOOL) hasColor { - return resultGroupDetails.hasColor; -} -- (NSString*) color { - return resultGroupDetails.color; -} -- (SSKProtoGroupDetailsBuilder*) setColor:(NSString*) value { - resultGroupDetails.hasColor = YES; - resultGroupDetails.color = value; - return self; -} -- (SSKProtoGroupDetailsBuilder*) clearColor { - resultGroupDetails.hasColor = NO; - resultGroupDetails.color = @""; - return self; -} -@end - - -// @@protoc_insertion_point(global_scope) diff --git a/SignalServiceKit/src/Protos/Generated/SSKProto.swift b/SignalServiceKit/src/Protos/Generated/SSKProto.swift index 5ccd8a764..7b8844c47 100644 --- a/SignalServiceKit/src/Protos/Generated/SSKProto.swift +++ b/SignalServiceKit/src/Protos/Generated/SSKProto.swift @@ -672,6 +672,14 @@ public enum SSKProtoError: Error { proto.iceUpdate = items } + @objc public func setIceUpdate(_ wrappedItems: [SSKProtoCallMessageIceUpdate]) { + var unwrappedItems = [SignalServiceProtos_CallMessage.IceUpdate]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.iceUpdate = unwrappedItems + } + @objc public func setHangup(_ valueParam: SSKProtoCallMessageHangup) { proto.hangup = valueParam.proto } @@ -918,6 +926,14 @@ public enum SSKProtoError: Error { proto.attachments = items } + @objc public func setAttachments(_ wrappedItems: [SSKProtoDataMessageQuoteQuotedAttachment]) { + var unwrappedItems = [SignalServiceProtos_DataMessage.Quote.QuotedAttachment]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.attachments = unwrappedItems + } + @objc public func build() throws -> SSKProtoDataMessageQuote { let wrapper = try SSKProtoDataMessageQuote.parseProto(proto) return wrapper @@ -1619,18 +1635,42 @@ public enum SSKProtoError: Error { proto.number = items } + @objc public func setNumber(_ wrappedItems: [SSKProtoDataMessageContactPhone]) { + var unwrappedItems = [SignalServiceProtos_DataMessage.Contact.Phone]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.number = unwrappedItems + } + @objc public func addEmail(_ valueParam: SSKProtoDataMessageContactEmail) { var items = proto.email items.append(valueParam.proto) proto.email = items } + @objc public func setEmail(_ wrappedItems: [SSKProtoDataMessageContactEmail]) { + var unwrappedItems = [SignalServiceProtos_DataMessage.Contact.Email]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.email = unwrappedItems + } + @objc public func addAddress(_ valueParam: SSKProtoDataMessageContactPostalAddress) { var items = proto.address items.append(valueParam.proto) proto.address = items } + @objc public func setAddress(_ wrappedItems: [SSKProtoDataMessageContactPostalAddress]) { + var unwrappedItems = [SignalServiceProtos_DataMessage.Contact.PostalAddress]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.address = unwrappedItems + } + @objc public func setAvatar(_ valueParam: SSKProtoDataMessageContactAvatar) { proto.avatar = valueParam.proto } @@ -1776,6 +1816,14 @@ public enum SSKProtoError: Error { proto.attachments = items } + @objc public func setAttachments(_ wrappedItems: [SSKProtoAttachmentPointer]) { + var unwrappedItems = [SignalServiceProtos_AttachmentPointer]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.attachments = unwrappedItems + } + @objc public func setGroup(_ valueParam: SSKProtoGroupContext) { proto.group = valueParam.proto } @@ -1806,6 +1854,14 @@ public enum SSKProtoError: Error { proto.contact = items } + @objc public func setContact(_ wrappedItems: [SSKProtoDataMessageContact]) { + var unwrappedItems = [SignalServiceProtos_DataMessage.Contact]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.contact = unwrappedItems + } + @objc public func build() throws -> SSKProtoDataMessage { let wrapper = try SSKProtoDataMessage.parseProto(proto) return wrapper @@ -2019,6 +2075,14 @@ public enum SSKProtoError: Error { proto.timestamp = items } + @objc public func setTimestamp(_ wrappedItems: [UInt64]) { + var unwrappedItems = [UInt64]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem) + } + proto.timestamp = unwrappedItems + } + @objc public func build() throws -> SSKProtoReceiptMessage { let wrapper = try SSKProtoReceiptMessage.parseProto(proto) return wrapper @@ -2425,6 +2489,14 @@ public enum SSKProtoError: Error { proto.numbers = items } + @objc public func setNumbers(_ wrappedItems: [String]) { + var unwrappedItems = [String]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem) + } + proto.numbers = unwrappedItems + } + @objc public func build() throws -> SSKProtoSyncMessageBlocked { let wrapper = try SSKProtoSyncMessageBlocked.parseProto(proto) return wrapper @@ -2709,6 +2781,14 @@ public enum SSKProtoError: Error { proto.read = items } + @objc public func setRead(_ wrappedItems: [SSKProtoSyncMessageRead]) { + var unwrappedItems = [SignalServiceProtos_SyncMessage.Read]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem.proto) + } + proto.read = unwrappedItems + } + @objc public func setBlocked(_ valueParam: SSKProtoSyncMessageBlocked) { proto.blocked = valueParam.proto } @@ -3091,6 +3171,14 @@ public enum SSKProtoError: Error { proto.members = items } + @objc public func setMembers(_ wrappedItems: [String]) { + var unwrappedItems = [String]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem) + } + proto.members = unwrappedItems + } + @objc public func setAvatar(_ valueParam: SSKProtoAttachmentPointer) { proto.avatar = valueParam.proto } @@ -3481,6 +3569,14 @@ public enum SSKProtoError: Error { proto.members = items } + @objc public func setMembers(_ wrappedItems: [String]) { + var unwrappedItems = [String]() + for wrappedItem in wrappedItems { + unwrappedItems.append(wrappedItem) + } + proto.members = unwrappedItems + } + @objc public func setAvatar(_ valueParam: SSKProtoGroupDetailsAvatar) { proto.avatar = valueParam.proto }