| // Generated by the protocol buffer compiler. DO NOT EDIT! |
| |
| #import "Environment.pb.h" |
| // @@protoc_insertion_point(imports) |
| |
| @implementation EnvironmentRoot |
| static PBExtensionRegistry* extensionRegistry = nil; |
| + (PBExtensionRegistry*) extensionRegistry { |
| return extensionRegistry; |
| } |
| |
| + (void) initialize { |
| if (self == [EnvironmentRoot class]) { |
| PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry]; |
| [self registerAllExtensions:registry]; |
| extensionRegistry = registry; |
| } |
| } |
| + (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry { |
| } |
| @end |
| |
| @interface Environment () |
| @property (strong) NSString* appVersion; |
| @property (strong) NSString* appVariant; |
| @property EnvironmentOS osType; |
| @property (strong) NSString* osVersion; |
| @property (strong) NSString* buildModel; |
| @property (strong) NSString* buildManufacturer; |
| @property (strong) NSString* mobileCarrier; |
| @end |
| |
| @implementation Environment |
| |
| - (BOOL) hasAppVersion { |
| return !!hasAppVersion_; |
| } |
| - (void) setHasAppVersion:(BOOL) value_ { |
| hasAppVersion_ = !!value_; |
| } |
| @synthesize appVersion; |
| - (BOOL) hasAppVariant { |
| return !!hasAppVariant_; |
| } |
| - (void) setHasAppVariant:(BOOL) value_ { |
| hasAppVariant_ = !!value_; |
| } |
| @synthesize appVariant; |
| - (BOOL) hasOsType { |
| return !!hasOsType_; |
| } |
| - (void) setHasOsType:(BOOL) value_ { |
| hasOsType_ = !!value_; |
| } |
| @synthesize osType; |
| - (BOOL) hasOsVersion { |
| return !!hasOsVersion_; |
| } |
| - (void) setHasOsVersion:(BOOL) value_ { |
| hasOsVersion_ = !!value_; |
| } |
| @synthesize osVersion; |
| - (BOOL) hasBuildModel { |
| return !!hasBuildModel_; |
| } |
| - (void) setHasBuildModel:(BOOL) value_ { |
| hasBuildModel_ = !!value_; |
| } |
| @synthesize buildModel; |
| - (BOOL) hasBuildManufacturer { |
| return !!hasBuildManufacturer_; |
| } |
| - (void) setHasBuildManufacturer:(BOOL) value_ { |
| hasBuildManufacturer_ = !!value_; |
| } |
| @synthesize buildManufacturer; |
| - (BOOL) hasMobileCarrier { |
| return !!hasMobileCarrier_; |
| } |
| - (void) setHasMobileCarrier:(BOOL) value_ { |
| hasMobileCarrier_ = !!value_; |
| } |
| @synthesize mobileCarrier; |
| - (id) init { |
| if ((self = [super init])) { |
| self.appVersion = @""; |
| self.appVariant = @""; |
| self.osType = EnvironmentOSUnknown; |
| self.osVersion = @""; |
| self.buildModel = @""; |
| self.buildManufacturer = @""; |
| self.mobileCarrier = @""; |
| } |
| return self; |
| } |
| static Environment* defaultEnvironmentInstance = nil; |
| + (void) initialize { |
| if (self == [Environment class]) { |
| defaultEnvironmentInstance = [[Environment alloc] init]; |
| } |
| } |
| + (Environment*) defaultInstance { |
| return defaultEnvironmentInstance; |
| } |
| - (Environment*) defaultInstance { |
| return defaultEnvironmentInstance; |
| } |
| - (BOOL) isInitialized { |
| return YES; |
| } |
| - (void) writeToCodedOutputStream:(PBCodedOutputStream*) output { |
| if (self.hasAppVersion) { |
| [output writeString:1 value:self.appVersion]; |
| } |
| if (self.hasAppVariant) { |
| [output writeString:2 value:self.appVariant]; |
| } |
| if (self.hasOsType) { |
| [output writeEnum:3 value:self.osType]; |
| } |
| if (self.hasOsVersion) { |
| [output writeString:4 value:self.osVersion]; |
| } |
| if (self.hasBuildModel) { |
| [output writeString:5 value:self.buildModel]; |
| } |
| if (self.hasBuildManufacturer) { |
| [output writeString:6 value:self.buildManufacturer]; |
| } |
| if (self.hasMobileCarrier) { |
| [output writeString:7 value:self.mobileCarrier]; |
| } |
| [self.unknownFields writeToCodedOutputStream:output]; |
| } |
| - (SInt32) serializedSize { |
| __block SInt32 size_ = memoizedSerializedSize; |
| if (size_ != -1) { |
| return size_; |
| } |
| |
| size_ = 0; |
| if (self.hasAppVersion) { |
| size_ += computeStringSize(1, self.appVersion); |
| } |
| if (self.hasAppVariant) { |
| size_ += computeStringSize(2, self.appVariant); |
| } |
| if (self.hasOsType) { |
| size_ += computeEnumSize(3, self.osType); |
| } |
| if (self.hasOsVersion) { |
| size_ += computeStringSize(4, self.osVersion); |
| } |
| if (self.hasBuildModel) { |
| size_ += computeStringSize(5, self.buildModel); |
| } |
| if (self.hasBuildManufacturer) { |
| size_ += computeStringSize(6, self.buildManufacturer); |
| } |
| if (self.hasMobileCarrier) { |
| size_ += computeStringSize(7, self.mobileCarrier); |
| } |
| size_ += self.unknownFields.serializedSize; |
| memoizedSerializedSize = size_; |
| return size_; |
| } |
| + (Environment*) parseFromData:(NSData*) data { |
| return (Environment*)[[[Environment builder] mergeFromData:data] build]; |
| } |
| + (Environment*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Environment*)[[[Environment builder] mergeFromData:data extensionRegistry:extensionRegistry] build]; |
| } |
| + (Environment*) parseFromInputStream:(NSInputStream*) input { |
| return (Environment*)[[[Environment builder] mergeFromInputStream:input] build]; |
| } |
| + (Environment*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Environment*)[[[Environment builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (Environment*) parseFromCodedInputStream:(PBCodedInputStream*) input { |
| return (Environment*)[[[Environment builder] mergeFromCodedInputStream:input] build]; |
| } |
| + (Environment*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry { |
| return (Environment*)[[[Environment builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build]; |
| } |
| + (EnvironmentBuilder*) builder { |
| return [[EnvironmentBuilder alloc] init]; |
| } |
| + (EnvironmentBuilder*) builderWithPrototype:(Environment*) prototype { |
| return [[Environment builder] mergeFrom:prototype]; |
| } |
| - (EnvironmentBuilder*) builder { |
| return [Environment builder]; |
| } |
| - (EnvironmentBuilder*) toBuilder { |
| return [Environment builderWithPrototype:self]; |
| } |
| - (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent { |
| if (self.hasAppVersion) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"appVersion", self.appVersion]; |
| } |
| if (self.hasAppVariant) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"appVariant", self.appVariant]; |
| } |
| if (self.hasOsType) { |
| [output appendFormat:@"%@%@: %d\n", indent, @"osType", self.osType]; |
| } |
| if (self.hasOsVersion) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"osVersion", self.osVersion]; |
| } |
| if (self.hasBuildModel) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"buildModel", self.buildModel]; |
| } |
| if (self.hasBuildManufacturer) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"buildManufacturer", self.buildManufacturer]; |
| } |
| if (self.hasMobileCarrier) { |
| [output appendFormat:@"%@%@: %@\n", indent, @"mobileCarrier", self.mobileCarrier]; |
| } |
| [self.unknownFields writeDescriptionTo:output withIndent:indent]; |
| } |
| - (BOOL) isEqual:(id)other { |
| if (other == self) { |
| return YES; |
| } |
| if (![other isKindOfClass:[Environment class]]) { |
| return NO; |
| } |
| Environment *otherMessage = other; |
| return |
| self.hasAppVersion == otherMessage.hasAppVersion && |
| (!self.hasAppVersion || [self.appVersion isEqual:otherMessage.appVersion]) && |
| self.hasAppVariant == otherMessage.hasAppVariant && |
| (!self.hasAppVariant || [self.appVariant isEqual:otherMessage.appVariant]) && |
| self.hasOsType == otherMessage.hasOsType && |
| (!self.hasOsType || self.osType == otherMessage.osType) && |
| self.hasOsVersion == otherMessage.hasOsVersion && |
| (!self.hasOsVersion || [self.osVersion isEqual:otherMessage.osVersion]) && |
| self.hasBuildModel == otherMessage.hasBuildModel && |
| (!self.hasBuildModel || [self.buildModel isEqual:otherMessage.buildModel]) && |
| self.hasBuildManufacturer == otherMessage.hasBuildManufacturer && |
| (!self.hasBuildManufacturer || [self.buildManufacturer isEqual:otherMessage.buildManufacturer]) && |
| self.hasMobileCarrier == otherMessage.hasMobileCarrier && |
| (!self.hasMobileCarrier || [self.mobileCarrier isEqual:otherMessage.mobileCarrier]) && |
| (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); |
| } |
| - (NSUInteger) hash { |
| __block NSUInteger hashCode = 7; |
| if (self.hasAppVersion) { |
| hashCode = hashCode * 31 + [self.appVersion hash]; |
| } |
| if (self.hasAppVariant) { |
| hashCode = hashCode * 31 + [self.appVariant hash]; |
| } |
| if (self.hasOsType) { |
| hashCode = hashCode * 31 + self.osType; |
| } |
| if (self.hasOsVersion) { |
| hashCode = hashCode * 31 + [self.osVersion hash]; |
| } |
| if (self.hasBuildModel) { |
| hashCode = hashCode * 31 + [self.buildModel hash]; |
| } |
| if (self.hasBuildManufacturer) { |
| hashCode = hashCode * 31 + [self.buildManufacturer hash]; |
| } |
| if (self.hasMobileCarrier) { |
| hashCode = hashCode * 31 + [self.mobileCarrier hash]; |
| } |
| hashCode = hashCode * 31 + [self.unknownFields hash]; |
| return hashCode; |
| } |
| @end |
| |
| BOOL EnvironmentOSIsValidValue(EnvironmentOS value) { |
| switch (value) { |
| case EnvironmentOSUnknown: |
| case EnvironmentOSAndroid: |
| case EnvironmentOSIos: |
| return YES; |
| default: |
| return NO; |
| } |
| } |
| @interface EnvironmentBuilder() |
| @property (strong) Environment* result; |
| @end |
| |
| @implementation EnvironmentBuilder |
| @synthesize result; |
| - (id) init { |
| if ((self = [super init])) { |
| self.result = [[Environment alloc] init]; |
| } |
| return self; |
| } |
| - (PBGeneratedMessage*) internalGetResult { |
| return result; |
| } |
| - (EnvironmentBuilder*) clear { |
| self.result = [[Environment alloc] init]; |
| return self; |
| } |
| - (EnvironmentBuilder*) clone { |
| return [Environment builderWithPrototype:result]; |
| } |
| - (Environment*) defaultInstance { |
| return [Environment defaultInstance]; |
| } |
| - (Environment*) build { |
| [self checkInitialized]; |
| return [self buildPartial]; |
| } |
| - (Environment*) buildPartial { |
| Environment* returnMe = result; |
| self.result = nil; |
| return returnMe; |
| } |
| - (EnvironmentBuilder*) mergeFrom:(Environment*) other { |
| if (other == [Environment defaultInstance]) { |
| return self; |
| } |
| if (other.hasAppVersion) { |
| [self setAppVersion:other.appVersion]; |
| } |
| if (other.hasAppVariant) { |
| [self setAppVariant:other.appVariant]; |
| } |
| if (other.hasOsType) { |
| [self setOsType:other.osType]; |
| } |
| if (other.hasOsVersion) { |
| [self setOsVersion:other.osVersion]; |
| } |
| if (other.hasBuildModel) { |
| [self setBuildModel:other.buildModel]; |
| } |
| if (other.hasBuildManufacturer) { |
| [self setBuildManufacturer:other.buildManufacturer]; |
| } |
| if (other.hasMobileCarrier) { |
| [self setMobileCarrier:other.mobileCarrier]; |
| } |
| [self mergeUnknownFields:other.unknownFields]; |
| return self; |
| } |
| - (EnvironmentBuilder*) mergeFromCodedInputStream:(PBCodedInputStream*) input { |
| return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]]; |
| } |
| - (EnvironmentBuilder*) 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 setAppVersion:[input readString]]; |
| break; |
| } |
| case 18: { |
| [self setAppVariant:[input readString]]; |
| break; |
| } |
| case 24: { |
| EnvironmentOS value = (EnvironmentOS)[input readEnum]; |
| if (EnvironmentOSIsValidValue(value)) { |
| [self setOsType:value]; |
| } else { |
| [unknownFields mergeVarintField:3 value:value]; |
| } |
| break; |
| } |
| case 34: { |
| [self setOsVersion:[input readString]]; |
| break; |
| } |
| case 42: { |
| [self setBuildModel:[input readString]]; |
| break; |
| } |
| case 50: { |
| [self setBuildManufacturer:[input readString]]; |
| break; |
| } |
| case 58: { |
| [self setMobileCarrier:[input readString]]; |
| break; |
| } |
| } |
| } |
| } |
| - (BOOL) hasAppVersion { |
| return result.hasAppVersion; |
| } |
| - (NSString*) appVersion { |
| return result.appVersion; |
| } |
| - (EnvironmentBuilder*) setAppVersion:(NSString*) value { |
| result.hasAppVersion = YES; |
| result.appVersion = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearAppVersion { |
| result.hasAppVersion = NO; |
| result.appVersion = @""; |
| return self; |
| } |
| - (BOOL) hasAppVariant { |
| return result.hasAppVariant; |
| } |
| - (NSString*) appVariant { |
| return result.appVariant; |
| } |
| - (EnvironmentBuilder*) setAppVariant:(NSString*) value { |
| result.hasAppVariant = YES; |
| result.appVariant = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearAppVariant { |
| result.hasAppVariant = NO; |
| result.appVariant = @""; |
| return self; |
| } |
| - (BOOL) hasOsType { |
| return result.hasOsType; |
| } |
| - (EnvironmentOS) osType { |
| return result.osType; |
| } |
| - (EnvironmentBuilder*) setOsType:(EnvironmentOS) value { |
| result.hasOsType = YES; |
| result.osType = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearOsType { |
| result.hasOsType = NO; |
| result.osType = EnvironmentOSUnknown; |
| return self; |
| } |
| - (BOOL) hasOsVersion { |
| return result.hasOsVersion; |
| } |
| - (NSString*) osVersion { |
| return result.osVersion; |
| } |
| - (EnvironmentBuilder*) setOsVersion:(NSString*) value { |
| result.hasOsVersion = YES; |
| result.osVersion = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearOsVersion { |
| result.hasOsVersion = NO; |
| result.osVersion = @""; |
| return self; |
| } |
| - (BOOL) hasBuildModel { |
| return result.hasBuildModel; |
| } |
| - (NSString*) buildModel { |
| return result.buildModel; |
| } |
| - (EnvironmentBuilder*) setBuildModel:(NSString*) value { |
| result.hasBuildModel = YES; |
| result.buildModel = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearBuildModel { |
| result.hasBuildModel = NO; |
| result.buildModel = @""; |
| return self; |
| } |
| - (BOOL) hasBuildManufacturer { |
| return result.hasBuildManufacturer; |
| } |
| - (NSString*) buildManufacturer { |
| return result.buildManufacturer; |
| } |
| - (EnvironmentBuilder*) setBuildManufacturer:(NSString*) value { |
| result.hasBuildManufacturer = YES; |
| result.buildManufacturer = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearBuildManufacturer { |
| result.hasBuildManufacturer = NO; |
| result.buildManufacturer = @""; |
| return self; |
| } |
| - (BOOL) hasMobileCarrier { |
| return result.hasMobileCarrier; |
| } |
| - (NSString*) mobileCarrier { |
| return result.mobileCarrier; |
| } |
| - (EnvironmentBuilder*) setMobileCarrier:(NSString*) value { |
| result.hasMobileCarrier = YES; |
| result.mobileCarrier = value; |
| return self; |
| } |
| - (EnvironmentBuilder*) clearMobileCarrier { |
| result.hasMobileCarrier = NO; |
| result.mobileCarrier = @""; |
| return self; |
| } |
| @end |
| |
| |
| // @@protoc_insertion_point(global_scope) |