// Generated by the protocol buffer compiler.  DO NOT EDIT!

#import "InitiateSignal.pb.h"

@implementation InitiateSignalRoot
static PBExtensionRegistry* extensionRegistry = nil;
+ (PBExtensionRegistry*) extensionRegistry {
  return extensionRegistry;
}

+ (void) initialize {
  if (self == [InitiateSignalRoot class]) {
    PBMutableExtensionRegistry* registry = [PBMutableExtensionRegistry registry];
    [self registerAllExtensions:registry];
    extensionRegistry = registry;
  }
}
+ (void) registerAllExtensions:(PBMutableExtensionRegistry*) registry {
}
@end

@interface InitiateSignal ()
@property (retain) NSString* initiator;
@property int64_t sessionId;
@property int32_t port;
@property (retain) NSString* serverName;
@property int32_t version;
@end

@implementation InitiateSignal

- (BOOL) hasInitiator {
  return !!hasInitiator_;
}
- (void) setHasInitiator:(BOOL) value {
  hasInitiator_ = !!value;
}
@synthesize initiator;
- (BOOL) hasSessionId {
  return !!hasSessionId_;
}
- (void) setHasSessionId:(BOOL) value {
  hasSessionId_ = !!value;
}
@synthesize sessionId;
- (BOOL) hasPort {
  return !!hasPort_;
}
- (void) setHasPort:(BOOL) value {
  hasPort_ = !!value;
}
@synthesize port;
- (BOOL) hasServerName {
  return !!hasServerName_;
}
- (void) setHasServerName:(BOOL) value {
  hasServerName_ = !!value;
}
@synthesize serverName;
- (BOOL) hasVersion {
  return !!hasVersion_;
}
- (void) setHasVersion:(BOOL) value {
  hasVersion_ = !!value;
}
@synthesize version;
- (void) dealloc {
  self.initiator = nil;
  self.serverName = nil;
}
- (id) init {
  if ((self = [super init])) {
    self.initiator = @"";
    self.sessionId = 0L;
    self.port = 0;
    self.serverName = @"";
    self.version = 0;
  }
  return self;
}
static InitiateSignal* defaultInitiateSignalInstance = nil;
+ (void) initialize {
  if (self == [InitiateSignal class]) {
    defaultInitiateSignalInstance = [[InitiateSignal alloc] init];
  }
}
+ (InitiateSignal*) defaultInstance {
  return defaultInitiateSignalInstance;
}
- (InitiateSignal*) defaultInstance {
  return defaultInitiateSignalInstance;
}
- (BOOL) isInitialized {
  return YES;
}
- (void) writeToCodedOutputStream:(PBCodedOutputStream*) output {
  if (self.hasInitiator) {
    [output writeString:1 value:self.initiator];
  }
  if (self.hasSessionId) {
    [output writeUInt64:2 value:self.sessionId];
  }
  if (self.hasPort) {
    [output writeUInt32:3 value:self.port];
  }
  if (self.hasServerName) {
    [output writeString:4 value:self.serverName];
  }
  if (self.hasVersion) {
    [output writeUInt32:5 value:self.version];
  }
  [self.unknownFields writeToCodedOutputStream:output];
}
- (int32_t) serializedSize {
  int32_t size = memoizedSerializedSize;
  if (size != -1) {
    return size;
  }

  size = 0;
  if (self.hasInitiator) {
    size += computeStringSize(1, self.initiator);
  }
  if (self.hasSessionId) {
    size += computeUInt64Size(2, self.sessionId);
  }
  if (self.hasPort) {
    size += computeUInt32Size(3, self.port);
  }
  if (self.hasServerName) {
    size += computeStringSize(4, self.serverName);
  }
  if (self.hasVersion) {
    size += computeUInt32Size(5, self.version);
  }
  size += self.unknownFields.serializedSize;
  memoizedSerializedSize = size;
  return size;
}
+ (InitiateSignal*) parseFromData:(NSData*) data {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromData:data] build];
}
+ (InitiateSignal*) parseFromData:(NSData*) data extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromData:data extensionRegistry:extensionRegistry] build];
}
+ (InitiateSignal*) parseFromInputStream:(NSInputStream*) input {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromInputStream:input] build];
}
+ (InitiateSignal*) parseFromInputStream:(NSInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (InitiateSignal*) parseFromCodedInputStream:(PBCodedInputStream*) input {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromCodedInputStream:input] build];
}
+ (InitiateSignal*) parseFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  return (InitiateSignal*)[[[InitiateSignal builder] mergeFromCodedInputStream:input extensionRegistry:extensionRegistry] build];
}
+ (InitiateSignal_Builder*) builder {
  return [[InitiateSignal_Builder alloc] init];
}
+ (InitiateSignal_Builder*) builderWithPrototype:(InitiateSignal*) prototype {
  return [[InitiateSignal builder] mergeFrom:prototype];
}
- (InitiateSignal_Builder*) builder {
  return [InitiateSignal builder];
}
@end

@interface InitiateSignal_Builder()
@property (retain) InitiateSignal* result;
@end

@implementation InitiateSignal_Builder
@synthesize result;
- (void) dealloc {
  self.result = nil;
}
- (id) init {
  if ((self = [super init])) {
    self.result = [[InitiateSignal alloc] init];
  }
  return self;
}
- (PBGeneratedMessage*) internalGetResult {
  return result;
}
- (InitiateSignal_Builder*) clear {
  self.result = [[InitiateSignal alloc] init];
  return self;
}
- (InitiateSignal_Builder*) clone {
  return [InitiateSignal builderWithPrototype:result];
}
- (InitiateSignal*) defaultInstance {
  return [InitiateSignal defaultInstance];
}
- (InitiateSignal*) build {
  [self checkInitialized];
  return [self buildPartial];
}
- (InitiateSignal*) buildPartial {
  InitiateSignal* returnMe = result;
  self.result = nil;
  return returnMe;
}
- (InitiateSignal_Builder*) mergeFrom:(InitiateSignal*) other {
  if (other == [InitiateSignal defaultInstance]) {
    return self;
  }
  if (other.hasInitiator) {
    [self setInitiator:other.initiator];
  }
  if (other.hasSessionId) {
    [self setSessionId:other.sessionId];
  }
  if (other.hasPort) {
    [self setPort:other.port];
  }
  if (other.hasServerName) {
    [self setServerName:other.serverName];
  }
  if (other.hasVersion) {
    [self setVersion:other.version];
  }
  [self mergeUnknownFields:other.unknownFields];
  return self;
}
- (InitiateSignal_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input {
  return [self mergeFromCodedInputStream:input extensionRegistry:[PBExtensionRegistry emptyRegistry]];
}
- (InitiateSignal_Builder*) mergeFromCodedInputStream:(PBCodedInputStream*) input extensionRegistry:(PBExtensionRegistry*) extensionRegistry {
  PBUnknownFieldSet_Builder* unknownFields = [PBUnknownFieldSet builderWithUnknownFields:self.unknownFields];
  while (YES) {
    int32_t 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 setInitiator:[input readString]];
        break;
      }
      case 16: {
        [self setSessionId:[input readUInt64]];
        break;
      }
      case 24: {
        [self setPort:[input readUInt32]];
        break;
      }
      case 34: {
        [self setServerName:[input readString]];
        break;
      }
      case 40: {
        [self setVersion:[input readUInt32]];
        break;
      }
    }
  }
}
- (BOOL) hasInitiator {
  return result.hasInitiator;
}
- (NSString*) initiator {
  return result.initiator;
}
- (InitiateSignal_Builder*) setInitiator:(NSString*) value {
  result.hasInitiator = YES;
  result.initiator = value;
  return self;
}
- (InitiateSignal_Builder*) clearInitiator {
  result.hasInitiator = NO;
  result.initiator = @"";
  return self;
}
- (BOOL) hasSessionId {
  return result.hasSessionId;
}
- (int64_t) sessionId {
  return result.sessionId;
}
- (InitiateSignal_Builder*) setSessionId:(int64_t) value {
  result.hasSessionId = YES;
  result.sessionId = value;
  return self;
}
- (InitiateSignal_Builder*) clearSessionId {
  result.hasSessionId = NO;
  result.sessionId = 0L;
  return self;
}
- (BOOL) hasPort {
  return result.hasPort;
}
- (int32_t) port {
  return result.port;
}
- (InitiateSignal_Builder*) setPort:(int32_t) value {
  result.hasPort = YES;
  result.port = value;
  return self;
}
- (InitiateSignal_Builder*) clearPort {
  result.hasPort = NO;
  result.port = 0;
  return self;
}
- (BOOL) hasServerName {
  return result.hasServerName;
}
- (NSString*) serverName {
  return result.serverName;
}
- (InitiateSignal_Builder*) setServerName:(NSString*) value {
  result.hasServerName = YES;
  result.serverName = value;
  return self;
}
- (InitiateSignal_Builder*) clearServerName {
  result.hasServerName = NO;
  result.serverName = @"";
  return self;
}
- (BOOL) hasVersion {
  return result.hasVersion;
}
- (int32_t) version {
  return result.version;
}
- (InitiateSignal_Builder*) setVersion:(int32_t) value {
  result.hasVersion = YES;
  result.version = value;
  return self;
}
- (InitiateSignal_Builder*) clearVersion {
  result.hasVersion = NO;
  result.version = 0;
  return self;
}
@end

