mirror of https://github.com/oxen-io/session-ios
Migrate to backup proto wrappers.
parent
eaf59b122d
commit
f795ec352e
@ -1,186 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
|
||||
#import <ProtocolBuffers/ProtocolBuffers.h>
|
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
@class OWSSignaliOSProtosBackupSnapshot;
|
||||
@class OWSSignaliOSProtosBackupSnapshotBackupEntity;
|
||||
@class OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder;
|
||||
@class OWSSignaliOSProtosBackupSnapshotBuilder;
|
||||
@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;
|
||||
|
||||
|
||||
typedef NS_ENUM(SInt32, OWSSignaliOSProtosBackupSnapshotBackupEntityType) {
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown = 0,
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityTypeMigration = 1,
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityTypeThread = 2,
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityTypeInteraction = 3,
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityTypeAttachment = 4,
|
||||
};
|
||||
|
||||
BOOL OWSSignaliOSProtosBackupSnapshotBackupEntityTypeIsValidValue(OWSSignaliOSProtosBackupSnapshotBackupEntityType value);
|
||||
NSString *NSStringFromOWSSignaliOSProtosBackupSnapshotBackupEntityType(OWSSignaliOSProtosBackupSnapshotBackupEntityType value);
|
||||
|
||||
|
||||
@interface OWSSignaliOSProtosOwssignaliOsprotosRoot : NSObject {
|
||||
}
|
||||
+ (PBExtensionRegistry*) extensionRegistry;
|
||||
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry;
|
||||
@end
|
||||
|
||||
#define BackupSnapshot_entity @"entity"
|
||||
@interface OWSSignaliOSProtosBackupSnapshot : PBGeneratedMessage<GeneratedMessageProtocol> {
|
||||
@private
|
||||
NSMutableArray * entityArray;
|
||||
}
|
||||
@property (readonly, strong) NSArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> * entity;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*)entityAtIndex:(NSUInteger)index;
|
||||
|
||||
+ (instancetype) defaultInstance;
|
||||
- (instancetype) defaultInstance;
|
||||
|
||||
- (BOOL) isInitialized;
|
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) builder;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBuilder*) builder;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBuilder*) builderWithPrototype:(OWSSignaliOSProtosBackupSnapshot*) prototype;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) toBuilder;
|
||||
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromData:(NSData*) data;
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromInputStream:(NSInputStream*) input;
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromCodedInputStream:(PBCodedInputStream*) input;
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
@end
|
||||
|
||||
#define BackupEntity_type @"type"
|
||||
#define BackupEntity_entityData @"entityData"
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBackupEntity : PBGeneratedMessage<GeneratedMessageProtocol> {
|
||||
@private
|
||||
BOOL hasEntityData_:1;
|
||||
BOOL hasType_:1;
|
||||
NSData* entityData;
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityType type;
|
||||
}
|
||||
- (BOOL) hasType;
|
||||
- (BOOL) hasEntityData;
|
||||
@property (readonly) OWSSignaliOSProtosBackupSnapshotBackupEntityType type;
|
||||
@property (readonly, strong) NSData* entityData;
|
||||
|
||||
+ (instancetype) defaultInstance;
|
||||
- (instancetype) defaultInstance;
|
||||
|
||||
- (BOOL) isInitialized;
|
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builder;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builder;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builderWithPrototype:(OWSSignaliOSProtosBackupSnapshotBackupEntity*) prototype;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) toBuilder;
|
||||
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromData:(NSData*) data;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromInputStream:(NSInputStream*) input;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromCodedInputStream:(PBCodedInputStream*) input;
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
@end
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder : PBGeneratedMessageBuilder {
|
||||
@private
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntity* resultBackupEntity;
|
||||
}
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) defaultInstance;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clear;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clone;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) build;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) buildPartial;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) mergeFrom:(OWSSignaliOSProtosBackupSnapshotBackupEntity*) other;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
|
||||
- (BOOL) hasType;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityType) type;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) setType:(OWSSignaliOSProtosBackupSnapshotBackupEntityType) value;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clearType;
|
||||
|
||||
- (BOOL) hasEntityData;
|
||||
- (NSData*) entityData;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) setEntityData:(NSData*) value;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clearEntityData;
|
||||
@end
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBuilder : PBGeneratedMessageBuilder {
|
||||
@private
|
||||
OWSSignaliOSProtosBackupSnapshot* resultBackupSnapshot;
|
||||
}
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) defaultInstance;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) clear;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) clone;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) build;
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) buildPartial;
|
||||
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) mergeFrom:(OWSSignaliOSProtosBackupSnapshot*) other;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry;
|
||||
|
||||
- (NSMutableArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> *)entity;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*)entityAtIndex:(NSUInteger)index;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)addEntity:(OWSSignaliOSProtosBackupSnapshotBackupEntity*)value;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)setEntityArray:(NSArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> *)array;
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)clearEntity;
|
||||
@end
|
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -1,535 +0,0 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
|
||||
#import "OWSSignaliOSProtos.pb.h"
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
@implementation OWSSignaliOSProtosOwssignaliOsprotosRoot
|
||||
static PBExtensionRegistry* extensionRegistry = nil;
|
||||
+ (PBExtensionRegistry*) extensionRegistry {
|
||||
return extensionRegistry;
|
||||
}
|
||||
|
||||
+ (void) initialize {
|
||||
if (self == [OWSSignaliOSProtosOwssignaliOsprotosRoot class]) {
|
||||
PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry];
|
||||
[self registerAllExtensions:registry];
|
||||
[ObjectivecDescriptorRoot registerAllExtensions:registry];
|
||||
extensionRegistry = registry;
|
||||
}
|
||||
}
|
||||
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry {
|
||||
}
|
||||
@end
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshot ()
|
||||
@property (strong) NSMutableArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> * entityArray;
|
||||
@end
|
||||
|
||||
@implementation OWSSignaliOSProtosBackupSnapshot
|
||||
|
||||
@synthesize entityArray;
|
||||
@dynamic entity;
|
||||
- (instancetype) init {
|
||||
if ((self = [super init])) {
|
||||
}
|
||||
return self;
|
||||
}
|
||||
static OWSSignaliOSProtosBackupSnapshot* defaultOWSSignaliOSProtosBackupSnapshotInstance = nil;
|
||||
+ (void) initialize {
|
||||
if (self == [OWSSignaliOSProtosBackupSnapshot class]) {
|
||||
defaultOWSSignaliOSProtosBackupSnapshotInstance = [[OWSSignaliOSProtosBackupSnapshot alloc] init];
|
||||
}
|
||||
}
|
||||
+ (instancetype) defaultInstance {
|
||||
return defaultOWSSignaliOSProtosBackupSnapshotInstance;
|
||||
}
|
||||
- (instancetype) defaultInstance {
|
||||
return defaultOWSSignaliOSProtosBackupSnapshotInstance;
|
||||
}
|
||||
- (NSArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> *)entity {
|
||||
return entityArray;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*)entityAtIndex:(NSUInteger)index {
|
||||
return [entityArray objectAtIndex:index];
|
||||
}
|
||||
- (BOOL) isInitialized {
|
||||
return YES;
|
||||
}
|
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
|
||||
[self.entityArray enumerateObjectsUsingBlock:^(OWSSignaliOSProtosBackupSnapshotBackupEntity *element, NSUInteger idx, BOOL *stop) {
|
||||
[output writeMessage:1 value:element];
|
||||
}];
|
||||
[self.unknownFields writeToCodedOutputStream:output];
|
||||
}
|
||||
- (SInt32) serializedSize {
|
||||
__block SInt32 size_ = memoizedSerializedSize;
|
||||
if (size_ != -1) {
|
||||
return size_;
|
||||
}
|
||||
|
||||
size_ = 0;
|
||||
[self.entityArray enumerateObjectsUsingBlock:^(OWSSignaliOSProtosBackupSnapshotBackupEntity *element, NSUInteger idx, BOOL *stop) {
|
||||
size_ += computeMessageSize(1, element);
|
||||
}];
|
||||
size_ += self.unknownFields.serializedSize;
|
||||
memoizedSerializedSize = size_;
|
||||
return size_;
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromData:(NSData*) data {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromData:data] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromInputStream:(NSInputStream*) input {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromInputStream:input] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromCodedInputStream:(PBCodedInputStream*) input {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromCodedInputStream:input] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshot*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshot*)[[[OWSSignaliOSProtosBackupSnapshot builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBuilder*) builder {
|
||||
return [[OWSSignaliOSProtosBackupSnapshotBuilder alloc] init];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBuilder*) builderWithPrototype:(OWSSignaliOSProtosBackupSnapshot*) prototype {
|
||||
return [[OWSSignaliOSProtosBackupSnapshot builder] mergeFrom:prototype];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) builder {
|
||||
return [OWSSignaliOSProtosBackupSnapshot builder];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) toBuilder {
|
||||
return [OWSSignaliOSProtosBackupSnapshot builderWithPrototype:self];
|
||||
}
|
||||
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
|
||||
[self.entityArray enumerateObjectsUsingBlock:^(OWSSignaliOSProtosBackupSnapshotBackupEntity *element, NSUInteger idx, BOOL *stop) {
|
||||
[output appendFormat:@"%@%@ {\n", indent, @"entity"];
|
||||
[element writeDescriptionTo:output
|
||||
withIndent:[NSString stringWithFormat:@"%@ ", indent]];
|
||||
[output appendFormat:@"%@}\n", indent];
|
||||
}];
|
||||
[self.unknownFields writeDescriptionTo:output withIndent:indent];
|
||||
}
|
||||
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
|
||||
for (OWSSignaliOSProtosBackupSnapshotBackupEntity* element in self.entityArray) {
|
||||
NSMutableDictionary *elementDictionary = [NSMutableDictionary dictionary];
|
||||
[element storeInDictionary:elementDictionary];
|
||||
[dictionary setObject:[NSDictionary dictionaryWithDictionary:elementDictionary] forKey:@"entity"];
|
||||
}
|
||||
[self.unknownFields storeInDictionary:dictionary];
|
||||
}
|
||||
- (BOOL) isEqual:(id)other {
|
||||
if (other == self) {
|
||||
return YES;
|
||||
}
|
||||
if (![other isKindOfClass:[OWSSignaliOSProtosBackupSnapshot class]]) {
|
||||
return NO;
|
||||
}
|
||||
OWSSignaliOSProtosBackupSnapshot *otherMessage = other;
|
||||
return
|
||||
[self.entityArray isEqualToArray:otherMessage.entityArray] &&
|
||||
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
|
||||
}
|
||||
- (NSUInteger) hash {
|
||||
__block NSUInteger hashCode = 7;
|
||||
[self.entityArray enumerateObjectsUsingBlock:^(OWSSignaliOSProtosBackupSnapshotBackupEntity *element, NSUInteger idx, BOOL *stop) {
|
||||
hashCode = hashCode * 31 + [element hash];
|
||||
}];
|
||||
hashCode = hashCode * 31 + [self.unknownFields hash];
|
||||
return hashCode;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBackupEntity ()
|
||||
@property OWSSignaliOSProtosBackupSnapshotBackupEntityType type;
|
||||
@property (strong) NSData* entityData;
|
||||
@end
|
||||
|
||||
@implementation OWSSignaliOSProtosBackupSnapshotBackupEntity
|
||||
|
||||
- (BOOL) hasType {
|
||||
return !!hasType_;
|
||||
}
|
||||
- (void) setHasType:(BOOL) _value_ {
|
||||
hasType_ = !!_value_;
|
||||
}
|
||||
@synthesize type;
|
||||
- (BOOL) hasEntityData {
|
||||
return !!hasEntityData_;
|
||||
}
|
||||
- (void) setHasEntityData:(BOOL) _value_ {
|
||||
hasEntityData_ = !!_value_;
|
||||
}
|
||||
@synthesize entityData;
|
||||
- (instancetype) init {
|
||||
if ((self = [super init])) {
|
||||
self.type = OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown;
|
||||
self.entityData = [NSData data];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
static OWSSignaliOSProtosBackupSnapshotBackupEntity* defaultOWSSignaliOSProtosBackupSnapshotBackupEntityInstance = nil;
|
||||
+ (void) initialize {
|
||||
if (self == [OWSSignaliOSProtosBackupSnapshotBackupEntity class]) {
|
||||
defaultOWSSignaliOSProtosBackupSnapshotBackupEntityInstance = [[OWSSignaliOSProtosBackupSnapshotBackupEntity alloc] init];
|
||||
}
|
||||
}
|
||||
+ (instancetype) defaultInstance {
|
||||
return defaultOWSSignaliOSProtosBackupSnapshotBackupEntityInstance;
|
||||
}
|
||||
- (instancetype) defaultInstance {
|
||||
return defaultOWSSignaliOSProtosBackupSnapshotBackupEntityInstance;
|
||||
}
|
||||
- (BOOL) isInitialized {
|
||||
return YES;
|
||||
}
|
||||
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
|
||||
if (self.hasType) {
|
||||
[output writeEnum:1 value:self.type];
|
||||
}
|
||||
if (self.hasEntityData) {
|
||||
[output writeData:2 value:self.entityData];
|
||||
}
|
||||
[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.hasEntityData) {
|
||||
size_ += computeDataSize(2, self.entityData);
|
||||
}
|
||||
size_ += self.unknownFields.serializedSize;
|
||||
memoizedSerializedSize = size_;
|
||||
return size_;
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromData:(NSData*) data {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromData:data] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromInputStream:(NSInputStream*) input {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromInputStream:input] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromCodedInputStream:(PBCodedInputStream*) input {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromCodedInputStream:input] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntity*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
|
||||
return (OWSSignaliOSProtosBackupSnapshotBackupEntity*)[[[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builder {
|
||||
return [[OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder alloc] init];
|
||||
}
|
||||
+ (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builderWithPrototype:(OWSSignaliOSProtosBackupSnapshotBackupEntity*) prototype {
|
||||
return [[OWSSignaliOSProtosBackupSnapshotBackupEntity builder] mergeFrom:prototype];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) builder {
|
||||
return [OWSSignaliOSProtosBackupSnapshotBackupEntity builder];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) toBuilder {
|
||||
return [OWSSignaliOSProtosBackupSnapshotBackupEntity builderWithPrototype:self];
|
||||
}
|
||||
- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
|
||||
if (self.hasType) {
|
||||
[output appendFormat:@"%@%@: %@\n", indent, @"type", NSStringFromOWSSignaliOSProtosBackupSnapshotBackupEntityType(self.type)];
|
||||
}
|
||||
if (self.hasEntityData) {
|
||||
[output appendFormat:@"%@%@: %@\n", indent, @"entityData", self.entityData];
|
||||
}
|
||||
[self.unknownFields writeDescriptionTo:output withIndent:indent];
|
||||
}
|
||||
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
|
||||
if (self.hasType) {
|
||||
[dictionary setObject: @(self.type) forKey: @"type"];
|
||||
}
|
||||
if (self.hasEntityData) {
|
||||
[dictionary setObject: self.entityData forKey: @"entityData"];
|
||||
}
|
||||
[self.unknownFields storeInDictionary:dictionary];
|
||||
}
|
||||
- (BOOL) isEqual:(id)other {
|
||||
if (other == self) {
|
||||
return YES;
|
||||
}
|
||||
if (![other isKindOfClass:[OWSSignaliOSProtosBackupSnapshotBackupEntity class]]) {
|
||||
return NO;
|
||||
}
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntity *otherMessage = other;
|
||||
return
|
||||
self.hasType == otherMessage.hasType &&
|
||||
(!self.hasType || self.type == otherMessage.type) &&
|
||||
self.hasEntityData == otherMessage.hasEntityData &&
|
||||
(!self.hasEntityData || [self.entityData isEqual:otherMessage.entityData]) &&
|
||||
(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.hasEntityData) {
|
||||
hashCode = hashCode * 31 + [self.entityData hash];
|
||||
}
|
||||
hashCode = hashCode * 31 + [self.unknownFields hash];
|
||||
return hashCode;
|
||||
}
|
||||
@end
|
||||
|
||||
BOOL OWSSignaliOSProtosBackupSnapshotBackupEntityTypeIsValidValue(OWSSignaliOSProtosBackupSnapshotBackupEntityType value) {
|
||||
switch (value) {
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown:
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeMigration:
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeThread:
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeInteraction:
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeAttachment:
|
||||
return YES;
|
||||
default:
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
NSString *NSStringFromOWSSignaliOSProtosBackupSnapshotBackupEntityType(OWSSignaliOSProtosBackupSnapshotBackupEntityType value) {
|
||||
switch (value) {
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown:
|
||||
return @"OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown";
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeMigration:
|
||||
return @"OWSSignaliOSProtosBackupSnapshotBackupEntityTypeMigration";
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeThread:
|
||||
return @"OWSSignaliOSProtosBackupSnapshotBackupEntityTypeThread";
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeInteraction:
|
||||
return @"OWSSignaliOSProtosBackupSnapshotBackupEntityTypeInteraction";
|
||||
case OWSSignaliOSProtosBackupSnapshotBackupEntityTypeAttachment:
|
||||
return @"OWSSignaliOSProtosBackupSnapshotBackupEntityTypeAttachment";
|
||||
default:
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder()
|
||||
@property (strong) OWSSignaliOSProtosBackupSnapshotBackupEntity* resultBackupEntity;
|
||||
@end
|
||||
|
||||
@implementation OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder
|
||||
@synthesize resultBackupEntity;
|
||||
- (instancetype) init {
|
||||
if ((self = [super init])) {
|
||||
self.resultBackupEntity = [[OWSSignaliOSProtosBackupSnapshotBackupEntity alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (PBGeneratedMessage*) internalGetResult {
|
||||
return resultBackupEntity;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clear {
|
||||
self.resultBackupEntity = [[OWSSignaliOSProtosBackupSnapshotBackupEntity alloc] init];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clone {
|
||||
return [OWSSignaliOSProtosBackupSnapshotBackupEntity builderWithPrototype:resultBackupEntity];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) defaultInstance {
|
||||
return [OWSSignaliOSProtosBackupSnapshotBackupEntity defaultInstance];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) build {
|
||||
[self checkInitialized];
|
||||
return [self buildPartial];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*) buildPartial {
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntity* returnMe = resultBackupEntity;
|
||||
self.resultBackupEntity = nil;
|
||||
return returnMe;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) mergeFrom:(OWSSignaliOSProtosBackupSnapshotBackupEntity*) other {
|
||||
if (other == [OWSSignaliOSProtosBackupSnapshotBackupEntity defaultInstance]) {
|
||||
return self;
|
||||
}
|
||||
if (other.hasType) {
|
||||
[self setType:other.type];
|
||||
}
|
||||
if (other.hasEntityData) {
|
||||
[self setEntityData:other.entityData];
|
||||
}
|
||||
[self mergeUnknownFields:other.unknownFields];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
|
||||
return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) 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: {
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityType value = (OWSSignaliOSProtosBackupSnapshotBackupEntityType)[input readEnum];
|
||||
if (OWSSignaliOSProtosBackupSnapshotBackupEntityTypeIsValidValue(value)) {
|
||||
[self setType:value];
|
||||
} else {
|
||||
[unknownFields mergeVarintField:1 value:value];
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
[self setEntityData:[input readData]];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
- (BOOL) hasType {
|
||||
return resultBackupEntity.hasType;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityType) type {
|
||||
return resultBackupEntity.type;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) setType:(OWSSignaliOSProtosBackupSnapshotBackupEntityType) value {
|
||||
resultBackupEntity.hasType = YES;
|
||||
resultBackupEntity.type = value;
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clearType {
|
||||
resultBackupEntity.hasType = NO;
|
||||
resultBackupEntity.type = OWSSignaliOSProtosBackupSnapshotBackupEntityTypeUnknown;
|
||||
return self;
|
||||
}
|
||||
- (BOOL) hasEntityData {
|
||||
return resultBackupEntity.hasEntityData;
|
||||
}
|
||||
- (NSData*) entityData {
|
||||
return resultBackupEntity.entityData;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) setEntityData:(NSData*) value {
|
||||
resultBackupEntity.hasEntityData = YES;
|
||||
resultBackupEntity.entityData = value;
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder*) clearEntityData {
|
||||
resultBackupEntity.hasEntityData = NO;
|
||||
resultBackupEntity.entityData = [NSData data];
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface OWSSignaliOSProtosBackupSnapshotBuilder()
|
||||
@property (strong) OWSSignaliOSProtosBackupSnapshot* resultBackupSnapshot;
|
||||
@end
|
||||
|
||||
@implementation OWSSignaliOSProtosBackupSnapshotBuilder
|
||||
@synthesize resultBackupSnapshot;
|
||||
- (instancetype) init {
|
||||
if ((self = [super init])) {
|
||||
self.resultBackupSnapshot = [[OWSSignaliOSProtosBackupSnapshot alloc] init];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (PBGeneratedMessage*) internalGetResult {
|
||||
return resultBackupSnapshot;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) clear {
|
||||
self.resultBackupSnapshot = [[OWSSignaliOSProtosBackupSnapshot alloc] init];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) clone {
|
||||
return [OWSSignaliOSProtosBackupSnapshot builderWithPrototype:resultBackupSnapshot];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) defaultInstance {
|
||||
return [OWSSignaliOSProtosBackupSnapshot defaultInstance];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) build {
|
||||
[self checkInitialized];
|
||||
return [self buildPartial];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshot*) buildPartial {
|
||||
OWSSignaliOSProtosBackupSnapshot* returnMe = resultBackupSnapshot;
|
||||
self.resultBackupSnapshot = nil;
|
||||
return returnMe;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) mergeFrom:(OWSSignaliOSProtosBackupSnapshot*) other {
|
||||
if (other == [OWSSignaliOSProtosBackupSnapshot defaultInstance]) {
|
||||
return self;
|
||||
}
|
||||
if (other.entityArray.count > 0) {
|
||||
if (resultBackupSnapshot.entityArray == nil) {
|
||||
resultBackupSnapshot.entityArray = [[NSMutableArray alloc] initWithArray:other.entityArray];
|
||||
} else {
|
||||
[resultBackupSnapshot.entityArray addObjectsFromArray:other.entityArray];
|
||||
}
|
||||
}
|
||||
[self mergeUnknownFields:other.unknownFields];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
|
||||
return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder*) 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: {
|
||||
OWSSignaliOSProtosBackupSnapshotBackupEntityBuilder* subBuilder = [OWSSignaliOSProtosBackupSnapshotBackupEntity builder];
|
||||
[input readMessage:subBuilder extensionRegistry:extensionRegistry];
|
||||
[self addEntity:[subBuilder buildPartial]];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
- (NSMutableArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> *)entity {
|
||||
return resultBackupSnapshot.entityArray;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBackupEntity*)entityAtIndex:(NSUInteger)index {
|
||||
return [resultBackupSnapshot entityAtIndex:index];
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)addEntity:(OWSSignaliOSProtosBackupSnapshotBackupEntity*)value {
|
||||
if (resultBackupSnapshot.entityArray == nil) {
|
||||
resultBackupSnapshot.entityArray = [[NSMutableArray alloc]init];
|
||||
}
|
||||
[resultBackupSnapshot.entityArray addObject:value];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)setEntityArray:(NSArray<OWSSignaliOSProtosBackupSnapshotBackupEntity*> *)array {
|
||||
resultBackupSnapshot.entityArray = [[NSMutableArray alloc]initWithArray:array];
|
||||
return self;
|
||||
}
|
||||
- (OWSSignaliOSProtosBackupSnapshotBuilder *)clearEntity {
|
||||
resultBackupSnapshot.entityArray = nil;
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
Loading…
Reference in New Issue