text:
/**
 * Autogenerated by Thrift Compiler (0.11.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

#import <Foundation/Foundation.h>

#import "TProtocol.h"
#import "TProtocolFactory.h"
#import "TApplicationError.h"
#import "TProtocolError.h"
#import "TProtocolUtil.h"
#import "TProcessor.h"
#import "TBase.h"
#import "TAsyncTransport.h"
#import "TBaseClient.h"

#import "AromaAuthentication_Authentication.h"
#import "Aroma_Aroma.h"
#import "AromaEndpoint_Endpoint.h"
#import "AromaException_Exceptions.h"

#import "AuthenticationService_AuthenticationService.h"

@implementation AuthenticationService_CreateTokenRequest

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithOwnerId: (AuthenticationService_uuid) ownerId lifetime: (AuthenticationService_LengthOfTime) lifetime desiredTokenType: (AuthenticationService_TokenType) desiredTokenType ownerName: (NSString *) ownerName organizationId: (AuthenticationService_uuid) organizationId organizationName: (NSString *) organizationName
{
  self = [super init];
  if (self)  {
    _ownerId = ownerId;
    _ownerIdIsSet = YES;
    _lifetime = lifetime;
    _lifetimeIsSet = YES;
    _desiredTokenType = desiredTokenType;
    _desiredTokenTypeIsSet = YES;
    _ownerName = ownerName;
    _ownerNameIsSet = YES;
    _organizationId = organizationId;
    _organizationIdIsSet = YES;
    _organizationName = organizationName;
    _organizationNameIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"ownerId"])
    {
      _ownerId = [decoder decodeObjectForKey: @"ownerId"];
      _ownerIdIsSet = YES;
    }
    if ([decoder containsValueForKey: @"lifetime"])
    {
      _lifetime = [decoder decodeObjectForKey: @"lifetime"];
      _lifetimeIsSet = YES;
    }
    if ([decoder containsValueForKey: @"desiredTokenType"])
    {
      _desiredTokenType = [decoder decodeIntForKey: @"desiredTokenType"];
      _desiredTokenTypeIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ownerName"])
    {
      _ownerName = [decoder decodeObjectForKey: @"ownerName"];
      _ownerNameIsSet = YES;
    }
    if ([decoder containsValueForKey: @"organizationId"])
    {
      _organizationId = [decoder decodeObjectForKey: @"organizationId"];
      _organizationIdIsSet = YES;
    }
    if ([decoder containsValueForKey: @"organizationName"])
    {
      _organizationName = [decoder decodeObjectForKey: @"organizationName"];
      _organizationNameIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_ownerIdIsSet)
  {
    [encoder encodeObject: _ownerId forKey: @"ownerId"];
  }
  if (_lifetimeIsSet)
  {
    [encoder encodeObject: _lifetime forKey: @"lifetime"];
  }
  if (_desiredTokenTypeIsSet)
  {
    [encoder encodeInt: _desiredTokenType forKey: @"desiredTokenType"];
  }
  if (_ownerNameIsSet)
  {
    [encoder encodeObject: _ownerName forKey: @"ownerName"];
  }
  if (_organizationIdIsSet)
  {
    [encoder encodeObject: _organizationId forKey: @"organizationId"];
  }
  if (_organizationNameIsSet)
  {
    [encoder encodeObject: _organizationName forKey: @"organizationName"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _ownerIdIsSet ? 2654435761 : 0;
  if (_ownerIdIsSet)
  {
    hash = (hash * 31) ^ [_ownerId hash];
  }
  hash = (hash * 31) ^ _lifetimeIsSet ? 2654435761 : 0;
  if (_lifetimeIsSet)
  {
    hash = (hash * 31) ^ [_lifetime hash];
  }
  hash = (hash * 31) ^ _desiredTokenTypeIsSet ? 2654435761 : 0;
  if (_desiredTokenTypeIsSet)
  {
    hash = (hash * 31) ^ [@(_desiredTokenType) hash];
  }
  hash = (hash * 31) ^ _ownerNameIsSet ? 2654435761 : 0;
  if (_ownerNameIsSet)
  {
    hash = (hash * 31) ^ [_ownerName hash];
  }
  hash = (hash * 31) ^ _organizationIdIsSet ? 2654435761 : 0;
  if (_organizationIdIsSet)
  {
    hash = (hash * 31) ^ [_organizationId hash];
  }
  hash = (hash * 31) ^ _organizationNameIsSet ? 2654435761 : 0;
  if (_organizationNameIsSet)
  {
    hash = (hash * 31) ^ [_organizationName hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_CreateTokenRequest class]]) {
    return NO;
  }
  AuthenticationService_CreateTokenRequest *other = (AuthenticationService_CreateTokenRequest *)anObject;
  if ((_ownerIdIsSet != other->_ownerIdIsSet) ||
      (_ownerIdIsSet && ((_ownerId || other->_ownerId) && ![_ownerId isEqual:other->_ownerId]))) {
    return NO;
  }
  if ((_lifetimeIsSet != other->_lifetimeIsSet) ||
      (_lifetimeIsSet && ((_lifetime || other->_lifetime) && ![_lifetime isEqual:other->_lifetime]))) {
    return NO;
  }
  if ((_desiredTokenTypeIsSet != other->_desiredTokenTypeIsSet) ||
      (_desiredTokenTypeIsSet && (_desiredTokenType != other->_desiredTokenType))) {
    return NO;
  }
  if ((_ownerNameIsSet != other->_ownerNameIsSet) ||
      (_ownerNameIsSet && ((_ownerName || other->_ownerName) && ![_ownerName isEqual:other->_ownerName]))) {
    return NO;
  }
  if ((_organizationIdIsSet != other->_organizationIdIsSet) ||
      (_organizationIdIsSet && ((_organizationId || other->_organizationId) && ![_organizationId isEqual:other->_organizationId]))) {
    return NO;
  }
  if ((_organizationNameIsSet != other->_organizationNameIsSet) ||
      (_organizationNameIsSet && ((_organizationName || other->_organizationName) && ![_organizationName isEqual:other->_organizationName]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_CreateTokenRequest * val = [AuthenticationService_CreateTokenRequest new];
  if (_ownerIdIsSet)
  {
    val.ownerId = [self.ownerId copy];
  }
  if (_lifetimeIsSet)
  {
    val.lifetime = [self.lifetime copy];
  }
  if (_desiredTokenTypeIsSet)
  {
    val.desiredTokenType = self.desiredTokenType;
  }
  if (_ownerNameIsSet)
  {
    val.ownerName = [self.ownerName copy];
  }
  if (_organizationIdIsSet)
  {
    val.organizationId = [self.organizationId copy];
  }
  if (_organizationNameIsSet)
  {
    val.organizationName = [self.organizationName copy];
  }
  return val;
}

- (void) setOwnerId: (NSString *) ownerId {
  _ownerId = ownerId;
  _ownerIdIsSet = YES;
}

- (void) unsetOwnerId {
  _ownerId = nil;
  _ownerIdIsSet = NO;
}

- (void) setLifetime: (Aroma_LengthOfTime *) lifetime {
  _lifetime = lifetime;
  _lifetimeIsSet = YES;
}

- (void) unsetLifetime {
  _lifetime = nil;
  _lifetimeIsSet = NO;
}

- (void) setDesiredTokenType: (AuthenticationService_TokenType) desiredTokenType {
  _desiredTokenType = desiredTokenType;
  _desiredTokenTypeIsSet = YES;
}

- (void) unsetDesiredTokenType {
  _desiredTokenTypeIsSet = NO;
}

- (void) setOwnerName: (NSString *) ownerName {
  _ownerName = ownerName;
  _ownerNameIsSet = YES;
}

- (void) unsetOwnerName {
  _ownerName = nil;
  _ownerNameIsSet = NO;
}

- (void) setOrganizationId: (NSString *) organizationId {
  _organizationId = organizationId;
  _organizationIdIsSet = YES;
}

- (void) unsetOrganizationId {
  _organizationId = nil;
  _organizationIdIsSet = NO;
}

- (void) setOrganizationName: (NSString *) organizationName {
  _organizationName = organizationName;
  _organizationNameIsSet = YES;
}

- (void) unsetOrganizationName {
  _organizationName = nil;
  _organizationNameIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.ownerId = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRUCT) {
          Aroma_LengthOfTime *fieldValue = [[Aroma_LengthOfTime alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.lifetime = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 3:
        if (fieldType == TTypeI32) {
          AuthenticationService_TokenType fieldValue;
          if (![inProtocol readI32:&fieldValue error: __thriftError]) return NO;
          self.desiredTokenType = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 4:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.ownerName = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 5:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.organizationId = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 6:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.organizationName = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"CreateTokenRequest" error: __thriftError]) return NO;
  if (_ownerIdIsSet) {
    if (_ownerId != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ownerId" type: TTypeSTRING fieldID: 1 error: __thriftError]) return NO;
      if (![outProtocol writeString: _ownerId error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_lifetimeIsSet) {
    if (_lifetime != nil) {
      if (![outProtocol writeFieldBeginWithName: @"lifetime" type: TTypeSTRUCT fieldID: 2 error: __thriftError]) return NO;
      if (![_lifetime write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_desiredTokenTypeIsSet) {
    if (![outProtocol writeFieldBeginWithName: @"desiredTokenType" type: TTypeI32 fieldID: 3 error: __thriftError]) return NO;
    if (![outProtocol writeI32: _desiredTokenType error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (_ownerNameIsSet) {
    if (_ownerName != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ownerName" type: TTypeSTRING fieldID: 4 error: __thriftError]) return NO;
      if (![outProtocol writeString: _ownerName error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_organizationIdIsSet) {
    if (_organizationId != nil) {
      if (![outProtocol writeFieldBeginWithName: @"organizationId" type: TTypeSTRING fieldID: 5 error: __thriftError]) return NO;
      if (![outProtocol writeString: _organizationId error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_organizationNameIsSet) {
    if (_organizationName != nil) {
      if (![outProtocol writeFieldBeginWithName: @"organizationName" type: TTypeSTRING fieldID: 6 error: __thriftError]) return NO;
      if (![outProtocol writeString: _organizationName error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_CreateTokenRequest("];
  [ms appendString: @"ownerId:"];
  [ms appendFormat: @"\"%@\"", _ownerId];
  [ms appendString: @",lifetime:"];
  [ms appendFormat: @"%@", _lifetime];
  [ms appendString: @",desiredTokenType:"];
  [ms appendFormat: @"%i", (int)_desiredTokenType];
  [ms appendString: @",ownerName:"];
  [ms appendFormat: @"\"%@\"", _ownerName];
  [ms appendString: @",organizationId:"];
  [ms appendFormat: @"\"%@\"", _organizationId];
  [ms appendString: @",organizationName:"];
  [ms appendFormat: @"\"%@\"", _organizationName];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_CreateTokenResponse

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithToken: (AuthenticationService_AuthenticationToken) token
{
  self = [super init];
  if (self)  {
    _token = token;
    _tokenIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"token"])
    {
      _token = [decoder decodeObjectForKey: @"token"];
      _tokenIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_tokenIsSet)
  {
    [encoder encodeObject: _token forKey: @"token"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _tokenIsSet ? 2654435761 : 0;
  if (_tokenIsSet)
  {
    hash = (hash * 31) ^ [_token hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_CreateTokenResponse class]]) {
    return NO;
  }
  AuthenticationService_CreateTokenResponse *other = (AuthenticationService_CreateTokenResponse *)anObject;
  if ((_tokenIsSet != other->_tokenIsSet) ||
      (_tokenIsSet && ((_token || other->_token) && ![_token isEqual:other->_token]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_CreateTokenResponse * val = [AuthenticationService_CreateTokenResponse new];
  if (_tokenIsSet)
  {
    val.token = [self.token copy];
  }
  return val;
}

- (void) setToken: (AromaAuthentication_AuthenticationToken *) token {
  _token = token;
  _tokenIsSet = YES;
}

- (void) unsetToken {
  _token = nil;
  _tokenIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaAuthentication_AuthenticationToken *fieldValue = [[AromaAuthentication_AuthenticationToken alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.token = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"CreateTokenResponse" error: __thriftError]) return NO;
  if (_tokenIsSet) {
    if (_token != nil) {
      if (![outProtocol writeFieldBeginWithName: @"token" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_token write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_CreateTokenResponse("];
  [ms appendString: @"token:"];
  [ms appendFormat: @"%@", _token];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_GetTokenInfoRequest

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithTokenId: (NSString *) tokenId tokenType: (AuthenticationService_TokenType) tokenType
{
  self = [super init];
  if (self)  {
    _tokenId = tokenId;
    _tokenIdIsSet = YES;
    _tokenType = tokenType;
    _tokenTypeIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"tokenId"])
    {
      _tokenId = [decoder decodeObjectForKey: @"tokenId"];
      _tokenIdIsSet = YES;
    }
    if ([decoder containsValueForKey: @"tokenType"])
    {
      _tokenType = [decoder decodeIntForKey: @"tokenType"];
      _tokenTypeIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_tokenIdIsSet)
  {
    [encoder encodeObject: _tokenId forKey: @"tokenId"];
  }
  if (_tokenTypeIsSet)
  {
    [encoder encodeInt: _tokenType forKey: @"tokenType"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _tokenIdIsSet ? 2654435761 : 0;
  if (_tokenIdIsSet)
  {
    hash = (hash * 31) ^ [_tokenId hash];
  }
  hash = (hash * 31) ^ _tokenTypeIsSet ? 2654435761 : 0;
  if (_tokenTypeIsSet)
  {
    hash = (hash * 31) ^ [@(_tokenType) hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_GetTokenInfoRequest class]]) {
    return NO;
  }
  AuthenticationService_GetTokenInfoRequest *other = (AuthenticationService_GetTokenInfoRequest *)anObject;
  if ((_tokenIdIsSet != other->_tokenIdIsSet) ||
      (_tokenIdIsSet && ((_tokenId || other->_tokenId) && ![_tokenId isEqual:other->_tokenId]))) {
    return NO;
  }
  if ((_tokenTypeIsSet != other->_tokenTypeIsSet) ||
      (_tokenTypeIsSet && (_tokenType != other->_tokenType))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_GetTokenInfoRequest * val = [AuthenticationService_GetTokenInfoRequest new];
  if (_tokenIdIsSet)
  {
    val.tokenId = [self.tokenId copy];
  }
  if (_tokenTypeIsSet)
  {
    val.tokenType = self.tokenType;
  }
  return val;
}

- (void) setTokenId: (NSString *) tokenId {
  _tokenId = tokenId;
  _tokenIdIsSet = YES;
}

- (void) unsetTokenId {
  _tokenId = nil;
  _tokenIdIsSet = NO;
}

- (void) setTokenType: (AuthenticationService_TokenType) tokenType {
  _tokenType = tokenType;
  _tokenTypeIsSet = YES;
}

- (void) unsetTokenType {
  _tokenTypeIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.tokenId = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeI32) {
          AuthenticationService_TokenType fieldValue;
          if (![inProtocol readI32:&fieldValue error: __thriftError]) return NO;
          self.tokenType = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"GetTokenInfoRequest" error: __thriftError]) return NO;
  if (_tokenIdIsSet) {
    if (_tokenId != nil) {
      if (![outProtocol writeFieldBeginWithName: @"tokenId" type: TTypeSTRING fieldID: 1 error: __thriftError]) return NO;
      if (![outProtocol writeString: _tokenId error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_tokenTypeIsSet) {
    if (![outProtocol writeFieldBeginWithName: @"tokenType" type: TTypeI32 fieldID: 2 error: __thriftError]) return NO;
    if (![outProtocol writeI32: _tokenType error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_GetTokenInfoRequest("];
  [ms appendString: @"tokenId:"];
  [ms appendFormat: @"\"%@\"", _tokenId];
  [ms appendString: @",tokenType:"];
  [ms appendFormat: @"%i", (int)_tokenType];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_GetTokenInfoResponse

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithToken: (AuthenticationService_AuthenticationToken) token
{
  self = [super init];
  if (self)  {
    _token = token;
    _tokenIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"token"])
    {
      _token = [decoder decodeObjectForKey: @"token"];
      _tokenIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_tokenIsSet)
  {
    [encoder encodeObject: _token forKey: @"token"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _tokenIsSet ? 2654435761 : 0;
  if (_tokenIsSet)
  {
    hash = (hash * 31) ^ [_token hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_GetTokenInfoResponse class]]) {
    return NO;
  }
  AuthenticationService_GetTokenInfoResponse *other = (AuthenticationService_GetTokenInfoResponse *)anObject;
  if ((_tokenIsSet != other->_tokenIsSet) ||
      (_tokenIsSet && ((_token || other->_token) && ![_token isEqual:other->_token]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_GetTokenInfoResponse * val = [AuthenticationService_GetTokenInfoResponse new];
  if (_tokenIsSet)
  {
    val.token = [self.token copy];
  }
  return val;
}

- (void) setToken: (AromaAuthentication_AuthenticationToken *) token {
  _token = token;
  _tokenIsSet = YES;
}

- (void) unsetToken {
  _token = nil;
  _tokenIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaAuthentication_AuthenticationToken *fieldValue = [[AromaAuthentication_AuthenticationToken alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.token = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"GetTokenInfoResponse" error: __thriftError]) return NO;
  if (_tokenIsSet) {
    if (_token != nil) {
      if (![outProtocol writeFieldBeginWithName: @"token" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_token write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_GetTokenInfoResponse("];
  [ms appendString: @"token:"];
  [ms appendFormat: @"%@", _token];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_InvalidateTokenRequest

- (instancetype) init
{
  self = [super init];
  if (self)  {
    self.multipleTokens = @[]  }
  return self;
}

- (instancetype) initWithToken: (AuthenticationService_AuthenticationToken) token multipleTokens: (NSArray<AuthenticationService_AuthenticationToken> *) multipleTokens belongingTo: (AuthenticationService_uuid) belongingTo
{
  self = [super init];
  if (self)  {
    _token = token;
    _tokenIsSet = YES;
    _multipleTokens = [multipleTokens mutableCopy];
    _multipleTokensIsSet = YES;
    _belongingTo = belongingTo;
    _belongingToIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"token"])
    {
      _token = [decoder decodeObjectForKey: @"token"];
      _tokenIsSet = YES;
    }
    if ([decoder containsValueForKey: @"multipleTokens"])
    {
      _multipleTokens = [decoder decodeObjectForKey: @"multipleTokens"];
      _multipleTokensIsSet = YES;
    }
    if ([decoder containsValueForKey: @"belongingTo"])
    {
      _belongingTo = [decoder decodeObjectForKey: @"belongingTo"];
      _belongingToIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_tokenIsSet)
  {
    [encoder encodeObject: _token forKey: @"token"];
  }
  if (_multipleTokensIsSet)
  {
    [encoder encodeObject: _multipleTokens forKey: @"multipleTokens"];
  }
  if (_belongingToIsSet)
  {
    [encoder encodeObject: _belongingTo forKey: @"belongingTo"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _tokenIsSet ? 2654435761 : 0;
  if (_tokenIsSet)
  {
    hash = (hash * 31) ^ [_token hash];
  }
  hash = (hash * 31) ^ _multipleTokensIsSet ? 2654435761 : 0;
  if (_multipleTokensIsSet)
  {
    hash = (hash * 31) ^ [_multipleTokens hash];
  }
  hash = (hash * 31) ^ _belongingToIsSet ? 2654435761 : 0;
  if (_belongingToIsSet)
  {
    hash = (hash * 31) ^ [_belongingTo hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_InvalidateTokenRequest class]]) {
    return NO;
  }
  AuthenticationService_InvalidateTokenRequest *other = (AuthenticationService_InvalidateTokenRequest *)anObject;
  if ((_tokenIsSet != other->_tokenIsSet) ||
      (_tokenIsSet && ((_token || other->_token) && ![_token isEqual:other->_token]))) {
    return NO;
  }
  if ((_multipleTokensIsSet != other->_multipleTokensIsSet) ||
      (_multipleTokensIsSet && ((_multipleTokens || other->_multipleTokens) && ![_multipleTokens isEqual:other->_multipleTokens]))) {
    return NO;
  }
  if ((_belongingToIsSet != other->_belongingToIsSet) ||
      (_belongingToIsSet && ((_belongingTo || other->_belongingTo) && ![_belongingTo isEqual:other->_belongingTo]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_InvalidateTokenRequest * val = [AuthenticationService_InvalidateTokenRequest new];
  if (_tokenIsSet)
  {
    val.token = [self.token copy];
  }
  if (_multipleTokensIsSet)
  {
    val.multipleTokens = [self.multipleTokens copy];
  }
  if (_belongingToIsSet)
  {
    val.belongingTo = [self.belongingTo copy];
  }
  return val;
}

- (void) setToken: (AromaAuthentication_AuthenticationToken *) token {
  _token = token;
  _tokenIsSet = YES;
}

- (void) unsetToken {
  _token = nil;
  _tokenIsSet = NO;
}

- (void) setMultipleTokens: (NSMutableArray<AuthenticationService_AuthenticationToken> *) multipleTokens {
  _multipleTokens = multipleTokens;
  _multipleTokensIsSet = YES;
}

- (void) unsetMultipleTokens {
  _multipleTokens = nil;
  _multipleTokensIsSet = NO;
}

- (void) setBelongingTo: (NSString *) belongingTo {
  _belongingTo = belongingTo;
  _belongingToIsSet = YES;
}

- (void) unsetBelongingTo {
  _belongingTo = nil;
  _belongingToIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaAuthentication_AuthenticationToken *fieldValue = [[AromaAuthentication_AuthenticationToken alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.token = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeLIST) {
          SInt32 _size0;
          if (![inProtocol readListBeginReturningElementType: NULL size: &_size0 error: __thriftError]) return NO;
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0];
          int _i1;
          for (_i1 = 0; _i1 < _size0; ++_i1)
          {
            AromaAuthentication_AuthenticationToken *_elem2 = [[AromaAuthentication_AuthenticationToken alloc] init];
            if (![_elem2 read: inProtocol error: __thriftError]) return NO;
            [fieldValue addObject: _elem2];
          }
          if (![inProtocol readListEnd: __thriftError]) return NO;
          self.multipleTokens = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 3:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.belongingTo = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"InvalidateTokenRequest" error: __thriftError]) return NO;
  if (_tokenIsSet) {
    if (_token != nil) {
      if (![outProtocol writeFieldBeginWithName: @"token" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_token write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_multipleTokensIsSet) {
    if (_multipleTokens != nil) {
      if (![outProtocol writeFieldBeginWithName: @"multipleTokens" type: TTypeLIST fieldID: 2 error: __thriftError]) return NO;
      {
        if (![outProtocol writeListBeginWithElementType: TTypeSTRUCT size: (SInt32)[_multipleTokens count] error: __thriftError]) return NO;
        int idx4;
        for (idx4 = 0; idx4 < [_multipleTokens count]; idx4++)
        {
          if (![[_multipleTokens objectAtIndex: idx4] write: outProtocol error: __thriftError]) return NO;
        }
        if (![outProtocol writeListEnd: __thriftError]) return NO;
      }
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_belongingToIsSet) {
    if (_belongingTo != nil) {
      if (![outProtocol writeFieldBeginWithName: @"belongingTo" type: TTypeSTRING fieldID: 3 error: __thriftError]) return NO;
      if (![outProtocol writeString: _belongingTo error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_InvalidateTokenRequest("];
  [ms appendString: @"token:"];
  [ms appendFormat: @"%@", _token];
  [ms appendString: @",multipleTokens:"];
  [ms appendFormat: @"%@", _multipleTokens];
  [ms appendString: @",belongingTo:"];
  [ms appendFormat: @"\"%@\"", _belongingTo];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_InvalidateTokenResponse

- (instancetype) init
{
  self = [super init];
  if (self)  {
    self.message = @"Operation completed successfully";

  }
  return self;
}

- (instancetype) initWithMessage: (NSString *) message
{
  self = [super init];
  if (self)  {
    _message = message;
    _messageIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"message"])
    {
      _message = [decoder decodeObjectForKey: @"message"];
      _messageIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_messageIsSet)
  {
    [encoder encodeObject: _message forKey: @"message"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _messageIsSet ? 2654435761 : 0;
  if (_messageIsSet)
  {
    hash = (hash * 31) ^ [_message hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_InvalidateTokenResponse class]]) {
    return NO;
  }
  AuthenticationService_InvalidateTokenResponse *other = (AuthenticationService_InvalidateTokenResponse *)anObject;
  if ((_messageIsSet != other->_messageIsSet) ||
      (_messageIsSet && ((_message || other->_message) && ![_message isEqual:other->_message]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_InvalidateTokenResponse * val = [AuthenticationService_InvalidateTokenResponse new];
  if (_messageIsSet)
  {
    val.message = [self.message copy];
  }
  return val;
}

- (void) setMessage: (NSString *) message {
  _message = message;
  _messageIsSet = YES;
}

- (void) unsetMessage {
  _message = nil;
  _messageIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.message = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"InvalidateTokenResponse" error: __thriftError]) return NO;
  if (_messageIsSet) {
    if (_message != nil) {
      if (![outProtocol writeFieldBeginWithName: @"message" type: TTypeSTRING fieldID: 1 error: __thriftError]) return NO;
      if (![outProtocol writeString: _message error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_InvalidateTokenResponse("];
  [ms appendString: @"message:"];
  [ms appendFormat: @"\"%@\"", _message];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_VerifyTokenRequest

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithTokenId: (NSString *) tokenId ownerId: (NSString *) ownerId
{
  self = [super init];
  if (self)  {
    _tokenId = tokenId;
    _tokenIdIsSet = YES;
    _ownerId = ownerId;
    _ownerIdIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"tokenId"])
    {
      _tokenId = [decoder decodeObjectForKey: @"tokenId"];
      _tokenIdIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ownerId"])
    {
      _ownerId = [decoder decodeObjectForKey: @"ownerId"];
      _ownerIdIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_tokenIdIsSet)
  {
    [encoder encodeObject: _tokenId forKey: @"tokenId"];
  }
  if (_ownerIdIsSet)
  {
    [encoder encodeObject: _ownerId forKey: @"ownerId"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _tokenIdIsSet ? 2654435761 : 0;
  if (_tokenIdIsSet)
  {
    hash = (hash * 31) ^ [_tokenId hash];
  }
  hash = (hash * 31) ^ _ownerIdIsSet ? 2654435761 : 0;
  if (_ownerIdIsSet)
  {
    hash = (hash * 31) ^ [_ownerId hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_VerifyTokenRequest class]]) {
    return NO;
  }
  AuthenticationService_VerifyTokenRequest *other = (AuthenticationService_VerifyTokenRequest *)anObject;
  if ((_tokenIdIsSet != other->_tokenIdIsSet) ||
      (_tokenIdIsSet && ((_tokenId || other->_tokenId) && ![_tokenId isEqual:other->_tokenId]))) {
    return NO;
  }
  if ((_ownerIdIsSet != other->_ownerIdIsSet) ||
      (_ownerIdIsSet && ((_ownerId || other->_ownerId) && ![_ownerId isEqual:other->_ownerId]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_VerifyTokenRequest * val = [AuthenticationService_VerifyTokenRequest new];
  if (_tokenIdIsSet)
  {
    val.tokenId = [self.tokenId copy];
  }
  if (_ownerIdIsSet)
  {
    val.ownerId = [self.ownerId copy];
  }
  return val;
}

- (void) setTokenId: (NSString *) tokenId {
  _tokenId = tokenId;
  _tokenIdIsSet = YES;
}

- (void) unsetTokenId {
  _tokenId = nil;
  _tokenIdIsSet = NO;
}

- (void) setOwnerId: (NSString *) ownerId {
  _ownerId = ownerId;
  _ownerIdIsSet = YES;
}

- (void) unsetOwnerId {
  _ownerId = nil;
  _ownerIdIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.tokenId = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.ownerId = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"VerifyTokenRequest" error: __thriftError]) return NO;
  if (_tokenIdIsSet) {
    if (_tokenId != nil) {
      if (![outProtocol writeFieldBeginWithName: @"tokenId" type: TTypeSTRING fieldID: 1 error: __thriftError]) return NO;
      if (![outProtocol writeString: _tokenId error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (_ownerIdIsSet) {
    if (_ownerId != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ownerId" type: TTypeSTRING fieldID: 2 error: __thriftError]) return NO;
      if (![outProtocol writeString: _ownerId error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_VerifyTokenRequest("];
  [ms appendString: @"tokenId:"];
  [ms appendFormat: @"\"%@\"", _tokenId];
  [ms appendString: @",ownerId:"];
  [ms appendFormat: @"\"%@\"", _ownerId];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation AuthenticationService_VerifyTokenResponse

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithMessage: (NSString *) message
{
  self = [super init];
  if (self)  {
    _message = message;
    _messageIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"message"])
    {
      _message = [decoder decodeObjectForKey: @"message"];
      _messageIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_messageIsSet)
  {
    [encoder encodeObject: _message forKey: @"message"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _messageIsSet ? 2654435761 : 0;
  if (_messageIsSet)
  {
    hash = (hash * 31) ^ [_message hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_VerifyTokenResponse class]]) {
    return NO;
  }
  AuthenticationService_VerifyTokenResponse *other = (AuthenticationService_VerifyTokenResponse *)anObject;
  if ((_messageIsSet != other->_messageIsSet) ||
      (_messageIsSet && ((_message || other->_message) && ![_message isEqual:other->_message]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_VerifyTokenResponse * val = [AuthenticationService_VerifyTokenResponse new];
  if (_messageIsSet)
  {
    val.message = [self.message copy];
  }
  return val;
}

- (void) setMessage: (NSString *) message {
  _message = message;
  _messageIsSet = YES;
}

- (void) unsetMessage {
  _message = nil;
  _messageIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRING) {
          NSString * fieldValue;
          if (![inProtocol readString:&fieldValue error: __thriftError]) return NO;
          self.message = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"VerifyTokenResponse" error: __thriftError]) return NO;
  if (_messageIsSet) {
    if (_message != nil) {
      if (![outProtocol writeFieldBeginWithName: @"message" type: TTypeSTRING fieldID: 1 error: __thriftError]) return NO;
      if (![outProtocol writeString: _message error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_VerifyTokenResponse("];
  [ms appendString: @"message:"];
  [ms appendFormat: @"\"%@\"", _message];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

NSString *AuthenticationService_AuthenticationServiceErrorDomain = @"AuthenticationService_AuthenticationServiceErrorDomain";

AuthenticationService_int AuthenticationService_SERVICE_PORT = 7026;
AromaEndpoint_TcpEndpoint * AuthenticationService_PRODUCTION_ENDPOINT;
AromaEndpoint_TcpEndpoint * AuthenticationService_BETA_ENDPOINT;
Aroma_LengthOfTime * AuthenticationService_DEFAULT_TOKEN_LIFETIME;

@implementation AuthenticationService_AuthenticationServiceConstants

+ (void) initialize {

  AuthenticationService_PRODUCTION_ENDPOINT = [AromaEndpoint_TcpEndpoint new];
  [AuthenticationService_PRODUCTION_ENDPOINT setHostname:@"authentication-srv.aroma.tech"];
  [AuthenticationService_PRODUCTION_ENDPOINT setPort:7026];
;

  AuthenticationService_BETA_ENDPOINT = [AromaEndpoint_TcpEndpoint new];
  [AuthenticationService_BETA_ENDPOINT setHostname:@"authentication-srv.beta.aroma.tech"];
  [AuthenticationService_BETA_ENDPOINT setPort:7026];
;

  AuthenticationService_DEFAULT_TOKEN_LIFETIME = [Aroma_LengthOfTime new];
  [AuthenticationService_DEFAULT_TOKEN_LIFETIME setValue:90];
  [AuthenticationService_DEFAULT_TOKEN_LIFETIME setUnit:5];
;
}

+ (AromaEndpoint_TcpEndpoint *) PRODUCTION_ENDPOINT {
  return AuthenticationService_PRODUCTION_ENDPOINT;
}

+ (AromaEndpoint_TcpEndpoint *) BETA_ENDPOINT {
  return AuthenticationService_BETA_ENDPOINT;
}

+ (Aroma_LengthOfTime *) DEFAULT_TOKEN_LIFETIME {
  return AuthenticationService_DEFAULT_TOKEN_LIFETIME;
}
@end

@interface AuthenticationService_AuthenticationService_getApiVersion_args : NSObject <TBase, NSCoding, NSCopying>

@end

@implementation AuthenticationService_AuthenticationService_getApiVersion_args

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_getApiVersion_args class]]) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_getApiVersion_args * val = [AuthenticationService_AuthenticationService_getApiVersion_args new];
  return val;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getApiVersion_args" error: __thriftError]) return NO;
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_getApiVersion_args("];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_getApiVersion_result : NSObject <TBase, NSCoding, NSCopying>

@property (assign, nonatomic) double success;
@property (assign, nonatomic) BOOL successIsSet;
- (void) unsetSuccess;

- (instancetype) initWithSuccess: (double) success;

@end

@implementation AuthenticationService_AuthenticationService_getApiVersion_result

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithSuccess: (double) success
{
  self = [super init];
  if (self)  {
    _success = success;
    _successIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"success"])
    {
      _success = [decoder decodeDoubleForKey: @"success"];
      _successIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_successIsSet)
  {
    [encoder encodeDouble: _success forKey: @"success"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _successIsSet ? 2654435761 : 0;
  if (_successIsSet)
  {
    hash = (hash * 31) ^ [@(_success) hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_getApiVersion_result class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_getApiVersion_result *other = (AuthenticationService_AuthenticationService_getApiVersion_result *)anObject;
  if ((_successIsSet != other->_successIsSet) ||
      (_successIsSet && (_success != other->_success))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_getApiVersion_result * val = [AuthenticationService_AuthenticationService_getApiVersion_result new];
  if (_successIsSet)
  {
    val.success = self.success;
  }
  return val;
}

- (void) setSuccess: (double) success {
  _success = success;
  _successIsSet = YES;
}

- (void) unsetSuccess {
  _successIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 0:
        if (fieldType == TTypeDOUBLE) {
          double fieldValue;
          if (![inProtocol readDouble:&fieldValue error: __thriftError]) return NO;
          self.success = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getApiVersion_result" error: __thriftError]) return NO;

  if (_successIsSet) {
    if (![outProtocol writeFieldBeginWithName: @"success" type: TTypeDOUBLE fieldID: 0 error: __thriftError]) return NO;
    if (![outProtocol writeDouble: _success error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_getApiVersion_result("];
  [ms appendString: @"success:"];
  [ms appendFormat: @"%f", _success];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_createToken_args : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_CreateTokenRequest * request;
@property (assign, nonatomic) BOOL requestIsSet;
- (void) unsetRequest;

- (instancetype) initWithRequest: (AuthenticationService_CreateTokenRequest *) request;

@end

@implementation AuthenticationService_AuthenticationService_createToken_args

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithRequest: (AuthenticationService_CreateTokenRequest *) request
{
  self = [super init];
  if (self)  {
    _request = request;
    _requestIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"request"])
    {
      _request = [decoder decodeObjectForKey: @"request"];
      _requestIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_requestIsSet)
  {
    [encoder encodeObject: _request forKey: @"request"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _requestIsSet ? 2654435761 : 0;
  if (_requestIsSet)
  {
    hash = (hash * 31) ^ [_request hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_createToken_args class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_createToken_args *other = (AuthenticationService_AuthenticationService_createToken_args *)anObject;
  if ((_requestIsSet != other->_requestIsSet) ||
      (_requestIsSet && ((_request || other->_request) && ![_request isEqual:other->_request]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_createToken_args * val = [AuthenticationService_AuthenticationService_createToken_args new];
  if (_requestIsSet)
  {
    val.request = [self.request copy];
  }
  return val;
}

- (void) setRequest: (AuthenticationService_CreateTokenRequest *) request {
  _request = request;
  _requestIsSet = YES;
}

- (void) unsetRequest {
  _request = nil;
  _requestIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_CreateTokenRequest *fieldValue = [[AuthenticationService_CreateTokenRequest alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.request = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_createToken_args" error: __thriftError]) return NO;
  if (_requestIsSet) {
    if (_request != nil) {
      if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_request write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_createToken_args("];
  [ms appendString: @"request:"];
  [ms appendFormat: @"%@", _request];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_createToken_result : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_CreateTokenResponse * success;
@property (assign, nonatomic) BOOL successIsSet;
- (void) unsetSuccess;

@property (strong, nonatomic) AuthenticationService_OperationFailedException ex1;
@property (assign, nonatomic) BOOL ex1IsSet;
- (void) unsetEx1;

@property (strong, nonatomic) AuthenticationService_InvalidArgumentException ex2;
@property (assign, nonatomic) BOOL ex2IsSet;
- (void) unsetEx2;

- (instancetype) initWithSuccess: (AuthenticationService_CreateTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidArgumentException) ex2;

@end

@implementation AuthenticationService_AuthenticationService_createToken_result

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithSuccess: (AuthenticationService_CreateTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidArgumentException) ex2
{
  self = [super init];
  if (self)  {
    _success = success;
    _successIsSet = YES;
    _ex1 = ex1;
    _ex1IsSet = YES;
    _ex2 = ex2;
    _ex2IsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"success"])
    {
      _success = [decoder decodeObjectForKey: @"success"];
      _successIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex1"])
    {
      _ex1 = [decoder decodeObjectForKey: @"ex1"];
      _ex1IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex2"])
    {
      _ex2 = [decoder decodeObjectForKey: @"ex2"];
      _ex2IsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_successIsSet)
  {
    [encoder encodeObject: _success forKey: @"success"];
  }
  if (_ex1IsSet)
  {
    [encoder encodeObject: _ex1 forKey: @"ex1"];
  }
  if (_ex2IsSet)
  {
    [encoder encodeObject: _ex2 forKey: @"ex2"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _successIsSet ? 2654435761 : 0;
  if (_successIsSet)
  {
    hash = (hash * 31) ^ [_success hash];
  }
  hash = (hash * 31) ^ _ex1IsSet ? 2654435761 : 0;
  if (_ex1IsSet)
  {
    hash = (hash * 31) ^ [_ex1 hash];
  }
  hash = (hash * 31) ^ _ex2IsSet ? 2654435761 : 0;
  if (_ex2IsSet)
  {
    hash = (hash * 31) ^ [_ex2 hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_createToken_result class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_createToken_result *other = (AuthenticationService_AuthenticationService_createToken_result *)anObject;
  if ((_successIsSet != other->_successIsSet) ||
      (_successIsSet && ((_success || other->_success) && ![_success isEqual:other->_success]))) {
    return NO;
  }
  if ((_ex1IsSet != other->_ex1IsSet) ||
      (_ex1IsSet && ((_ex1 || other->_ex1) && ![_ex1 isEqual:other->_ex1]))) {
    return NO;
  }
  if ((_ex2IsSet != other->_ex2IsSet) ||
      (_ex2IsSet && ((_ex2 || other->_ex2) && ![_ex2 isEqual:other->_ex2]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_createToken_result * val = [AuthenticationService_AuthenticationService_createToken_result new];
  if (_successIsSet)
  {
    val.success = [self.success copy];
  }
  if (_ex1IsSet)
  {
    val.ex1 = [self.ex1 copy];
  }
  if (_ex2IsSet)
  {
    val.ex2 = [self.ex2 copy];
  }
  return val;
}

- (void) setSuccess: (AuthenticationService_CreateTokenResponse *) success {
  _success = success;
  _successIsSet = YES;
}

- (void) unsetSuccess {
  _success = nil;
  _successIsSet = NO;
}

- (void) setEx1: (AromaException_OperationFailedException *) ex1 {
  _ex1 = ex1;
  _ex1IsSet = YES;
}

- (void) unsetEx1 {
  _ex1 = nil;
  _ex1IsSet = NO;
}

- (void) setEx2: (AromaException_InvalidArgumentException *) ex2 {
  _ex2 = ex2;
  _ex2IsSet = YES;
}

- (void) unsetEx2 {
  _ex2 = nil;
  _ex2IsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 0:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_CreateTokenResponse *fieldValue = [[AuthenticationService_CreateTokenResponse alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.success = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaException_OperationFailedException *fieldValue = [[AromaException_OperationFailedException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex1 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidArgumentException *fieldValue = [[AromaException_InvalidArgumentException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex2 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_createToken_result" error: __thriftError]) return NO;

  if (_successIsSet) {
    if (_success != nil) {
      if (![outProtocol writeFieldBeginWithName: @"success" type: TTypeSTRUCT fieldID: 0 error: __thriftError]) return NO;
      if (![_success write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex1IsSet) {
    if (_ex1 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex1" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_ex1 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex2IsSet) {
    if (_ex2 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex2" type: TTypeSTRUCT fieldID: 2 error: __thriftError]) return NO;
      if (![_ex2 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_createToken_result("];
  [ms appendString: @"success:"];
  [ms appendFormat: @"%@", _success];
  [ms appendString: @",ex1:"];
  [ms appendFormat: @"%@", _ex1];
  [ms appendString: @",ex2:"];
  [ms appendFormat: @"%@", _ex2];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_getTokenInfo_args : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_GetTokenInfoRequest * request;
@property (assign, nonatomic) BOOL requestIsSet;
- (void) unsetRequest;

- (instancetype) initWithRequest: (AuthenticationService_GetTokenInfoRequest *) request;

@end

@implementation AuthenticationService_AuthenticationService_getTokenInfo_args

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithRequest: (AuthenticationService_GetTokenInfoRequest *) request
{
  self = [super init];
  if (self)  {
    _request = request;
    _requestIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"request"])
    {
      _request = [decoder decodeObjectForKey: @"request"];
      _requestIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_requestIsSet)
  {
    [encoder encodeObject: _request forKey: @"request"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _requestIsSet ? 2654435761 : 0;
  if (_requestIsSet)
  {
    hash = (hash * 31) ^ [_request hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_getTokenInfo_args class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_getTokenInfo_args *other = (AuthenticationService_AuthenticationService_getTokenInfo_args *)anObject;
  if ((_requestIsSet != other->_requestIsSet) ||
      (_requestIsSet && ((_request || other->_request) && ![_request isEqual:other->_request]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_getTokenInfo_args * val = [AuthenticationService_AuthenticationService_getTokenInfo_args new];
  if (_requestIsSet)
  {
    val.request = [self.request copy];
  }
  return val;
}

- (void) setRequest: (AuthenticationService_GetTokenInfoRequest *) request {
  _request = request;
  _requestIsSet = YES;
}

- (void) unsetRequest {
  _request = nil;
  _requestIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_GetTokenInfoRequest *fieldValue = [[AuthenticationService_GetTokenInfoRequest alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.request = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getTokenInfo_args" error: __thriftError]) return NO;
  if (_requestIsSet) {
    if (_request != nil) {
      if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_request write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_getTokenInfo_args("];
  [ms appendString: @"request:"];
  [ms appendFormat: @"%@", _request];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_getTokenInfo_result : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_GetTokenInfoResponse * success;
@property (assign, nonatomic) BOOL successIsSet;
- (void) unsetSuccess;

@property (strong, nonatomic) AuthenticationService_OperationFailedException ex1;
@property (assign, nonatomic) BOOL ex1IsSet;
- (void) unsetEx1;

@property (strong, nonatomic) AuthenticationService_InvalidTokenException ex2;
@property (assign, nonatomic) BOOL ex2IsSet;
- (void) unsetEx2;

@property (strong, nonatomic) AuthenticationService_InvalidArgumentException ex3;
@property (assign, nonatomic) BOOL ex3IsSet;
- (void) unsetEx3;

- (instancetype) initWithSuccess: (AuthenticationService_GetTokenInfoResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3;

@end

@implementation AuthenticationService_AuthenticationService_getTokenInfo_result

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithSuccess: (AuthenticationService_GetTokenInfoResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3
{
  self = [super init];
  if (self)  {
    _success = success;
    _successIsSet = YES;
    _ex1 = ex1;
    _ex1IsSet = YES;
    _ex2 = ex2;
    _ex2IsSet = YES;
    _ex3 = ex3;
    _ex3IsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"success"])
    {
      _success = [decoder decodeObjectForKey: @"success"];
      _successIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex1"])
    {
      _ex1 = [decoder decodeObjectForKey: @"ex1"];
      _ex1IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex2"])
    {
      _ex2 = [decoder decodeObjectForKey: @"ex2"];
      _ex2IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex3"])
    {
      _ex3 = [decoder decodeObjectForKey: @"ex3"];
      _ex3IsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_successIsSet)
  {
    [encoder encodeObject: _success forKey: @"success"];
  }
  if (_ex1IsSet)
  {
    [encoder encodeObject: _ex1 forKey: @"ex1"];
  }
  if (_ex2IsSet)
  {
    [encoder encodeObject: _ex2 forKey: @"ex2"];
  }
  if (_ex3IsSet)
  {
    [encoder encodeObject: _ex3 forKey: @"ex3"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _successIsSet ? 2654435761 : 0;
  if (_successIsSet)
  {
    hash = (hash * 31) ^ [_success hash];
  }
  hash = (hash * 31) ^ _ex1IsSet ? 2654435761 : 0;
  if (_ex1IsSet)
  {
    hash = (hash * 31) ^ [_ex1 hash];
  }
  hash = (hash * 31) ^ _ex2IsSet ? 2654435761 : 0;
  if (_ex2IsSet)
  {
    hash = (hash * 31) ^ [_ex2 hash];
  }
  hash = (hash * 31) ^ _ex3IsSet ? 2654435761 : 0;
  if (_ex3IsSet)
  {
    hash = (hash * 31) ^ [_ex3 hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_getTokenInfo_result class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_getTokenInfo_result *other = (AuthenticationService_AuthenticationService_getTokenInfo_result *)anObject;
  if ((_successIsSet != other->_successIsSet) ||
      (_successIsSet && ((_success || other->_success) && ![_success isEqual:other->_success]))) {
    return NO;
  }
  if ((_ex1IsSet != other->_ex1IsSet) ||
      (_ex1IsSet && ((_ex1 || other->_ex1) && ![_ex1 isEqual:other->_ex1]))) {
    return NO;
  }
  if ((_ex2IsSet != other->_ex2IsSet) ||
      (_ex2IsSet && ((_ex2 || other->_ex2) && ![_ex2 isEqual:other->_ex2]))) {
    return NO;
  }
  if ((_ex3IsSet != other->_ex3IsSet) ||
      (_ex3IsSet && ((_ex3 || other->_ex3) && ![_ex3 isEqual:other->_ex3]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_getTokenInfo_result * val = [AuthenticationService_AuthenticationService_getTokenInfo_result new];
  if (_successIsSet)
  {
    val.success = [self.success copy];
  }
  if (_ex1IsSet)
  {
    val.ex1 = [self.ex1 copy];
  }
  if (_ex2IsSet)
  {
    val.ex2 = [self.ex2 copy];
  }
  if (_ex3IsSet)
  {
    val.ex3 = [self.ex3 copy];
  }
  return val;
}

- (void) setSuccess: (AuthenticationService_GetTokenInfoResponse *) success {
  _success = success;
  _successIsSet = YES;
}

- (void) unsetSuccess {
  _success = nil;
  _successIsSet = NO;
}

- (void) setEx1: (AromaException_OperationFailedException *) ex1 {
  _ex1 = ex1;
  _ex1IsSet = YES;
}

- (void) unsetEx1 {
  _ex1 = nil;
  _ex1IsSet = NO;
}

- (void) setEx2: (AromaException_InvalidTokenException *) ex2 {
  _ex2 = ex2;
  _ex2IsSet = YES;
}

- (void) unsetEx2 {
  _ex2 = nil;
  _ex2IsSet = NO;
}

- (void) setEx3: (AromaException_InvalidArgumentException *) ex3 {
  _ex3 = ex3;
  _ex3IsSet = YES;
}

- (void) unsetEx3 {
  _ex3 = nil;
  _ex3IsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 0:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_GetTokenInfoResponse *fieldValue = [[AuthenticationService_GetTokenInfoResponse alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.success = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaException_OperationFailedException *fieldValue = [[AromaException_OperationFailedException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex1 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidTokenException *fieldValue = [[AromaException_InvalidTokenException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex2 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 3:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidArgumentException *fieldValue = [[AromaException_InvalidArgumentException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex3 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getTokenInfo_result" error: __thriftError]) return NO;

  if (_successIsSet) {
    if (_success != nil) {
      if (![outProtocol writeFieldBeginWithName: @"success" type: TTypeSTRUCT fieldID: 0 error: __thriftError]) return NO;
      if (![_success write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex1IsSet) {
    if (_ex1 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex1" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_ex1 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex2IsSet) {
    if (_ex2 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex2" type: TTypeSTRUCT fieldID: 2 error: __thriftError]) return NO;
      if (![_ex2 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex3IsSet) {
    if (_ex3 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex3" type: TTypeSTRUCT fieldID: 3 error: __thriftError]) return NO;
      if (![_ex3 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_getTokenInfo_result("];
  [ms appendString: @"success:"];
  [ms appendFormat: @"%@", _success];
  [ms appendString: @",ex1:"];
  [ms appendFormat: @"%@", _ex1];
  [ms appendString: @",ex2:"];
  [ms appendFormat: @"%@", _ex2];
  [ms appendString: @",ex3:"];
  [ms appendFormat: @"%@", _ex3];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_invalidateToken_args : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_InvalidateTokenRequest * request;
@property (assign, nonatomic) BOOL requestIsSet;
- (void) unsetRequest;

- (instancetype) initWithRequest: (AuthenticationService_InvalidateTokenRequest *) request;

@end

@implementation AuthenticationService_AuthenticationService_invalidateToken_args

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithRequest: (AuthenticationService_InvalidateTokenRequest *) request
{
  self = [super init];
  if (self)  {
    _request = request;
    _requestIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"request"])
    {
      _request = [decoder decodeObjectForKey: @"request"];
      _requestIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_requestIsSet)
  {
    [encoder encodeObject: _request forKey: @"request"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _requestIsSet ? 2654435761 : 0;
  if (_requestIsSet)
  {
    hash = (hash * 31) ^ [_request hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_invalidateToken_args class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_invalidateToken_args *other = (AuthenticationService_AuthenticationService_invalidateToken_args *)anObject;
  if ((_requestIsSet != other->_requestIsSet) ||
      (_requestIsSet && ((_request || other->_request) && ![_request isEqual:other->_request]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_invalidateToken_args * val = [AuthenticationService_AuthenticationService_invalidateToken_args new];
  if (_requestIsSet)
  {
    val.request = [self.request copy];
  }
  return val;
}

- (void) setRequest: (AuthenticationService_InvalidateTokenRequest *) request {
  _request = request;
  _requestIsSet = YES;
}

- (void) unsetRequest {
  _request = nil;
  _requestIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_InvalidateTokenRequest *fieldValue = [[AuthenticationService_InvalidateTokenRequest alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.request = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_invalidateToken_args" error: __thriftError]) return NO;
  if (_requestIsSet) {
    if (_request != nil) {
      if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_request write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_invalidateToken_args("];
  [ms appendString: @"request:"];
  [ms appendFormat: @"%@", _request];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_invalidateToken_result : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_InvalidateTokenResponse * success;
@property (assign, nonatomic) BOOL successIsSet;
- (void) unsetSuccess;

@property (strong, nonatomic) AuthenticationService_OperationFailedException ex1;
@property (assign, nonatomic) BOOL ex1IsSet;
- (void) unsetEx1;

@property (strong, nonatomic) AuthenticationService_InvalidTokenException ex2;
@property (assign, nonatomic) BOOL ex2IsSet;
- (void) unsetEx2;

@property (strong, nonatomic) AuthenticationService_InvalidArgumentException ex3;
@property (assign, nonatomic) BOOL ex3IsSet;
- (void) unsetEx3;

- (instancetype) initWithSuccess: (AuthenticationService_InvalidateTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3;

@end

@implementation AuthenticationService_AuthenticationService_invalidateToken_result

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithSuccess: (AuthenticationService_InvalidateTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3
{
  self = [super init];
  if (self)  {
    _success = success;
    _successIsSet = YES;
    _ex1 = ex1;
    _ex1IsSet = YES;
    _ex2 = ex2;
    _ex2IsSet = YES;
    _ex3 = ex3;
    _ex3IsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"success"])
    {
      _success = [decoder decodeObjectForKey: @"success"];
      _successIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex1"])
    {
      _ex1 = [decoder decodeObjectForKey: @"ex1"];
      _ex1IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex2"])
    {
      _ex2 = [decoder decodeObjectForKey: @"ex2"];
      _ex2IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex3"])
    {
      _ex3 = [decoder decodeObjectForKey: @"ex3"];
      _ex3IsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_successIsSet)
  {
    [encoder encodeObject: _success forKey: @"success"];
  }
  if (_ex1IsSet)
  {
    [encoder encodeObject: _ex1 forKey: @"ex1"];
  }
  if (_ex2IsSet)
  {
    [encoder encodeObject: _ex2 forKey: @"ex2"];
  }
  if (_ex3IsSet)
  {
    [encoder encodeObject: _ex3 forKey: @"ex3"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _successIsSet ? 2654435761 : 0;
  if (_successIsSet)
  {
    hash = (hash * 31) ^ [_success hash];
  }
  hash = (hash * 31) ^ _ex1IsSet ? 2654435761 : 0;
  if (_ex1IsSet)
  {
    hash = (hash * 31) ^ [_ex1 hash];
  }
  hash = (hash * 31) ^ _ex2IsSet ? 2654435761 : 0;
  if (_ex2IsSet)
  {
    hash = (hash * 31) ^ [_ex2 hash];
  }
  hash = (hash * 31) ^ _ex3IsSet ? 2654435761 : 0;
  if (_ex3IsSet)
  {
    hash = (hash * 31) ^ [_ex3 hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_invalidateToken_result class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_invalidateToken_result *other = (AuthenticationService_AuthenticationService_invalidateToken_result *)anObject;
  if ((_successIsSet != other->_successIsSet) ||
      (_successIsSet && ((_success || other->_success) && ![_success isEqual:other->_success]))) {
    return NO;
  }
  if ((_ex1IsSet != other->_ex1IsSet) ||
      (_ex1IsSet && ((_ex1 || other->_ex1) && ![_ex1 isEqual:other->_ex1]))) {
    return NO;
  }
  if ((_ex2IsSet != other->_ex2IsSet) ||
      (_ex2IsSet && ((_ex2 || other->_ex2) && ![_ex2 isEqual:other->_ex2]))) {
    return NO;
  }
  if ((_ex3IsSet != other->_ex3IsSet) ||
      (_ex3IsSet && ((_ex3 || other->_ex3) && ![_ex3 isEqual:other->_ex3]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_invalidateToken_result * val = [AuthenticationService_AuthenticationService_invalidateToken_result new];
  if (_successIsSet)
  {
    val.success = [self.success copy];
  }
  if (_ex1IsSet)
  {
    val.ex1 = [self.ex1 copy];
  }
  if (_ex2IsSet)
  {
    val.ex2 = [self.ex2 copy];
  }
  if (_ex3IsSet)
  {
    val.ex3 = [self.ex3 copy];
  }
  return val;
}

- (void) setSuccess: (AuthenticationService_InvalidateTokenResponse *) success {
  _success = success;
  _successIsSet = YES;
}

- (void) unsetSuccess {
  _success = nil;
  _successIsSet = NO;
}

- (void) setEx1: (AromaException_OperationFailedException *) ex1 {
  _ex1 = ex1;
  _ex1IsSet = YES;
}

- (void) unsetEx1 {
  _ex1 = nil;
  _ex1IsSet = NO;
}

- (void) setEx2: (AromaException_InvalidTokenException *) ex2 {
  _ex2 = ex2;
  _ex2IsSet = YES;
}

- (void) unsetEx2 {
  _ex2 = nil;
  _ex2IsSet = NO;
}

- (void) setEx3: (AromaException_InvalidArgumentException *) ex3 {
  _ex3 = ex3;
  _ex3IsSet = YES;
}

- (void) unsetEx3 {
  _ex3 = nil;
  _ex3IsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 0:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_InvalidateTokenResponse *fieldValue = [[AuthenticationService_InvalidateTokenResponse alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.success = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaException_OperationFailedException *fieldValue = [[AromaException_OperationFailedException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex1 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidTokenException *fieldValue = [[AromaException_InvalidTokenException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex2 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 3:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidArgumentException *fieldValue = [[AromaException_InvalidArgumentException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex3 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_invalidateToken_result" error: __thriftError]) return NO;

  if (_successIsSet) {
    if (_success != nil) {
      if (![outProtocol writeFieldBeginWithName: @"success" type: TTypeSTRUCT fieldID: 0 error: __thriftError]) return NO;
      if (![_success write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex1IsSet) {
    if (_ex1 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex1" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_ex1 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex2IsSet) {
    if (_ex2 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex2" type: TTypeSTRUCT fieldID: 2 error: __thriftError]) return NO;
      if (![_ex2 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex3IsSet) {
    if (_ex3 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex3" type: TTypeSTRUCT fieldID: 3 error: __thriftError]) return NO;
      if (![_ex3 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_invalidateToken_result("];
  [ms appendString: @"success:"];
  [ms appendFormat: @"%@", _success];
  [ms appendString: @",ex1:"];
  [ms appendFormat: @"%@", _ex1];
  [ms appendString: @",ex2:"];
  [ms appendFormat: @"%@", _ex2];
  [ms appendString: @",ex3:"];
  [ms appendFormat: @"%@", _ex3];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_verifyToken_args : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_VerifyTokenRequest * request;
@property (assign, nonatomic) BOOL requestIsSet;
- (void) unsetRequest;

- (instancetype) initWithRequest: (AuthenticationService_VerifyTokenRequest *) request;

@end

@implementation AuthenticationService_AuthenticationService_verifyToken_args

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithRequest: (AuthenticationService_VerifyTokenRequest *) request
{
  self = [super init];
  if (self)  {
    _request = request;
    _requestIsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"request"])
    {
      _request = [decoder decodeObjectForKey: @"request"];
      _requestIsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_requestIsSet)
  {
    [encoder encodeObject: _request forKey: @"request"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _requestIsSet ? 2654435761 : 0;
  if (_requestIsSet)
  {
    hash = (hash * 31) ^ [_request hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_verifyToken_args class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_verifyToken_args *other = (AuthenticationService_AuthenticationService_verifyToken_args *)anObject;
  if ((_requestIsSet != other->_requestIsSet) ||
      (_requestIsSet && ((_request || other->_request) && ![_request isEqual:other->_request]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_verifyToken_args * val = [AuthenticationService_AuthenticationService_verifyToken_args new];
  if (_requestIsSet)
  {
    val.request = [self.request copy];
  }
  return val;
}

- (void) setRequest: (AuthenticationService_VerifyTokenRequest *) request {
  _request = request;
  _requestIsSet = YES;
}

- (void) unsetRequest {
  _request = nil;
  _requestIsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_VerifyTokenRequest *fieldValue = [[AuthenticationService_VerifyTokenRequest alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.request = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_verifyToken_args" error: __thriftError]) return NO;
  if (_requestIsSet) {
    if (_request != nil) {
      if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_request write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_verifyToken_args("];
  [ms appendString: @"request:"];
  [ms appendFormat: @"%@", _request];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationService_verifyToken_result : NSObject <TBase, NSCoding, NSCopying>

@property (strong, nonatomic) AuthenticationService_VerifyTokenResponse * success;
@property (assign, nonatomic) BOOL successIsSet;
- (void) unsetSuccess;

@property (strong, nonatomic) AuthenticationService_OperationFailedException ex1;
@property (assign, nonatomic) BOOL ex1IsSet;
- (void) unsetEx1;

@property (strong, nonatomic) AuthenticationService_InvalidTokenException ex2;
@property (assign, nonatomic) BOOL ex2IsSet;
- (void) unsetEx2;

@property (strong, nonatomic) AuthenticationService_InvalidArgumentException ex3;
@property (assign, nonatomic) BOOL ex3IsSet;
- (void) unsetEx3;

- (instancetype) initWithSuccess: (AuthenticationService_VerifyTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3;

@end

@implementation AuthenticationService_AuthenticationService_verifyToken_result

- (instancetype) init
{
  self = [super init];
  if (self)  {
  }
  return self;
}

- (instancetype) initWithSuccess: (AuthenticationService_VerifyTokenResponse *) success ex1: (AuthenticationService_OperationFailedException) ex1 ex2: (AuthenticationService_InvalidTokenException) ex2 ex3: (AuthenticationService_InvalidArgumentException) ex3
{
  self = [super init];
  if (self)  {
    _success = success;
    _successIsSet = YES;
    _ex1 = ex1;
    _ex1IsSet = YES;
    _ex2 = ex2;
    _ex2IsSet = YES;
    _ex3 = ex3;
    _ex3IsSet = YES;
  }
  return self;
}

- (instancetype) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if (self)   {
    if ([decoder containsValueForKey: @"success"])
    {
      _success = [decoder decodeObjectForKey: @"success"];
      _successIsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex1"])
    {
      _ex1 = [decoder decodeObjectForKey: @"ex1"];
      _ex1IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex2"])
    {
      _ex2 = [decoder decodeObjectForKey: @"ex2"];
      _ex2IsSet = YES;
    }
    if ([decoder containsValueForKey: @"ex3"])
    {
      _ex3 = [decoder decodeObjectForKey: @"ex3"];
      _ex3IsSet = YES;
    }
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (_successIsSet)
  {
    [encoder encodeObject: _success forKey: @"success"];
  }
  if (_ex1IsSet)
  {
    [encoder encodeObject: _ex1 forKey: @"ex1"];
  }
  if (_ex2IsSet)
  {
    [encoder encodeObject: _ex2 forKey: @"ex2"];
  }
  if (_ex3IsSet)
  {
    [encoder encodeObject: _ex3 forKey: @"ex3"];
  }
}

- (NSUInteger) hash
{
  NSUInteger hash = 17;
  hash = (hash * 31) ^ _successIsSet ? 2654435761 : 0;
  if (_successIsSet)
  {
    hash = (hash * 31) ^ [_success hash];
  }
  hash = (hash * 31) ^ _ex1IsSet ? 2654435761 : 0;
  if (_ex1IsSet)
  {
    hash = (hash * 31) ^ [_ex1 hash];
  }
  hash = (hash * 31) ^ _ex2IsSet ? 2654435761 : 0;
  if (_ex2IsSet)
  {
    hash = (hash * 31) ^ [_ex2 hash];
  }
  hash = (hash * 31) ^ _ex3IsSet ? 2654435761 : 0;
  if (_ex3IsSet)
  {
    hash = (hash * 31) ^ [_ex3 hash];
  }
  return hash;
}

- (BOOL) isEqual: (id) anObject
{
  if (self == anObject) {
    return YES;
  }
  if (![anObject isKindOfClass:[AuthenticationService_AuthenticationService_verifyToken_result class]]) {
    return NO;
  }
  AuthenticationService_AuthenticationService_verifyToken_result *other = (AuthenticationService_AuthenticationService_verifyToken_result *)anObject;
  if ((_successIsSet != other->_successIsSet) ||
      (_successIsSet && ((_success || other->_success) && ![_success isEqual:other->_success]))) {
    return NO;
  }
  if ((_ex1IsSet != other->_ex1IsSet) ||
      (_ex1IsSet && ((_ex1 || other->_ex1) && ![_ex1 isEqual:other->_ex1]))) {
    return NO;
  }
  if ((_ex2IsSet != other->_ex2IsSet) ||
      (_ex2IsSet && ((_ex2 || other->_ex2) && ![_ex2 isEqual:other->_ex2]))) {
    return NO;
  }
  if ((_ex3IsSet != other->_ex3IsSet) ||
      (_ex3IsSet && ((_ex3 || other->_ex3) && ![_ex3 isEqual:other->_ex3]))) {
    return NO;
  }
  return YES;
}

- (instancetype) copyWithZone:(NSZone *)zone
{
  AuthenticationService_AuthenticationService_verifyToken_result * val = [AuthenticationService_AuthenticationService_verifyToken_result new];
  if (_successIsSet)
  {
    val.success = [self.success copy];
  }
  if (_ex1IsSet)
  {
    val.ex1 = [self.ex1 copy];
  }
  if (_ex2IsSet)
  {
    val.ex2 = [self.ex2 copy];
  }
  if (_ex3IsSet)
  {
    val.ex3 = [self.ex3 copy];
  }
  return val;
}

- (void) setSuccess: (AuthenticationService_VerifyTokenResponse *) success {
  _success = success;
  _successIsSet = YES;
}

- (void) unsetSuccess {
  _success = nil;
  _successIsSet = NO;
}

- (void) setEx1: (AromaException_OperationFailedException *) ex1 {
  _ex1 = ex1;
  _ex1IsSet = YES;
}

- (void) unsetEx1 {
  _ex1 = nil;
  _ex1IsSet = NO;
}

- (void) setEx2: (AromaException_InvalidTokenException *) ex2 {
  _ex2 = ex2;
  _ex2IsSet = YES;
}

- (void) unsetEx2 {
  _ex2 = nil;
  _ex2IsSet = NO;
}

- (void) setEx3: (AromaException_InvalidArgumentException *) ex3 {
  _ex3 = ex3;
  _ex3IsSet = YES;
}

- (void) unsetEx3 {
  _ex3 = nil;
  _ex3IsSet = NO;
}

- (BOOL) read: (id <TProtocol>) inProtocol error: (NSError *__autoreleasing *)__thriftError
{
  NSString * fieldName;
  SInt32 fieldType;
  SInt32 fieldID;

  if (![inProtocol readStructBeginReturningName: NULL error: __thriftError]) return NO;
  while (true)
  {
    if (![inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID error: __thriftError]) return NO;
    if (fieldType == TTypeSTOP) {
      break;
    }
    switch (fieldID)
    {
      case 0:
        if (fieldType == TTypeSTRUCT) {
          AuthenticationService_VerifyTokenResponse *fieldValue = [[AuthenticationService_VerifyTokenResponse alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.success = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 1:
        if (fieldType == TTypeSTRUCT) {
          AromaException_OperationFailedException *fieldValue = [[AromaException_OperationFailedException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex1 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 2:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidTokenException *fieldValue = [[AromaException_InvalidTokenException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex2 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      case 3:
        if (fieldType == TTypeSTRUCT) {
          AromaException_InvalidArgumentException *fieldValue = [[AromaException_InvalidArgumentException alloc] init];
          if (![fieldValue read: inProtocol error: __thriftError]) return NO;
          self.ex3 = fieldValue;
        } else {
          if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        }
        break;
      default:
        if (![TProtocolUtil skipType: fieldType onProtocol: inProtocol error: __thriftError]) return NO;
        break;
    }
    if (![inProtocol readFieldEnd: __thriftError]) return NO;
  }
  if (![inProtocol readStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) write: (id <TProtocol>) outProtocol error: (NSError *__autoreleasing *)__thriftError {
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_verifyToken_result" error: __thriftError]) return NO;

  if (_successIsSet) {
    if (_success != nil) {
      if (![outProtocol writeFieldBeginWithName: @"success" type: TTypeSTRUCT fieldID: 0 error: __thriftError]) return NO;
      if (![_success write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex1IsSet) {
    if (_ex1 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex1" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
      if (![_ex1 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex2IsSet) {
    if (_ex2 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex2" type: TTypeSTRUCT fieldID: 2 error: __thriftError]) return NO;
      if (![_ex2 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  } else if (_ex3IsSet) {
    if (_ex3 != nil) {
      if (![outProtocol writeFieldBeginWithName: @"ex3" type: TTypeSTRUCT fieldID: 3 error: __thriftError]) return NO;
      if (![_ex3 write: outProtocol error: __thriftError]) return NO;
      if (![outProtocol writeFieldEnd: __thriftError]) return NO;
    }
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) validate: (NSError *__autoreleasing *)__thriftError {
  // check for required fields
  return YES;
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"AuthenticationService_AuthenticationService_verifyToken_result("];
  [ms appendString: @"success:"];
  [ms appendFormat: @"%@", _success];
  [ms appendString: @",ex1:"];
  [ms appendFormat: @"%@", _ex1];
  [ms appendString: @",ex2:"];
  [ms appendFormat: @"%@", _ex2];
  [ms appendString: @",ex3:"];
  [ms appendFormat: @"%@", _ex3];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@interface AuthenticationService_AuthenticationServiceClient () {

  id<TProtocol> inProtocol;
  id<TProtocol> outProtocol;

}

@end

@implementation AuthenticationService_AuthenticationServiceClient
- (id) initWithProtocol: (id <TProtocol>) protocol
{
  return [self initWithInProtocol: protocol outProtocol: protocol];
}

- (id) initWithInProtocol: (id <TProtocol>) anInProtocol outProtocol: (id <TProtocol>) anOutProtocol
{
  self = [super init];
  if (self)   {
    inProtocol = anInProtocol;
    outProtocol = anOutProtocol;
  }
  return self;
}

- (BOOL) send_getApiVersion: (NSError *__autoreleasing *)__thriftError
{
  if (![outProtocol writeMessageBeginWithName: @"getApiVersion" type: TMessageTypeCALL sequenceID: 0 error: __thriftError]) return NO;
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getApiVersion_args" error: __thriftError]) return NO;
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) recv_getApiVersion: (double *) result error: (NSError *__autoreleasing *)__thriftError
{
  NSError *incomingException = [self checkIncomingMessageException: inProtocol];
  if (incomingException)  {
    if (__thriftError)    {
      *__thriftError = incomingException;
    }
    return NO;
  }
  AuthenticationService_AuthenticationService_getApiVersion_result * resulter = [AuthenticationService_AuthenticationService_getApiVersion_result new];
  if (![resulter read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  if (resulter.successIsSet)  {
    *result = resulter.success;
    return YES;
  }
  if (__thriftError)  {
    *__thriftError = [NSError errorWithDomain: TApplicationErrorDomain
                                         code: TApplicationErrorMissingResult
                                     userInfo: @{TApplicationErrorMethodKey: @"getApiVersion"}];
  }
  return NO;
}

- (NSNumber *) getApiVersion: (NSError *__autoreleasing *)__thriftError
{
  if (![self send_getApiVersion: __thriftError]) return nil;
  if (![[outProtocol transport] flush: __thriftError]) return nil;
  double __result;
  if (![self recv_getApiVersion: &__result error: __thriftError]) return nil;
  return @(__result);
}

- (BOOL) send_createToken: (AuthenticationService_CreateTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![outProtocol writeMessageBeginWithName: @"createToken" type: TMessageTypeCALL sequenceID: 0 error: __thriftError]) return NO;
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_createToken_args" error: __thriftError]) return NO;
  if (request != nil)  {
    if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
    if (![request write: outProtocol error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) recv_createToken: (AuthenticationService_CreateTokenResponse * *) result error: (NSError *__autoreleasing *)__thriftError
{
  NSError *incomingException = [self checkIncomingMessageException: inProtocol];
  if (incomingException)  {
    if (__thriftError)    {
      *__thriftError = incomingException;
    }
    return NO;
  }
  AuthenticationService_AuthenticationService_createToken_result * resulter = [AuthenticationService_AuthenticationService_createToken_result new];
  if (![resulter read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  if (resulter.successIsSet)  {
    *result = resulter.success;
    return YES;
  }
  if (resulter.ex1IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex1];
    }
    return NO;
  }
  if (resulter.ex2IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex2];
    }
    return NO;
  }
  if (__thriftError)  {
    *__thriftError = [NSError errorWithDomain: TApplicationErrorDomain
                                         code: TApplicationErrorMissingResult
                                     userInfo: @{TApplicationErrorMethodKey: @"createToken"}];
  }
  return NO;
}

- (AuthenticationService_CreateTokenResponse *) createToken: (AuthenticationService_CreateTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![self send_createToken : request error: __thriftError]) return nil;
  if (![[outProtocol transport] flush: __thriftError]) return nil;
  AuthenticationService_CreateTokenResponse * __result;
  if (![self recv_createToken: &__result error: __thriftError]) return nil;
  return __result;
}

- (BOOL) send_getTokenInfo: (AuthenticationService_GetTokenInfoRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![outProtocol writeMessageBeginWithName: @"getTokenInfo" type: TMessageTypeCALL sequenceID: 0 error: __thriftError]) return NO;
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_getTokenInfo_args" error: __thriftError]) return NO;
  if (request != nil)  {
    if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
    if (![request write: outProtocol error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) recv_getTokenInfo: (AuthenticationService_GetTokenInfoResponse * *) result error: (NSError *__autoreleasing *)__thriftError
{
  NSError *incomingException = [self checkIncomingMessageException: inProtocol];
  if (incomingException)  {
    if (__thriftError)    {
      *__thriftError = incomingException;
    }
    return NO;
  }
  AuthenticationService_AuthenticationService_getTokenInfo_result * resulter = [AuthenticationService_AuthenticationService_getTokenInfo_result new];
  if (![resulter read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  if (resulter.successIsSet)  {
    *result = resulter.success;
    return YES;
  }
  if (resulter.ex1IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex1];
    }
    return NO;
  }
  if (resulter.ex2IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex2];
    }
    return NO;
  }
  if (resulter.ex3IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex3];
    }
    return NO;
  }
  if (__thriftError)  {
    *__thriftError = [NSError errorWithDomain: TApplicationErrorDomain
                                         code: TApplicationErrorMissingResult
                                     userInfo: @{TApplicationErrorMethodKey: @"getTokenInfo"}];
  }
  return NO;
}

- (AuthenticationService_GetTokenInfoResponse *) getTokenInfo: (AuthenticationService_GetTokenInfoRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![self send_getTokenInfo : request error: __thriftError]) return nil;
  if (![[outProtocol transport] flush: __thriftError]) return nil;
  AuthenticationService_GetTokenInfoResponse * __result;
  if (![self recv_getTokenInfo: &__result error: __thriftError]) return nil;
  return __result;
}

- (BOOL) send_invalidateToken: (AuthenticationService_InvalidateTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![outProtocol writeMessageBeginWithName: @"invalidateToken" type: TMessageTypeCALL sequenceID: 0 error: __thriftError]) return NO;
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_invalidateToken_args" error: __thriftError]) return NO;
  if (request != nil)  {
    if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
    if (![request write: outProtocol error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) recv_invalidateToken: (AuthenticationService_InvalidateTokenResponse * *) result error: (NSError *__autoreleasing *)__thriftError
{
  NSError *incomingException = [self checkIncomingMessageException: inProtocol];
  if (incomingException)  {
    if (__thriftError)    {
      *__thriftError = incomingException;
    }
    return NO;
  }
  AuthenticationService_AuthenticationService_invalidateToken_result * resulter = [AuthenticationService_AuthenticationService_invalidateToken_result new];
  if (![resulter read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  if (resulter.successIsSet)  {
    *result = resulter.success;
    return YES;
  }
  if (resulter.ex1IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex1];
    }
    return NO;
  }
  if (resulter.ex2IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex2];
    }
    return NO;
  }
  if (resulter.ex3IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex3];
    }
    return NO;
  }
  if (__thriftError)  {
    *__thriftError = [NSError errorWithDomain: TApplicationErrorDomain
                                         code: TApplicationErrorMissingResult
                                     userInfo: @{TApplicationErrorMethodKey: @"invalidateToken"}];
  }
  return NO;
}

- (AuthenticationService_InvalidateTokenResponse *) invalidateToken: (AuthenticationService_InvalidateTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![self send_invalidateToken : request error: __thriftError]) return nil;
  if (![[outProtocol transport] flush: __thriftError]) return nil;
  AuthenticationService_InvalidateTokenResponse * __result;
  if (![self recv_invalidateToken: &__result error: __thriftError]) return nil;
  return __result;
}

- (BOOL) send_verifyToken: (AuthenticationService_VerifyTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![outProtocol writeMessageBeginWithName: @"verifyToken" type: TMessageTypeCALL sequenceID: 0 error: __thriftError]) return NO;
  if (![outProtocol writeStructBeginWithName: @"AuthenticationService_verifyToken_args" error: __thriftError]) return NO;
  if (request != nil)  {
    if (![outProtocol writeFieldBeginWithName: @"request" type: TTypeSTRUCT fieldID: 1 error: __thriftError]) return NO;
    if (![request write: outProtocol error: __thriftError]) return NO;
    if (![outProtocol writeFieldEnd: __thriftError]) return NO;
  }
  if (![outProtocol writeFieldStop: __thriftError]) return NO;
  if (![outProtocol writeStructEnd: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  return YES;
}

- (BOOL) recv_verifyToken: (AuthenticationService_VerifyTokenResponse * *) result error: (NSError *__autoreleasing *)__thriftError
{
  NSError *incomingException = [self checkIncomingMessageException: inProtocol];
  if (incomingException)  {
    if (__thriftError)    {
      *__thriftError = incomingException;
    }
    return NO;
  }
  AuthenticationService_AuthenticationService_verifyToken_result * resulter = [AuthenticationService_AuthenticationService_verifyToken_result new];
  if (![resulter read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  if (resulter.successIsSet)  {
    *result = resulter.success;
    return YES;
  }
  if (resulter.ex1IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex1];
    }
    return NO;
  }
  if (resulter.ex2IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex2];
    }
    return NO;
  }
  if (resulter.ex3IsSet)  {
    if (__thriftError)    {
      *__thriftError = [resulter ex3];
    }
    return NO;
  }
  if (__thriftError)  {
    *__thriftError = [NSError errorWithDomain: TApplicationErrorDomain
                                         code: TApplicationErrorMissingResult
                                     userInfo: @{TApplicationErrorMethodKey: @"verifyToken"}];
  }
  return NO;
}

- (AuthenticationService_VerifyTokenResponse *) verifyToken: (AuthenticationService_VerifyTokenRequest *) request error: (NSError *__autoreleasing *)__thriftError
{
  if (![self send_verifyToken : request error: __thriftError]) return nil;
  if (![[outProtocol transport] flush: __thriftError]) return nil;
  AuthenticationService_VerifyTokenResponse * __result;
  if (![self recv_verifyToken: &__result error: __thriftError]) return nil;
  return __result;
}

@end

@interface AuthenticationService_AuthenticationServiceProcessor () {
  id <AuthenticationService_AuthenticationService> service;
  NSDictionary * methodMap;
}
@end

@implementation AuthenticationService_AuthenticationServiceProcessor

- (id) initWithAuthenticationService: (id <AuthenticationService_AuthenticationService>) aService
{
  self = [super init];
  if (self)   {
    service = aService;
    methodMap = [NSMutableDictionary dictionary];
    {
      SEL s = @selector(process_getApiVersion_withSequenceID:inProtocol:outProtocol:error:);
      NSMethodSignature * sig = [self methodSignatureForSelector: s];
      NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig];
      [invocation setSelector: s];
      [invocation retainArguments];
      [methodMap setValue: invocation forKey: @"getApiVersion"];
    }
    {
      SEL s = @selector(process_createToken_withSequenceID:inProtocol:outProtocol:error:);
      NSMethodSignature * sig = [self methodSignatureForSelector: s];
      NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig];
      [invocation setSelector: s];
      [invocation retainArguments];
      [methodMap setValue: invocation forKey: @"createToken"];
    }
    {
      SEL s = @selector(process_getTokenInfo_withSequenceID:inProtocol:outProtocol:error:);
      NSMethodSignature * sig = [self methodSignatureForSelector: s];
      NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig];
      [invocation setSelector: s];
      [invocation retainArguments];
      [methodMap setValue: invocation forKey: @"getTokenInfo"];
    }
    {
      SEL s = @selector(process_invalidateToken_withSequenceID:inProtocol:outProtocol:error:);
      NSMethodSignature * sig = [self methodSignatureForSelector: s];
      NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig];
      [invocation setSelector: s];
      [invocation retainArguments];
      [methodMap setValue: invocation forKey: @"invalidateToken"];
    }
    {
      SEL s = @selector(process_verifyToken_withSequenceID:inProtocol:outProtocol:error:);
      NSMethodSignature * sig = [self methodSignatureForSelector: s];
      NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: sig];
      [invocation setSelector: s];
      [invocation retainArguments];
      [methodMap setValue: invocation forKey: @"verifyToken"];
    }
  }
  return self;
}

- (id<AuthenticationService_AuthenticationService>) service
{
  return service;
}

- (BOOL) processOnInputProtocol: (id <TProtocol>) inProtocol
                 outputProtocol: (id <TProtocol>) outProtocol
                          error: (NSError *__autoreleasing *)__thriftError
{
  NSString * messageName;
  SInt32 messageType;
  SInt32 seqID;
  if (![inProtocol readMessageBeginReturningName: &messageName
                                       type: &messageType
                                 sequenceID: &seqID
                                      error: __thriftError]) return NO;
  NSInvocation * invocation = [methodMap valueForKey: messageName];
  if (invocation == nil) {
    if (![TProtocolUtil skipType: TTypeSTRUCT onProtocol: inProtocol error: __thriftError]) return NO;
    if (![inProtocol readMessageEnd: __thriftError]) return NO;
    NSError * x = [NSError errorWithDomain: TApplicationErrorDomain
                                      code: TApplicationErrorUnknownMethod
                                  userInfo: @{TApplicationErrorMethodKey: messageName}];
    if (![outProtocol writeMessageBeginWithName: messageName
                                           type: TMessageTypeEXCEPTION
                                     sequenceID: seqID
                                          error: __thriftError]) return NO;
    if (![x write: outProtocol error: __thriftError]) return NO;
    if (![outProtocol writeMessageEnd: __thriftError]) return NO;
    if (![[outProtocol transport] flush: __thriftError]) return NO;
    return YES;
  }
  // NSInvocation does not conform to NSCopying protocol
  NSInvocation * i = [NSInvocation invocationWithMethodSignature: [invocation methodSignature]];
  [i setSelector: [invocation selector]];
  [i setArgument: &seqID atIndex: 2];
  [i setArgument: &inProtocol atIndex: 3];
  [i setArgument: &outProtocol atIndex: 4];
  [i setArgument: &__thriftError atIndex: 5];
  [i setTarget: self];
  [i invoke];
  return YES;
}

- (BOOL) process_getApiVersion_withSequenceID: (SInt32) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol error:(NSError *__autoreleasing *)__thriftError
{
  AuthenticationService_AuthenticationService_getApiVersion_args * args = [AuthenticationService_AuthenticationService_getApiVersion_args new];
  if (![args read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  AuthenticationService_AuthenticationService_getApiVersion_result * result = [AuthenticationService_AuthenticationService_getApiVersion_result new];
  NSNumber * serviceResult = [service getApiVersion: __thriftError];
  if (!serviceResult) return NO;
  [result setSuccess: [serviceResult doubleValue]];
  if (![outProtocol writeMessageBeginWithName: @"getApiVersion"
                                         type: TMessageTypeREPLY
                                   sequenceID: seqID
                                        error: __thriftError]) return NO;
  if (![result write: outProtocol error: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  if (![[outProtocol transport] flush: __thriftError]) return NO;
  return YES;
}

- (BOOL) process_createToken_withSequenceID: (SInt32) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol error:(NSError *__autoreleasing *)__thriftError
{
  AuthenticationService_AuthenticationService_createToken_args * args = [AuthenticationService_AuthenticationService_createToken_args new];
  if (![args read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  AuthenticationService_AuthenticationService_createToken_result * result = [AuthenticationService_AuthenticationService_createToken_result new];
  AuthenticationService_CreateTokenResponse * serviceResult = [service createToken: [args request] error: __thriftError];
  if (!serviceResult) return NO;
  [result setSuccess: serviceResult];
  if (![outProtocol writeMessageBeginWithName: @"createToken"
                                         type: TMessageTypeREPLY
                                   sequenceID: seqID
                                        error: __thriftError]) return NO;
  if (![result write: outProtocol error: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  if (![[outProtocol transport] flush: __thriftError]) return NO;
  return YES;
}

- (BOOL) process_getTokenInfo_withSequenceID: (SInt32) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol error:(NSError *__autoreleasing *)__thriftError
{
  AuthenticationService_AuthenticationService_getTokenInfo_args * args = [AuthenticationService_AuthenticationService_getTokenInfo_args new];
  if (![args read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  AuthenticationService_AuthenticationService_getTokenInfo_result * result = [AuthenticationService_AuthenticationService_getTokenInfo_result new];
  AuthenticationService_GetTokenInfoResponse * serviceResult = [service getTokenInfo: [args request] error: __thriftError];
  if (!serviceResult) return NO;
  [result setSuccess: serviceResult];
  if (![outProtocol writeMessageBeginWithName: @"getTokenInfo"
                                         type: TMessageTypeREPLY
                                   sequenceID: seqID
                                        error: __thriftError]) return NO;
  if (![result write: outProtocol error: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  if (![[outProtocol transport] flush: __thriftError]) return NO;
  return YES;
}

- (BOOL) process_invalidateToken_withSequenceID: (SInt32) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol error:(NSError *__autoreleasing *)__thriftError
{
  AuthenticationService_AuthenticationService_invalidateToken_args * args = [AuthenticationService_AuthenticationService_invalidateToken_args new];
  if (![args read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  AuthenticationService_AuthenticationService_invalidateToken_result * result = [AuthenticationService_AuthenticationService_invalidateToken_result new];
  AuthenticationService_InvalidateTokenResponse * serviceResult = [service invalidateToken: [args request] error: __thriftError];
  if (!serviceResult) return NO;
  [result setSuccess: serviceResult];
  if (![outProtocol writeMessageBeginWithName: @"invalidateToken"
                                         type: TMessageTypeREPLY
                                   sequenceID: seqID
                                        error: __thriftError]) return NO;
  if (![result write: outProtocol error: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  if (![[outProtocol transport] flush: __thriftError]) return NO;
  return YES;
}

- (BOOL) process_verifyToken_withSequenceID: (SInt32) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol: (id<TProtocol>) outProtocol error:(NSError *__autoreleasing *)__thriftError
{
  AuthenticationService_AuthenticationService_verifyToken_args * args = [AuthenticationService_AuthenticationService_verifyToken_args new];
  if (![args read: inProtocol error: __thriftError]) return NO;
  if (![inProtocol readMessageEnd: __thriftError]) return NO;
  AuthenticationService_AuthenticationService_verifyToken_result * result = [AuthenticationService_AuthenticationService_verifyToken_result new];
  AuthenticationService_VerifyTokenResponse * serviceResult = [service verifyToken: [args request] error: __thriftError];
  if (!serviceResult) return NO;
  [result setSuccess: serviceResult];
  if (![outProtocol writeMessageBeginWithName: @"verifyToken"
                                         type: TMessageTypeREPLY
                                   sequenceID: seqID
                                        error: __thriftError]) return NO;
  if (![result write: outProtocol error: __thriftError]) return NO;
  if (![outProtocol writeMessageEnd: __thriftError]) return NO;
  if (![[outProtocol transport] flush: __thriftError]) return NO;
  return YES;
}
@end