| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| |
| #import "Event.pb.h" |
| // @@protoc_insertion_point(imports) |
| |
| @implementation EventRoot |
| static PBExtensionRegistry* extensionRegistry = nil; |
| + (PBExtensionRegistry*) extensionRegistry { |
| return extensionRegistry; |
| } |
| |
| + (void) initialize { |
| if (self == [EventRoot class]) { |
| PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; |
| [self registerAllExtensions:registry]; |
| [PairRoot registerAllExtensions:registry]; |
| [WeaveOperationRoot registerAllExtensions:registry]; |
| extensionRegistry = registry; |
| } |
| } |
| + (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { |
| } |
| @end |
| |
| @interface Event () |
| @property SInt64 timestampMillis; |
| @property (strong) NSString* logMessage; |
| @property (strong) NSMutableArray * additionalDataArray; |
| @property WeaveOperation operation; |
| @property (strong) NSString* timestampIso8601; |
| @end |
| |
| @implementation Event |
| |
| - (BOOL) hasTimestampMillis { |
| return !!hasTimestampMillis_; |
| } |
| - (void) setHasTimestampMillis:(BOOL) value_ { |
| hasTimestampMillis_ = !!value_; |
| } |
| @synthesize timestampMillis; |
| - (BOOL) hasLogMessage { |
| return !!hasLogMessage_; |
| } |
| - (void) setHasLogMessage:(BOOL) value_ { |
| hasLogMessage_ = !!value_; |
| } |
| @synthesize logMessage; |
| @synthesize additionalDataArray; |
| @dynamic additionalData; |
| - (BOOL) hasOperation { |
| return !!hasOperation_; |
| } |
| - (void) setHasOperation:(BOOL) value_ { |
| hasOperation_ = !!value_; |
| } |
| @synthesize operation; |
| - (BOOL) hasTimestampIso8601 { |
| return !!hasTimestampIso8601_; |
| } |
| - (void) setHasTimestampIso8601:(BOOL) value_ { |
| hasTimestampIso8601_ = !!value_; |
| } |
| @synthesize timestampIso8601; |
| - (id) init { |
| if ((self = [super init])) { |
| self.timestampMillis = 0L; |
| self.logMessage = @""; |
| self.operation = WeaveOperationNone; |
| self.timestampIso8601 = @""; |
| } |
| return self; |
| } |
| static Event* defaultEventInstance = nil; |
| + (void) initialize { |
| if (self == [Event class]) { |
| defaultEventInstance = [[Event alloc] init]; |
| } |
| } |
| + (Event*) defaultInstance { |
| return defaultEventInstance; |
| } |
| - (Event*) defaultInstance { |
| return defaultEventInstance; |
| } |
| - (NSArray *)additionalData { |
| return additionalDataArray; |
| } |
| - (Pair*)additionalDataAtIndex:(NSUInteger)index { |
| return [additionalDataArray objectAtIndex:index]; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasTimestampMillis) { |
| [output writeSInt64:1 value:self.timestampMillis]; |
| } |
| if (self.hasLogMessage) { |
| [output writeString:2 value:self.logMessage]; |
| } |
| [self.additionalDataArray enumerateObjectsUsingBlock:^(Pair *element, NSUInteger idx, BOOL *stop) { |
| [output writeMessage:3 value:element]; |
| }]; |
| if (self.hasOperation) { |
| [output writeEnum:4 value:self.operation]; |
| } |
| if (self.hasTimestampIso8601) { |
| [output writeString:5 value:self.timestampIso8601]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasTimestampMillis) { |
| size_ += computeSInt64Size(1, self.timestampMillis); |
| } |
| if (self.hasLogMessage) { |
| size_ += computeStringSize(2, self.logMessage); |
| } |
| [self.additionalDataArray enumerateObjectsUsingBlock:^(Pair *element, NSUInteger idx, BOOL *stop) { |
| size_ += computeMessageSize(3, element); |
| }]; |
| if (self.hasOperation) { |
| size_ += computeEnumSize(4, self.operation); |
| } |
| if (self.hasTimestampIso8601) { |
| size_ += computeStringSize(5, self.timestampIso8601); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Event*) parseFromData:(NSData*) data { |
| return (Event*)[[[Event builder] mergeFromData:data] build]; |
| } |
| + (Event*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Event*)[[[Event builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Event*) parseFromInputStream:(NSInputStream*) input { |
| return (Event*)[[[Event builder] mergeFromInputStream:input] build]; |
| } |
| + (Event*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Event*)[[[Event builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Event*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Event*)[[[Event builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Event*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Event*)[[[Event builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (EventBuilder*) builder { |
| return [[EventBuilder alloc] init]; |
| } |
| + (EventBuilder*) builderWithPrototype:(Event*) prototype { |
| return [[Event builder] mergeFrom:prototype]; |
| } |
| - (EventBuilder*) builder { |
| return [Event builder]; |
| } |
| - (EventBuilder*) toBuilder { |
| return [Event builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasTimestampMillis) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"timestampMillis", [NSNumber numberWithLongLong:self.timestampMillis]]; |
| } |
| if (self.hasLogMessage) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"logMessage", self.logMessage]; |
| } |
| [self.additionalDataArray enumerateObjectsUsingBlock:^(Pair *element, NSUInteger idx, BOOL *stop) { |
| [output appendFormat:@"%@%@ {\n", indent, @"additionalData"]; |
| [element writeDescriptionTo:output |
| withIndent:[NSString stringWithFormat:@"%@ ", indent]]; |
| [output appendFormat:@"%@}\n", indent]; |
| }]; |
| if (self.hasOperation) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"operation", self.operation]; |
| } |
| if (self.hasTimestampIso8601) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"timestampIso8601", self.timestampIso8601]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Event class]]) { |
| return NO; |
| } |
| Event *otherMessage = other; |
| return |
| self.hasTimestampMillis == otherMessage.hasTimestampMillis && |
| (!self.hasTimestampMillis || self.timestampMillis == otherMessage.timestampMillis) && |
| self.hasLogMessage == otherMessage.hasLogMessage && |
| (!self.hasLogMessage || [self.logMessage isEqual:otherMessage.logMessage]) && |
| [self.additionalDataArray isEqualToArray:otherMessage.additionalDataArray] && |
| self.hasOperation == otherMessage.hasOperation && |
| (!self.hasOperation || self.operation == otherMessage.operation) && |
| self.hasTimestampIso8601 == otherMessage.hasTimestampIso8601 && |
| (!self.hasTimestampIso8601 || [self.timestampIso8601 isEqual:otherMessage.timestampIso8601]) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasTimestampMillis) { |
| hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestampMillis] hash]; |
| } |
| if (self.hasLogMessage) { |
| hashCode = hashCode * 31 + [self.logMessage hash]; |
| } |
| [self.additionalDataArray enumerateObjectsUsingBlock:^(Pair *element, NSUInteger idx, BOOL *stop) { |
| hashCode = hashCode * 31 + [element hash]; |
| }]; |
| if (self.hasOperation) { |
| hashCode = hashCode * 31 + self.operation; |
| } |
| if (self.hasTimestampIso8601) { |
| hashCode = hashCode * 31 + [self.timestampIso8601 hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| @interface EventBuilder() |
| @property (strong) Event* result; |
| @end |
| |
| @implementation EventBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Event alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (EventBuilder*) clear { |
| self.result = [[Event alloc] init]; |
| return self; |
| } |
| - (EventBuilder*) clone { |
| return [Event builderWithPrototype:result]; |
| } |
| - (Event*) defaultInstance { |
| return [Event defaultInstance]; |
| } |
| - (Event*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Event*) buildPartial { |
| Event* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (EventBuilder*) mergeFrom:(Event*) other { |
| if (other == [Event defaultInstance]) { |
| return self; |
| } |
| if (other.hasTimestampMillis) { |
| [self setTimestampMillis:other.timestampMillis]; |
| } |
| if (other.hasLogMessage) { |
| [self setLogMessage:other.logMessage]; |
| } |
| if (other.additionalDataArray.count > 0) { |
| if (result.additionalDataArray == nil) { |
| result.additionalDataArray = [[NSMutableArray alloc] initWithArray:other.additionalDataArray]; |
| } else { |
| [result.additionalDataArray addObjectsFromArray:other.additionalDataArray]; |
| } |
| } |
| if (other.hasOperation) { |
| [self setOperation:other.operation]; |
| } |
| if (other.hasTimestampIso8601) { |
| [self setTimestampIso8601:other.timestampIso8601]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (EventBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (EventBuilder*) 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 setTimestampMillis:[input readSInt64]]; |
| break; |
| } |
| case 18: { |
| [self setLogMessage:[input readString]]; |
| break; |
| } |
| case 26: { |
| PairBuilder* subBuilder = [Pair builder]; |
| [input readMessage:subBuilder extensionRegistry:extensionRegistry]; |
| [self addAdditionalData:[subBuilder buildPartial]]; |
| break; |
| } |
| case 32: { |
| WeaveOperation value = (WeaveOperation)[input readEnum]; |
| if (WeaveOperationIsValidValue(value)) { |
| [self setOperation:value]; |
| } else { |
| [unknownFields mergeVarintField:4 value:value]; |
| } |
| break; |
| } |
| case 42: { |
| [self setTimestampIso8601:[input readString]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasTimestampMillis { |
| return result.hasTimestampMillis; |
| } |
| - (SInt64) timestampMillis { |
| return result.timestampMillis; |
| } |
| - (EventBuilder*) setTimestampMillis:(SInt64) value { |
| result.hasTimestampMillis = YES; |
| result.timestampMillis = value; |
| return self; |
| } |
| - (EventBuilder*) clearTimestampMillis { |
| result.hasTimestampMillis = NO; |
| result.timestampMillis = 0L; |
| return self; |
| } |
| - (BOOL) hasLogMessage { |
| return result.hasLogMessage; |
| } |
| - (NSString*) logMessage { |
| return result.logMessage; |
| } |
| - (EventBuilder*) setLogMessage:(NSString*) value { |
| result.hasLogMessage = YES; |
| result.logMessage = value; |
| return self; |
| } |
| - (EventBuilder*) clearLogMessage { |
| result.hasLogMessage = NO; |
| result.logMessage = @""; |
| return self; |
| } |
| - (NSMutableArray *)additionalData { |
| return result.additionalDataArray; |
| } |
| - (Pair*)additionalDataAtIndex:(NSUInteger)index { |
| return [result additionalDataAtIndex:index]; |
| } |
| - (EventBuilder *)addAdditionalData:(Pair*)value { |
| if (result.additionalDataArray == nil) { |
| result.additionalDataArray = [[NSMutableArray alloc]init]; |
| } |
| [result.additionalDataArray addObject:value]; |
| return self; |
| } |
| - (EventBuilder *)setAdditionalDataArray:(NSArray *)array { |
| result.additionalDataArray = [[NSMutableArray alloc]initWithArray:array]; |
| return self; |
| } |
| - (EventBuilder *)clearAdditionalData { |
| result.additionalDataArray = nil; |
| return self; |
| } |
| - (BOOL) hasOperation { |
| return result.hasOperation; |
| } |
| - (WeaveOperation) operation { |
| return result.operation; |
| } |
| - (EventBuilder*) setOperation:(WeaveOperation) value { |
| result.hasOperation = YES; |
| result.operation = value; |
| return self; |
| } |
| - (EventBuilder*) clearOperation { |
| result.hasOperation = NO; |
| result.operation = WeaveOperationNone; |
| return self; |
| } |
| - (BOOL) hasTimestampIso8601 { |
| return result.hasTimestampIso8601; |
| } |
| - (NSString*) timestampIso8601 { |
| return result.timestampIso8601; |
| } |
| - (EventBuilder*) setTimestampIso8601:(NSString*) value { |
| result.hasTimestampIso8601 = YES; |
| result.timestampIso8601 = value; |
| return self; |
| } |
| - (EventBuilder*) clearTimestampIso8601 { |
| result.hasTimestampIso8601 = NO; |
| result.timestampIso8601 = @""; |
| return self; |
| } |
| @end |
| |
| |
| // @@protoc_insertion_point(global_scope) |