/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */

#import <Foundation/Foundation.h>

#import "TProtocol.h"
#import "TApplicationException.h"
#import "TProtocolUtil.h"
#import "TProcessor.h"

#import "EDAMLimits.h"

#import "Types.h"

static NSString * EDAMEDAM_NOTE_SOURCE_WEB_CLIP = @"web.clip";
static NSString * EDAMEDAM_NOTE_SOURCE_MAIL_CLIP = @"mail.clip";
static NSString * EDAMEDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = @"mail.smtp";

@implementation EDAMTypesConstants
+ (void) initialize {
}
+ (NSString *) EDAM_NOTE_SOURCE_WEB_CLIP{
  return EDAMEDAM_NOTE_SOURCE_WEB_CLIP;
}
+ (NSString *) EDAM_NOTE_SOURCE_MAIL_CLIP{
  return EDAMEDAM_NOTE_SOURCE_MAIL_CLIP;
}
+ (NSString *) EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY{
  return EDAMEDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY;
}
@end

@implementation EDAMData

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic bodyHash;
@dynamic size;
@dynamic body;
#endif

- (id) initWithBodyHash: (NSData *) bodyHash size: (int32_t) size body: (NSData *) body
{
  self = [super init];
  __bodyHash = [bodyHash retain];
  __bodyHash_isset = YES;
  __size = size;
  __size_isset = YES;
  __body = [body retain];
  __body_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"bodyHash"])
  {
    __bodyHash = [[decoder decodeObjectForKey: @"bodyHash"] retain];
    __bodyHash_isset = YES;
  }
  if ([decoder containsValueForKey: @"size"])
  {
    __size = [decoder decodeInt32ForKey: @"size"];
    __size_isset = YES;
  }
  if ([decoder containsValueForKey: @"body"])
  {
    __body = [[decoder decodeObjectForKey: @"body"] retain];
    __body_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__bodyHash_isset)
  {
    [encoder encodeObject: __bodyHash forKey: @"bodyHash"];
  }
  if (__size_isset)
  {
    [encoder encodeInt32: __size forKey: @"size"];
  }
  if (__body_isset)
  {
    [encoder encodeObject: __body forKey: @"body"];
  }
}

- (void) dealloc
{
  [__bodyHash release];
  [__body release];
  [super dealloc];
}

- (NSData *) bodyHash {
  return [[__bodyHash retain] autorelease];
}

- (void) setBodyHash: (NSData *) bodyHash {
  [bodyHash retain];
  [__bodyHash release];
  __bodyHash = bodyHash;
  __bodyHash_isset = YES;
}

- (BOOL) bodyHashIsSet {
  return __bodyHash_isset;
}

- (void) unsetBodyHash {
  [__bodyHash release];
  __bodyHash = nil;
  __bodyHash_isset = NO;
}

- (int32_t) size {
  return __size;
}

- (void) setSize: (int32_t) size {
  __size = size;
  __size_isset = YES;
}

- (BOOL) sizeIsSet {
  return __size_isset;
}

- (void) unsetSize {
  __size_isset = NO;
}

- (NSData *) body {
  return [[__body retain] autorelease];
}

- (void) setBody: (NSData *) body {
  [body retain];
  [__body release];
  __body = body;
  __body_isset = YES;
}

- (BOOL) bodyIsSet {
  return __body_isset;
}

- (void) unsetBody {
  [__body release];
  __body = nil;
  __body_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSData * fieldValue = [inProtocol readBinary];
          [self setBodyHash: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setSize: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSData * fieldValue = [inProtocol readBinary];
          [self setBody: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Data"];
  if (__bodyHash_isset) {
    if (__bodyHash != nil) {
      [outProtocol writeFieldBeginWithName: @"bodyHash" type: TType_STRING fieldID: 1];
      [outProtocol writeBinary: __bodyHash];
      [outProtocol writeFieldEnd];
    }
  }
  if (__size_isset) {
    [outProtocol writeFieldBeginWithName: @"size" type: TType_I32 fieldID: 2];
    [outProtocol writeI32: __size];
    [outProtocol writeFieldEnd];
  }
  if (__body_isset) {
    if (__body != nil) {
      [outProtocol writeFieldBeginWithName: @"body" type: TType_STRING fieldID: 3];
      [outProtocol writeBinary: __body];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Data("];
  [ms appendString: @"bodyHash:"];
  [ms appendFormat: @"\"%@\"", __bodyHash];
  [ms appendString: @",size:"];
  [ms appendFormat: @"%i", __size];
  [ms appendString: @",body:"];
  [ms appendFormat: @"\"%@\"", __body];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMUserAttributes

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic defaultLocationName;
@dynamic defaultLatitude;
@dynamic defaultLongitude;
@dynamic preactivation;
@dynamic viewedPromotions;
@dynamic incomingEmailAddress;
@dynamic recentMailedAddresses;
@dynamic comments;
@dynamic dateAgreedToTermsOfService;
@dynamic maxReferrals;
@dynamic referralCount;
@dynamic refererCode;
@dynamic sentEmailDate;
@dynamic sentEmailCount;
@dynamic dailyEmailLimit;
@dynamic emailOptOutDate;
@dynamic partnerEmailOptInDate;
@dynamic preferredLanguage;
@dynamic preferredCountry;
@dynamic clipFullPage;
@dynamic twitterUserName;
@dynamic twitterId;
@dynamic groupName;
@dynamic recognitionLanguage;
@dynamic customerProfileId;
@dynamic referralProof;
#endif

- (id) initWithDefaultLocationName: (NSString *) defaultLocationName defaultLatitude: (double) defaultLatitude defaultLongitude: (double) defaultLongitude preactivation: (BOOL) preactivation viewedPromotions: (NSArray *) viewedPromotions incomingEmailAddress: (NSString *) incomingEmailAddress recentMailedAddresses: (NSArray *) recentMailedAddresses comments: (NSString *) comments dateAgreedToTermsOfService: (EDAMTimestamp) dateAgreedToTermsOfService maxReferrals: (int32_t) maxReferrals referralCount: (int32_t) referralCount refererCode: (NSString *) refererCode sentEmailDate: (EDAMTimestamp) sentEmailDate sentEmailCount: (int32_t) sentEmailCount dailyEmailLimit: (int32_t) dailyEmailLimit emailOptOutDate: (EDAMTimestamp) emailOptOutDate partnerEmailOptInDate: (EDAMTimestamp) partnerEmailOptInDate preferredLanguage: (NSString *) preferredLanguage preferredCountry: (NSString *) preferredCountry clipFullPage: (BOOL) clipFullPage twitterUserName: (NSString *) twitterUserName twitterId: (NSString *) twitterId groupName: (NSString *) groupName recognitionLanguage: (NSString *) recognitionLanguage customerProfileId: (int64_t) customerProfileId referralProof: (NSString *) referralProof
{
  self = [super init];
  __defaultLocationName = [defaultLocationName retain];
  __defaultLocationName_isset = YES;
  __defaultLatitude = defaultLatitude;
  __defaultLatitude_isset = YES;
  __defaultLongitude = defaultLongitude;
  __defaultLongitude_isset = YES;
  __preactivation = preactivation;
  __preactivation_isset = YES;
  __viewedPromotions = [viewedPromotions retain];
  __viewedPromotions_isset = YES;
  __incomingEmailAddress = [incomingEmailAddress retain];
  __incomingEmailAddress_isset = YES;
  __recentMailedAddresses = [recentMailedAddresses retain];
  __recentMailedAddresses_isset = YES;
  __comments = [comments retain];
  __comments_isset = YES;
  __dateAgreedToTermsOfService = dateAgreedToTermsOfService;
  __dateAgreedToTermsOfService_isset = YES;
  __maxReferrals = maxReferrals;
  __maxReferrals_isset = YES;
  __referralCount = referralCount;
  __referralCount_isset = YES;
  __refererCode = [refererCode retain];
  __refererCode_isset = YES;
  __sentEmailDate = sentEmailDate;
  __sentEmailDate_isset = YES;
  __sentEmailCount = sentEmailCount;
  __sentEmailCount_isset = YES;
  __dailyEmailLimit = dailyEmailLimit;
  __dailyEmailLimit_isset = YES;
  __emailOptOutDate = emailOptOutDate;
  __emailOptOutDate_isset = YES;
  __partnerEmailOptInDate = partnerEmailOptInDate;
  __partnerEmailOptInDate_isset = YES;
  __preferredLanguage = [preferredLanguage retain];
  __preferredLanguage_isset = YES;
  __preferredCountry = [preferredCountry retain];
  __preferredCountry_isset = YES;
  __clipFullPage = clipFullPage;
  __clipFullPage_isset = YES;
  __twitterUserName = [twitterUserName retain];
  __twitterUserName_isset = YES;
  __twitterId = [twitterId retain];
  __twitterId_isset = YES;
  __groupName = [groupName retain];
  __groupName_isset = YES;
  __recognitionLanguage = [recognitionLanguage retain];
  __recognitionLanguage_isset = YES;
  __customerProfileId = customerProfileId;
  __customerProfileId_isset = YES;
  __referralProof = [referralProof retain];
  __referralProof_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"defaultLocationName"])
  {
    __defaultLocationName = [[decoder decodeObjectForKey: @"defaultLocationName"] retain];
    __defaultLocationName_isset = YES;
  }
  if ([decoder containsValueForKey: @"defaultLatitude"])
  {
    __defaultLatitude = [decoder decodeDoubleForKey: @"defaultLatitude"];
    __defaultLatitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"defaultLongitude"])
  {
    __defaultLongitude = [decoder decodeDoubleForKey: @"defaultLongitude"];
    __defaultLongitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"preactivation"])
  {
    __preactivation = [decoder decodeBoolForKey: @"preactivation"];
    __preactivation_isset = YES;
  }
  if ([decoder containsValueForKey: @"viewedPromotions"])
  {
    __viewedPromotions = [[decoder decodeObjectForKey: @"viewedPromotions"] retain];
    __viewedPromotions_isset = YES;
  }
  if ([decoder containsValueForKey: @"incomingEmailAddress"])
  {
    __incomingEmailAddress = [[decoder decodeObjectForKey: @"incomingEmailAddress"] retain];
    __incomingEmailAddress_isset = YES;
  }
  if ([decoder containsValueForKey: @"recentMailedAddresses"])
  {
    __recentMailedAddresses = [[decoder decodeObjectForKey: @"recentMailedAddresses"] retain];
    __recentMailedAddresses_isset = YES;
  }
  if ([decoder containsValueForKey: @"comments"])
  {
    __comments = [[decoder decodeObjectForKey: @"comments"] retain];
    __comments_isset = YES;
  }
  if ([decoder containsValueForKey: @"dateAgreedToTermsOfService"])
  {
    __dateAgreedToTermsOfService = [decoder decodeInt64ForKey: @"dateAgreedToTermsOfService"];
    __dateAgreedToTermsOfService_isset = YES;
  }
  if ([decoder containsValueForKey: @"maxReferrals"])
  {
    __maxReferrals = [decoder decodeInt32ForKey: @"maxReferrals"];
    __maxReferrals_isset = YES;
  }
  if ([decoder containsValueForKey: @"referralCount"])
  {
    __referralCount = [decoder decodeInt32ForKey: @"referralCount"];
    __referralCount_isset = YES;
  }
  if ([decoder containsValueForKey: @"refererCode"])
  {
    __refererCode = [[decoder decodeObjectForKey: @"refererCode"] retain];
    __refererCode_isset = YES;
  }
  if ([decoder containsValueForKey: @"sentEmailDate"])
  {
    __sentEmailDate = [decoder decodeInt64ForKey: @"sentEmailDate"];
    __sentEmailDate_isset = YES;
  }
  if ([decoder containsValueForKey: @"sentEmailCount"])
  {
    __sentEmailCount = [decoder decodeInt32ForKey: @"sentEmailCount"];
    __sentEmailCount_isset = YES;
  }
  if ([decoder containsValueForKey: @"dailyEmailLimit"])
  {
    __dailyEmailLimit = [decoder decodeInt32ForKey: @"dailyEmailLimit"];
    __dailyEmailLimit_isset = YES;
  }
  if ([decoder containsValueForKey: @"emailOptOutDate"])
  {
    __emailOptOutDate = [decoder decodeInt64ForKey: @"emailOptOutDate"];
    __emailOptOutDate_isset = YES;
  }
  if ([decoder containsValueForKey: @"partnerEmailOptInDate"])
  {
    __partnerEmailOptInDate = [decoder decodeInt64ForKey: @"partnerEmailOptInDate"];
    __partnerEmailOptInDate_isset = YES;
  }
  if ([decoder containsValueForKey: @"preferredLanguage"])
  {
    __preferredLanguage = [[decoder decodeObjectForKey: @"preferredLanguage"] retain];
    __preferredLanguage_isset = YES;
  }
  if ([decoder containsValueForKey: @"preferredCountry"])
  {
    __preferredCountry = [[decoder decodeObjectForKey: @"preferredCountry"] retain];
    __preferredCountry_isset = YES;
  }
  if ([decoder containsValueForKey: @"clipFullPage"])
  {
    __clipFullPage = [decoder decodeBoolForKey: @"clipFullPage"];
    __clipFullPage_isset = YES;
  }
  if ([decoder containsValueForKey: @"twitterUserName"])
  {
    __twitterUserName = [[decoder decodeObjectForKey: @"twitterUserName"] retain];
    __twitterUserName_isset = YES;
  }
  if ([decoder containsValueForKey: @"twitterId"])
  {
    __twitterId = [[decoder decodeObjectForKey: @"twitterId"] retain];
    __twitterId_isset = YES;
  }
  if ([decoder containsValueForKey: @"groupName"])
  {
    __groupName = [[decoder decodeObjectForKey: @"groupName"] retain];
    __groupName_isset = YES;
  }
  if ([decoder containsValueForKey: @"recognitionLanguage"])
  {
    __recognitionLanguage = [[decoder decodeObjectForKey: @"recognitionLanguage"] retain];
    __recognitionLanguage_isset = YES;
  }
  if ([decoder containsValueForKey: @"customerProfileId"])
  {
    __customerProfileId = [decoder decodeInt64ForKey: @"customerProfileId"];
    __customerProfileId_isset = YES;
  }
  if ([decoder containsValueForKey: @"referralProof"])
  {
    __referralProof = [[decoder decodeObjectForKey: @"referralProof"] retain];
    __referralProof_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__defaultLocationName_isset)
  {
    [encoder encodeObject: __defaultLocationName forKey: @"defaultLocationName"];
  }
  if (__defaultLatitude_isset)
  {
    [encoder encodeDouble: __defaultLatitude forKey: @"defaultLatitude"];
  }
  if (__defaultLongitude_isset)
  {
    [encoder encodeDouble: __defaultLongitude forKey: @"defaultLongitude"];
  }
  if (__preactivation_isset)
  {
    [encoder encodeBool: __preactivation forKey: @"preactivation"];
  }
  if (__viewedPromotions_isset)
  {
    [encoder encodeObject: __viewedPromotions forKey: @"viewedPromotions"];
  }
  if (__incomingEmailAddress_isset)
  {
    [encoder encodeObject: __incomingEmailAddress forKey: @"incomingEmailAddress"];
  }
  if (__recentMailedAddresses_isset)
  {
    [encoder encodeObject: __recentMailedAddresses forKey: @"recentMailedAddresses"];
  }
  if (__comments_isset)
  {
    [encoder encodeObject: __comments forKey: @"comments"];
  }
  if (__dateAgreedToTermsOfService_isset)
  {
    [encoder encodeInt64: __dateAgreedToTermsOfService forKey: @"dateAgreedToTermsOfService"];
  }
  if (__maxReferrals_isset)
  {
    [encoder encodeInt32: __maxReferrals forKey: @"maxReferrals"];
  }
  if (__referralCount_isset)
  {
    [encoder encodeInt32: __referralCount forKey: @"referralCount"];
  }
  if (__refererCode_isset)
  {
    [encoder encodeObject: __refererCode forKey: @"refererCode"];
  }
  if (__sentEmailDate_isset)
  {
    [encoder encodeInt64: __sentEmailDate forKey: @"sentEmailDate"];
  }
  if (__sentEmailCount_isset)
  {
    [encoder encodeInt32: __sentEmailCount forKey: @"sentEmailCount"];
  }
  if (__dailyEmailLimit_isset)
  {
    [encoder encodeInt32: __dailyEmailLimit forKey: @"dailyEmailLimit"];
  }
  if (__emailOptOutDate_isset)
  {
    [encoder encodeInt64: __emailOptOutDate forKey: @"emailOptOutDate"];
  }
  if (__partnerEmailOptInDate_isset)
  {
    [encoder encodeInt64: __partnerEmailOptInDate forKey: @"partnerEmailOptInDate"];
  }
  if (__preferredLanguage_isset)
  {
    [encoder encodeObject: __preferredLanguage forKey: @"preferredLanguage"];
  }
  if (__preferredCountry_isset)
  {
    [encoder encodeObject: __preferredCountry forKey: @"preferredCountry"];
  }
  if (__clipFullPage_isset)
  {
    [encoder encodeBool: __clipFullPage forKey: @"clipFullPage"];
  }
  if (__twitterUserName_isset)
  {
    [encoder encodeObject: __twitterUserName forKey: @"twitterUserName"];
  }
  if (__twitterId_isset)
  {
    [encoder encodeObject: __twitterId forKey: @"twitterId"];
  }
  if (__groupName_isset)
  {
    [encoder encodeObject: __groupName forKey: @"groupName"];
  }
  if (__recognitionLanguage_isset)
  {
    [encoder encodeObject: __recognitionLanguage forKey: @"recognitionLanguage"];
  }
  if (__customerProfileId_isset)
  {
    [encoder encodeInt64: __customerProfileId forKey: @"customerProfileId"];
  }
  if (__referralProof_isset)
  {
    [encoder encodeObject: __referralProof forKey: @"referralProof"];
  }
}

- (void) dealloc
{
  [__defaultLocationName release];
  [__viewedPromotions release];
  [__incomingEmailAddress release];
  [__recentMailedAddresses release];
  [__comments release];
  [__refererCode release];
  [__preferredLanguage release];
  [__preferredCountry release];
  [__twitterUserName release];
  [__twitterId release];
  [__groupName release];
  [__recognitionLanguage release];
  [__referralProof release];
  [super dealloc];
}

- (NSString *) defaultLocationName {
  return [[__defaultLocationName retain] autorelease];
}

- (void) setDefaultLocationName: (NSString *) defaultLocationName {
  [defaultLocationName retain];
  [__defaultLocationName release];
  __defaultLocationName = defaultLocationName;
  __defaultLocationName_isset = YES;
}

- (BOOL) defaultLocationNameIsSet {
  return __defaultLocationName_isset;
}

- (void) unsetDefaultLocationName {
  [__defaultLocationName release];
  __defaultLocationName = nil;
  __defaultLocationName_isset = NO;
}

- (double) defaultLatitude {
  return __defaultLatitude;
}

- (void) setDefaultLatitude: (double) defaultLatitude {
  __defaultLatitude = defaultLatitude;
  __defaultLatitude_isset = YES;
}

- (BOOL) defaultLatitudeIsSet {
  return __defaultLatitude_isset;
}

- (void) unsetDefaultLatitude {
  __defaultLatitude_isset = NO;
}

- (double) defaultLongitude {
  return __defaultLongitude;
}

- (void) setDefaultLongitude: (double) defaultLongitude {
  __defaultLongitude = defaultLongitude;
  __defaultLongitude_isset = YES;
}

- (BOOL) defaultLongitudeIsSet {
  return __defaultLongitude_isset;
}

- (void) unsetDefaultLongitude {
  __defaultLongitude_isset = NO;
}

- (BOOL) preactivation {
  return __preactivation;
}

- (void) setPreactivation: (BOOL) preactivation {
  __preactivation = preactivation;
  __preactivation_isset = YES;
}

- (BOOL) preactivationIsSet {
  return __preactivation_isset;
}

- (void) unsetPreactivation {
  __preactivation_isset = NO;
}

- (NSArray *) viewedPromotions {
  return [[__viewedPromotions retain] autorelease];
}

- (void) setViewedPromotions: (NSArray *) viewedPromotions {
  [viewedPromotions retain];
  [__viewedPromotions release];
  __viewedPromotions = viewedPromotions;
  __viewedPromotions_isset = YES;
}

- (BOOL) viewedPromotionsIsSet {
  return __viewedPromotions_isset;
}

- (void) unsetViewedPromotions {
  [__viewedPromotions release];
  __viewedPromotions = nil;
  __viewedPromotions_isset = NO;
}

- (NSString *) incomingEmailAddress {
  return [[__incomingEmailAddress retain] autorelease];
}

- (void) setIncomingEmailAddress: (NSString *) incomingEmailAddress {
  [incomingEmailAddress retain];
  [__incomingEmailAddress release];
  __incomingEmailAddress = incomingEmailAddress;
  __incomingEmailAddress_isset = YES;
}

- (BOOL) incomingEmailAddressIsSet {
  return __incomingEmailAddress_isset;
}

- (void) unsetIncomingEmailAddress {
  [__incomingEmailAddress release];
  __incomingEmailAddress = nil;
  __incomingEmailAddress_isset = NO;
}

- (NSArray *) recentMailedAddresses {
  return [[__recentMailedAddresses retain] autorelease];
}

- (void) setRecentMailedAddresses: (NSArray *) recentMailedAddresses {
  [recentMailedAddresses retain];
  [__recentMailedAddresses release];
  __recentMailedAddresses = recentMailedAddresses;
  __recentMailedAddresses_isset = YES;
}

- (BOOL) recentMailedAddressesIsSet {
  return __recentMailedAddresses_isset;
}

- (void) unsetRecentMailedAddresses {
  [__recentMailedAddresses release];
  __recentMailedAddresses = nil;
  __recentMailedAddresses_isset = NO;
}

- (NSString *) comments {
  return [[__comments retain] autorelease];
}

- (void) setComments: (NSString *) comments {
  [comments retain];
  [__comments release];
  __comments = comments;
  __comments_isset = YES;
}

- (BOOL) commentsIsSet {
  return __comments_isset;
}

- (void) unsetComments {
  [__comments release];
  __comments = nil;
  __comments_isset = NO;
}

- (int64_t) dateAgreedToTermsOfService {
  return __dateAgreedToTermsOfService;
}

- (void) setDateAgreedToTermsOfService: (int64_t) dateAgreedToTermsOfService {
  __dateAgreedToTermsOfService = dateAgreedToTermsOfService;
  __dateAgreedToTermsOfService_isset = YES;
}

- (BOOL) dateAgreedToTermsOfServiceIsSet {
  return __dateAgreedToTermsOfService_isset;
}

- (void) unsetDateAgreedToTermsOfService {
  __dateAgreedToTermsOfService_isset = NO;
}

- (int32_t) maxReferrals {
  return __maxReferrals;
}

- (void) setMaxReferrals: (int32_t) maxReferrals {
  __maxReferrals = maxReferrals;
  __maxReferrals_isset = YES;
}

- (BOOL) maxReferralsIsSet {
  return __maxReferrals_isset;
}

- (void) unsetMaxReferrals {
  __maxReferrals_isset = NO;
}

- (int32_t) referralCount {
  return __referralCount;
}

- (void) setReferralCount: (int32_t) referralCount {
  __referralCount = referralCount;
  __referralCount_isset = YES;
}

- (BOOL) referralCountIsSet {
  return __referralCount_isset;
}

- (void) unsetReferralCount {
  __referralCount_isset = NO;
}

- (NSString *) refererCode {
  return [[__refererCode retain] autorelease];
}

- (void) setRefererCode: (NSString *) refererCode {
  [refererCode retain];
  [__refererCode release];
  __refererCode = refererCode;
  __refererCode_isset = YES;
}

- (BOOL) refererCodeIsSet {
  return __refererCode_isset;
}

- (void) unsetRefererCode {
  [__refererCode release];
  __refererCode = nil;
  __refererCode_isset = NO;
}

- (int64_t) sentEmailDate {
  return __sentEmailDate;
}

- (void) setSentEmailDate: (int64_t) sentEmailDate {
  __sentEmailDate = sentEmailDate;
  __sentEmailDate_isset = YES;
}

- (BOOL) sentEmailDateIsSet {
  return __sentEmailDate_isset;
}

- (void) unsetSentEmailDate {
  __sentEmailDate_isset = NO;
}

- (int32_t) sentEmailCount {
  return __sentEmailCount;
}

- (void) setSentEmailCount: (int32_t) sentEmailCount {
  __sentEmailCount = sentEmailCount;
  __sentEmailCount_isset = YES;
}

- (BOOL) sentEmailCountIsSet {
  return __sentEmailCount_isset;
}

- (void) unsetSentEmailCount {
  __sentEmailCount_isset = NO;
}

- (int32_t) dailyEmailLimit {
  return __dailyEmailLimit;
}

- (void) setDailyEmailLimit: (int32_t) dailyEmailLimit {
  __dailyEmailLimit = dailyEmailLimit;
  __dailyEmailLimit_isset = YES;
}

- (BOOL) dailyEmailLimitIsSet {
  return __dailyEmailLimit_isset;
}

- (void) unsetDailyEmailLimit {
  __dailyEmailLimit_isset = NO;
}

- (int64_t) emailOptOutDate {
  return __emailOptOutDate;
}

- (void) setEmailOptOutDate: (int64_t) emailOptOutDate {
  __emailOptOutDate = emailOptOutDate;
  __emailOptOutDate_isset = YES;
}

- (BOOL) emailOptOutDateIsSet {
  return __emailOptOutDate_isset;
}

- (void) unsetEmailOptOutDate {
  __emailOptOutDate_isset = NO;
}

- (int64_t) partnerEmailOptInDate {
  return __partnerEmailOptInDate;
}

- (void) setPartnerEmailOptInDate: (int64_t) partnerEmailOptInDate {
  __partnerEmailOptInDate = partnerEmailOptInDate;
  __partnerEmailOptInDate_isset = YES;
}

- (BOOL) partnerEmailOptInDateIsSet {
  return __partnerEmailOptInDate_isset;
}

- (void) unsetPartnerEmailOptInDate {
  __partnerEmailOptInDate_isset = NO;
}

- (NSString *) preferredLanguage {
  return [[__preferredLanguage retain] autorelease];
}

- (void) setPreferredLanguage: (NSString *) preferredLanguage {
  [preferredLanguage retain];
  [__preferredLanguage release];
  __preferredLanguage = preferredLanguage;
  __preferredLanguage_isset = YES;
}

- (BOOL) preferredLanguageIsSet {
  return __preferredLanguage_isset;
}

- (void) unsetPreferredLanguage {
  [__preferredLanguage release];
  __preferredLanguage = nil;
  __preferredLanguage_isset = NO;
}

- (NSString *) preferredCountry {
  return [[__preferredCountry retain] autorelease];
}

- (void) setPreferredCountry: (NSString *) preferredCountry {
  [preferredCountry retain];
  [__preferredCountry release];
  __preferredCountry = preferredCountry;
  __preferredCountry_isset = YES;
}

- (BOOL) preferredCountryIsSet {
  return __preferredCountry_isset;
}

- (void) unsetPreferredCountry {
  [__preferredCountry release];
  __preferredCountry = nil;
  __preferredCountry_isset = NO;
}

- (BOOL) clipFullPage {
  return __clipFullPage;
}

- (void) setClipFullPage: (BOOL) clipFullPage {
  __clipFullPage = clipFullPage;
  __clipFullPage_isset = YES;
}

- (BOOL) clipFullPageIsSet {
  return __clipFullPage_isset;
}

- (void) unsetClipFullPage {
  __clipFullPage_isset = NO;
}

- (NSString *) twitterUserName {
  return [[__twitterUserName retain] autorelease];
}

- (void) setTwitterUserName: (NSString *) twitterUserName {
  [twitterUserName retain];
  [__twitterUserName release];
  __twitterUserName = twitterUserName;
  __twitterUserName_isset = YES;
}

- (BOOL) twitterUserNameIsSet {
  return __twitterUserName_isset;
}

- (void) unsetTwitterUserName {
  [__twitterUserName release];
  __twitterUserName = nil;
  __twitterUserName_isset = NO;
}

- (NSString *) twitterId {
  return [[__twitterId retain] autorelease];
}

- (void) setTwitterId: (NSString *) twitterId {
  [twitterId retain];
  [__twitterId release];
  __twitterId = twitterId;
  __twitterId_isset = YES;
}

- (BOOL) twitterIdIsSet {
  return __twitterId_isset;
}

- (void) unsetTwitterId {
  [__twitterId release];
  __twitterId = nil;
  __twitterId_isset = NO;
}

- (NSString *) groupName {
  return [[__groupName retain] autorelease];
}

- (void) setGroupName: (NSString *) groupName {
  [groupName retain];
  [__groupName release];
  __groupName = groupName;
  __groupName_isset = YES;
}

- (BOOL) groupNameIsSet {
  return __groupName_isset;
}

- (void) unsetGroupName {
  [__groupName release];
  __groupName = nil;
  __groupName_isset = NO;
}

- (NSString *) recognitionLanguage {
  return [[__recognitionLanguage retain] autorelease];
}

- (void) setRecognitionLanguage: (NSString *) recognitionLanguage {
  [recognitionLanguage retain];
  [__recognitionLanguage release];
  __recognitionLanguage = recognitionLanguage;
  __recognitionLanguage_isset = YES;
}

- (BOOL) recognitionLanguageIsSet {
  return __recognitionLanguage_isset;
}

- (void) unsetRecognitionLanguage {
  [__recognitionLanguage release];
  __recognitionLanguage = nil;
  __recognitionLanguage_isset = NO;
}

- (int64_t) customerProfileId {
  return __customerProfileId;
}

- (void) setCustomerProfileId: (int64_t) customerProfileId {
  __customerProfileId = customerProfileId;
  __customerProfileId_isset = YES;
}

- (BOOL) customerProfileIdIsSet {
  return __customerProfileId_isset;
}

- (void) unsetCustomerProfileId {
  __customerProfileId_isset = NO;
}

- (NSString *) referralProof {
  return [[__referralProof retain] autorelease];
}

- (void) setReferralProof: (NSString *) referralProof {
  [referralProof retain];
  [__referralProof release];
  __referralProof = referralProof;
  __referralProof_isset = YES;
}

- (BOOL) referralProofIsSet {
  return __referralProof_isset;
}

- (void) unsetReferralProof {
  [__referralProof release];
  __referralProof = nil;
  __referralProof_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setDefaultLocationName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setDefaultLatitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setDefaultLongitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setPreactivation: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_LIST) {
          int _size0;
          [inProtocol readListBeginReturningElementType: NULL size: &_size0];
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0];
          int _i1;
          for (_i1 = 0; _i1 < _size0; ++_i1)
          {
            NSString * _elem2 = [inProtocol readString];
            [fieldValue addObject: _elem2];
          }
          [inProtocol readListEnd];
          [self setViewedPromotions: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setIncomingEmailAddress: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_LIST) {
          int _size3;
          [inProtocol readListBeginReturningElementType: NULL size: &_size3];
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size3];
          int _i4;
          for (_i4 = 0; _i4 < _size3; ++_i4)
          {
            NSString * _elem5 = [inProtocol readString];
            [fieldValue addObject: _elem5];
          }
          [inProtocol readListEnd];
          [self setRecentMailedAddresses: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setComments: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setDateAgreedToTermsOfService: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setMaxReferrals: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setReferralCount: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 14:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setRefererCode: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 15:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setSentEmailDate: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 16:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setSentEmailCount: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 17:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setDailyEmailLimit: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 18:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setEmailOptOutDate: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 19:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setPartnerEmailOptInDate: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 20:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPreferredLanguage: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 21:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPreferredCountry: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 22:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setClipFullPage: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 23:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setTwitterUserName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 24:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setTwitterId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 25:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGroupName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 26:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setRecognitionLanguage: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 27:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setCustomerProfileId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 28:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setReferralProof: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"UserAttributes"];
  if (__defaultLocationName_isset) {
    if (__defaultLocationName != nil) {
      [outProtocol writeFieldBeginWithName: @"defaultLocationName" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __defaultLocationName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__defaultLatitude_isset) {
    [outProtocol writeFieldBeginWithName: @"defaultLatitude" type: TType_DOUBLE fieldID: 2];
    [outProtocol writeDouble: __defaultLatitude];
    [outProtocol writeFieldEnd];
  }
  if (__defaultLongitude_isset) {
    [outProtocol writeFieldBeginWithName: @"defaultLongitude" type: TType_DOUBLE fieldID: 3];
    [outProtocol writeDouble: __defaultLongitude];
    [outProtocol writeFieldEnd];
  }
  if (__preactivation_isset) {
    [outProtocol writeFieldBeginWithName: @"preactivation" type: TType_BOOL fieldID: 4];
    [outProtocol writeBool: __preactivation];
    [outProtocol writeFieldEnd];
  }
  if (__viewedPromotions_isset) {
    if (__viewedPromotions != nil) {
      [outProtocol writeFieldBeginWithName: @"viewedPromotions" type: TType_LIST fieldID: 5];
      {
        [outProtocol writeListBeginWithElementType: TType_STRING size: [__viewedPromotions count]];
        NSUInteger i7;
        for (i7 = 0; i7 < [__viewedPromotions count]; i7++)
        {
          [outProtocol writeString: [__viewedPromotions objectAtIndex: i7]];
        }
        [outProtocol writeListEnd];
      }
      [outProtocol writeFieldEnd];
    }
  }
  if (__incomingEmailAddress_isset) {
    if (__incomingEmailAddress != nil) {
      [outProtocol writeFieldBeginWithName: @"incomingEmailAddress" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __incomingEmailAddress];
      [outProtocol writeFieldEnd];
    }
  }
  if (__recentMailedAddresses_isset) {
    if (__recentMailedAddresses != nil) {
      [outProtocol writeFieldBeginWithName: @"recentMailedAddresses" type: TType_LIST fieldID: 7];
      {
        [outProtocol writeListBeginWithElementType: TType_STRING size: [__recentMailedAddresses count]];
        NSUInteger i9;
        for (i9 = 0; i9 < [__recentMailedAddresses count]; i9++)
        {
          [outProtocol writeString: [__recentMailedAddresses objectAtIndex: i9]];
        }
        [outProtocol writeListEnd];
      }
      [outProtocol writeFieldEnd];
    }
  }
  if (__comments_isset) {
    if (__comments != nil) {
      [outProtocol writeFieldBeginWithName: @"comments" type: TType_STRING fieldID: 9];
      [outProtocol writeString: __comments];
      [outProtocol writeFieldEnd];
    }
  }
  if (__dateAgreedToTermsOfService_isset) {
    [outProtocol writeFieldBeginWithName: @"dateAgreedToTermsOfService" type: TType_I64 fieldID: 11];
    [outProtocol writeI64: __dateAgreedToTermsOfService];
    [outProtocol writeFieldEnd];
  }
  if (__maxReferrals_isset) {
    [outProtocol writeFieldBeginWithName: @"maxReferrals" type: TType_I32 fieldID: 12];
    [outProtocol writeI32: __maxReferrals];
    [outProtocol writeFieldEnd];
  }
  if (__referralCount_isset) {
    [outProtocol writeFieldBeginWithName: @"referralCount" type: TType_I32 fieldID: 13];
    [outProtocol writeI32: __referralCount];
    [outProtocol writeFieldEnd];
  }
  if (__refererCode_isset) {
    if (__refererCode != nil) {
      [outProtocol writeFieldBeginWithName: @"refererCode" type: TType_STRING fieldID: 14];
      [outProtocol writeString: __refererCode];
      [outProtocol writeFieldEnd];
    }
  }
  if (__sentEmailDate_isset) {
    [outProtocol writeFieldBeginWithName: @"sentEmailDate" type: TType_I64 fieldID: 15];
    [outProtocol writeI64: __sentEmailDate];
    [outProtocol writeFieldEnd];
  }
  if (__sentEmailCount_isset) {
    [outProtocol writeFieldBeginWithName: @"sentEmailCount" type: TType_I32 fieldID: 16];
    [outProtocol writeI32: __sentEmailCount];
    [outProtocol writeFieldEnd];
  }
  if (__dailyEmailLimit_isset) {
    [outProtocol writeFieldBeginWithName: @"dailyEmailLimit" type: TType_I32 fieldID: 17];
    [outProtocol writeI32: __dailyEmailLimit];
    [outProtocol writeFieldEnd];
  }
  if (__emailOptOutDate_isset) {
    [outProtocol writeFieldBeginWithName: @"emailOptOutDate" type: TType_I64 fieldID: 18];
    [outProtocol writeI64: __emailOptOutDate];
    [outProtocol writeFieldEnd];
  }
  if (__partnerEmailOptInDate_isset) {
    [outProtocol writeFieldBeginWithName: @"partnerEmailOptInDate" type: TType_I64 fieldID: 19];
    [outProtocol writeI64: __partnerEmailOptInDate];
    [outProtocol writeFieldEnd];
  }
  if (__preferredLanguage_isset) {
    if (__preferredLanguage != nil) {
      [outProtocol writeFieldBeginWithName: @"preferredLanguage" type: TType_STRING fieldID: 20];
      [outProtocol writeString: __preferredLanguage];
      [outProtocol writeFieldEnd];
    }
  }
  if (__preferredCountry_isset) {
    if (__preferredCountry != nil) {
      [outProtocol writeFieldBeginWithName: @"preferredCountry" type: TType_STRING fieldID: 21];
      [outProtocol writeString: __preferredCountry];
      [outProtocol writeFieldEnd];
    }
  }
  if (__clipFullPage_isset) {
    [outProtocol writeFieldBeginWithName: @"clipFullPage" type: TType_BOOL fieldID: 22];
    [outProtocol writeBool: __clipFullPage];
    [outProtocol writeFieldEnd];
  }
  if (__twitterUserName_isset) {
    if (__twitterUserName != nil) {
      [outProtocol writeFieldBeginWithName: @"twitterUserName" type: TType_STRING fieldID: 23];
      [outProtocol writeString: __twitterUserName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__twitterId_isset) {
    if (__twitterId != nil) {
      [outProtocol writeFieldBeginWithName: @"twitterId" type: TType_STRING fieldID: 24];
      [outProtocol writeString: __twitterId];
      [outProtocol writeFieldEnd];
    }
  }
  if (__groupName_isset) {
    if (__groupName != nil) {
      [outProtocol writeFieldBeginWithName: @"groupName" type: TType_STRING fieldID: 25];
      [outProtocol writeString: __groupName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__recognitionLanguage_isset) {
    if (__recognitionLanguage != nil) {
      [outProtocol writeFieldBeginWithName: @"recognitionLanguage" type: TType_STRING fieldID: 26];
      [outProtocol writeString: __recognitionLanguage];
      [outProtocol writeFieldEnd];
    }
  }
  if (__customerProfileId_isset) {
    [outProtocol writeFieldBeginWithName: @"customerProfileId" type: TType_I64 fieldID: 27];
    [outProtocol writeI64: __customerProfileId];
    [outProtocol writeFieldEnd];
  }
  if (__referralProof_isset) {
    if (__referralProof != nil) {
      [outProtocol writeFieldBeginWithName: @"referralProof" type: TType_STRING fieldID: 28];
      [outProtocol writeString: __referralProof];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"UserAttributes("];
  [ms appendString: @"defaultLocationName:"];
  [ms appendFormat: @"\"%@\"", __defaultLocationName];
  [ms appendString: @",defaultLatitude:"];
  [ms appendFormat: @"%f", __defaultLatitude];
  [ms appendString: @",defaultLongitude:"];
  [ms appendFormat: @"%f", __defaultLongitude];
  [ms appendString: @",preactivation:"];
  [ms appendFormat: @"%i", __preactivation];
  [ms appendString: @",viewedPromotions:"];
  [ms appendFormat: @"%@", __viewedPromotions];
  [ms appendString: @",incomingEmailAddress:"];
  [ms appendFormat: @"\"%@\"", __incomingEmailAddress];
  [ms appendString: @",recentMailedAddresses:"];
  [ms appendFormat: @"%@", __recentMailedAddresses];
  [ms appendString: @",comments:"];
  [ms appendFormat: @"\"%@\"", __comments];
  [ms appendString: @",dateAgreedToTermsOfService:"];
  [ms appendFormat: @"%qi", __dateAgreedToTermsOfService];
  [ms appendString: @",maxReferrals:"];
  [ms appendFormat: @"%i", __maxReferrals];
  [ms appendString: @",referralCount:"];
  [ms appendFormat: @"%i", __referralCount];
  [ms appendString: @",refererCode:"];
  [ms appendFormat: @"\"%@\"", __refererCode];
  [ms appendString: @",sentEmailDate:"];
  [ms appendFormat: @"%qi", __sentEmailDate];
  [ms appendString: @",sentEmailCount:"];
  [ms appendFormat: @"%i", __sentEmailCount];
  [ms appendString: @",dailyEmailLimit:"];
  [ms appendFormat: @"%i", __dailyEmailLimit];
  [ms appendString: @",emailOptOutDate:"];
  [ms appendFormat: @"%qi", __emailOptOutDate];
  [ms appendString: @",partnerEmailOptInDate:"];
  [ms appendFormat: @"%qi", __partnerEmailOptInDate];
  [ms appendString: @",preferredLanguage:"];
  [ms appendFormat: @"\"%@\"", __preferredLanguage];
  [ms appendString: @",preferredCountry:"];
  [ms appendFormat: @"\"%@\"", __preferredCountry];
  [ms appendString: @",clipFullPage:"];
  [ms appendFormat: @"%i", __clipFullPage];
  [ms appendString: @",twitterUserName:"];
  [ms appendFormat: @"\"%@\"", __twitterUserName];
  [ms appendString: @",twitterId:"];
  [ms appendFormat: @"\"%@\"", __twitterId];
  [ms appendString: @",groupName:"];
  [ms appendFormat: @"\"%@\"", __groupName];
  [ms appendString: @",recognitionLanguage:"];
  [ms appendFormat: @"\"%@\"", __recognitionLanguage];
  [ms appendString: @",customerProfileId:"];
  [ms appendFormat: @"%qi", __customerProfileId];
  [ms appendString: @",referralProof:"];
  [ms appendFormat: @"\"%@\"", __referralProof];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMAccounting

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic uploadLimit;
@dynamic uploadLimitEnd;
@dynamic uploadLimitNextMonth;
@dynamic premiumServiceStatus;
@dynamic premiumOrderNumber;
@dynamic premiumCommerceService;
@dynamic premiumServiceStart;
@dynamic premiumServiceSKU;
@dynamic lastSuccessfulCharge;
@dynamic lastFailedCharge;
@dynamic lastFailedChargeReason;
@dynamic nextPaymentDue;
@dynamic premiumLockUntil;
@dynamic updated;
@dynamic premiumSubscriptionNumber;
@dynamic lastRequestedCharge;
#endif

- (id) initWithUploadLimit: (int64_t) uploadLimit uploadLimitEnd: (EDAMTimestamp) uploadLimitEnd uploadLimitNextMonth: (int64_t) uploadLimitNextMonth premiumServiceStatus: (int) premiumServiceStatus premiumOrderNumber: (NSString *) premiumOrderNumber premiumCommerceService: (NSString *) premiumCommerceService premiumServiceStart: (EDAMTimestamp) premiumServiceStart premiumServiceSKU: (NSString *) premiumServiceSKU lastSuccessfulCharge: (EDAMTimestamp) lastSuccessfulCharge lastFailedCharge: (EDAMTimestamp) lastFailedCharge lastFailedChargeReason: (NSString *) lastFailedChargeReason nextPaymentDue: (EDAMTimestamp) nextPaymentDue premiumLockUntil: (EDAMTimestamp) premiumLockUntil updated: (EDAMTimestamp) updated premiumSubscriptionNumber: (NSString *) premiumSubscriptionNumber lastRequestedCharge: (EDAMTimestamp) lastRequestedCharge
{
  self = [super init];
  __uploadLimit = uploadLimit;
  __uploadLimit_isset = YES;
  __uploadLimitEnd = uploadLimitEnd;
  __uploadLimitEnd_isset = YES;
  __uploadLimitNextMonth = uploadLimitNextMonth;
  __uploadLimitNextMonth_isset = YES;
  __premiumServiceStatus = premiumServiceStatus;
  __premiumServiceStatus_isset = YES;
  __premiumOrderNumber = [premiumOrderNumber retain];
  __premiumOrderNumber_isset = YES;
  __premiumCommerceService = [premiumCommerceService retain];
  __premiumCommerceService_isset = YES;
  __premiumServiceStart = premiumServiceStart;
  __premiumServiceStart_isset = YES;
  __premiumServiceSKU = [premiumServiceSKU retain];
  __premiumServiceSKU_isset = YES;
  __lastSuccessfulCharge = lastSuccessfulCharge;
  __lastSuccessfulCharge_isset = YES;
  __lastFailedCharge = lastFailedCharge;
  __lastFailedCharge_isset = YES;
  __lastFailedChargeReason = [lastFailedChargeReason retain];
  __lastFailedChargeReason_isset = YES;
  __nextPaymentDue = nextPaymentDue;
  __nextPaymentDue_isset = YES;
  __premiumLockUntil = premiumLockUntil;
  __premiumLockUntil_isset = YES;
  __updated = updated;
  __updated_isset = YES;
  __premiumSubscriptionNumber = [premiumSubscriptionNumber retain];
  __premiumSubscriptionNumber_isset = YES;
  __lastRequestedCharge = lastRequestedCharge;
  __lastRequestedCharge_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"uploadLimit"])
  {
    __uploadLimit = [decoder decodeInt64ForKey: @"uploadLimit"];
    __uploadLimit_isset = YES;
  }
  if ([decoder containsValueForKey: @"uploadLimitEnd"])
  {
    __uploadLimitEnd = [decoder decodeInt64ForKey: @"uploadLimitEnd"];
    __uploadLimitEnd_isset = YES;
  }
  if ([decoder containsValueForKey: @"uploadLimitNextMonth"])
  {
    __uploadLimitNextMonth = [decoder decodeInt64ForKey: @"uploadLimitNextMonth"];
    __uploadLimitNextMonth_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumServiceStatus"])
  {
    __premiumServiceStatus = [decoder decodeIntForKey: @"premiumServiceStatus"];
    __premiumServiceStatus_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumOrderNumber"])
  {
    __premiumOrderNumber = [[decoder decodeObjectForKey: @"premiumOrderNumber"] retain];
    __premiumOrderNumber_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumCommerceService"])
  {
    __premiumCommerceService = [[decoder decodeObjectForKey: @"premiumCommerceService"] retain];
    __premiumCommerceService_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumServiceStart"])
  {
    __premiumServiceStart = [decoder decodeInt64ForKey: @"premiumServiceStart"];
    __premiumServiceStart_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumServiceSKU"])
  {
    __premiumServiceSKU = [[decoder decodeObjectForKey: @"premiumServiceSKU"] retain];
    __premiumServiceSKU_isset = YES;
  }
  if ([decoder containsValueForKey: @"lastSuccessfulCharge"])
  {
    __lastSuccessfulCharge = [decoder decodeInt64ForKey: @"lastSuccessfulCharge"];
    __lastSuccessfulCharge_isset = YES;
  }
  if ([decoder containsValueForKey: @"lastFailedCharge"])
  {
    __lastFailedCharge = [decoder decodeInt64ForKey: @"lastFailedCharge"];
    __lastFailedCharge_isset = YES;
  }
  if ([decoder containsValueForKey: @"lastFailedChargeReason"])
  {
    __lastFailedChargeReason = [[decoder decodeObjectForKey: @"lastFailedChargeReason"] retain];
    __lastFailedChargeReason_isset = YES;
  }
  if ([decoder containsValueForKey: @"nextPaymentDue"])
  {
    __nextPaymentDue = [decoder decodeInt64ForKey: @"nextPaymentDue"];
    __nextPaymentDue_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumLockUntil"])
  {
    __premiumLockUntil = [decoder decodeInt64ForKey: @"premiumLockUntil"];
    __premiumLockUntil_isset = YES;
  }
  if ([decoder containsValueForKey: @"updated"])
  {
    __updated = [decoder decodeInt64ForKey: @"updated"];
    __updated_isset = YES;
  }
  if ([decoder containsValueForKey: @"premiumSubscriptionNumber"])
  {
    __premiumSubscriptionNumber = [[decoder decodeObjectForKey: @"premiumSubscriptionNumber"] retain];
    __premiumSubscriptionNumber_isset = YES;
  }
  if ([decoder containsValueForKey: @"lastRequestedCharge"])
  {
    __lastRequestedCharge = [decoder decodeInt64ForKey: @"lastRequestedCharge"];
    __lastRequestedCharge_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__uploadLimit_isset)
  {
    [encoder encodeInt64: __uploadLimit forKey: @"uploadLimit"];
  }
  if (__uploadLimitEnd_isset)
  {
    [encoder encodeInt64: __uploadLimitEnd forKey: @"uploadLimitEnd"];
  }
  if (__uploadLimitNextMonth_isset)
  {
    [encoder encodeInt64: __uploadLimitNextMonth forKey: @"uploadLimitNextMonth"];
  }
  if (__premiumServiceStatus_isset)
  {
    [encoder encodeInt: __premiumServiceStatus forKey: @"premiumServiceStatus"];
  }
  if (__premiumOrderNumber_isset)
  {
    [encoder encodeObject: __premiumOrderNumber forKey: @"premiumOrderNumber"];
  }
  if (__premiumCommerceService_isset)
  {
    [encoder encodeObject: __premiumCommerceService forKey: @"premiumCommerceService"];
  }
  if (__premiumServiceStart_isset)
  {
    [encoder encodeInt64: __premiumServiceStart forKey: @"premiumServiceStart"];
  }
  if (__premiumServiceSKU_isset)
  {
    [encoder encodeObject: __premiumServiceSKU forKey: @"premiumServiceSKU"];
  }
  if (__lastSuccessfulCharge_isset)
  {
    [encoder encodeInt64: __lastSuccessfulCharge forKey: @"lastSuccessfulCharge"];
  }
  if (__lastFailedCharge_isset)
  {
    [encoder encodeInt64: __lastFailedCharge forKey: @"lastFailedCharge"];
  }
  if (__lastFailedChargeReason_isset)
  {
    [encoder encodeObject: __lastFailedChargeReason forKey: @"lastFailedChargeReason"];
  }
  if (__nextPaymentDue_isset)
  {
    [encoder encodeInt64: __nextPaymentDue forKey: @"nextPaymentDue"];
  }
  if (__premiumLockUntil_isset)
  {
    [encoder encodeInt64: __premiumLockUntil forKey: @"premiumLockUntil"];
  }
  if (__updated_isset)
  {
    [encoder encodeInt64: __updated forKey: @"updated"];
  }
  if (__premiumSubscriptionNumber_isset)
  {
    [encoder encodeObject: __premiumSubscriptionNumber forKey: @"premiumSubscriptionNumber"];
  }
  if (__lastRequestedCharge_isset)
  {
    [encoder encodeInt64: __lastRequestedCharge forKey: @"lastRequestedCharge"];
  }
}

- (void) dealloc
{
  [__premiumOrderNumber release];
  [__premiumCommerceService release];
  [__premiumServiceSKU release];
  [__lastFailedChargeReason release];
  [__premiumSubscriptionNumber release];
  [super dealloc];
}

- (int64_t) uploadLimit {
  return __uploadLimit;
}

- (void) setUploadLimit: (int64_t) uploadLimit {
  __uploadLimit = uploadLimit;
  __uploadLimit_isset = YES;
}

- (BOOL) uploadLimitIsSet {
  return __uploadLimit_isset;
}

- (void) unsetUploadLimit {
  __uploadLimit_isset = NO;
}

- (int64_t) uploadLimitEnd {
  return __uploadLimitEnd;
}

- (void) setUploadLimitEnd: (int64_t) uploadLimitEnd {
  __uploadLimitEnd = uploadLimitEnd;
  __uploadLimitEnd_isset = YES;
}

- (BOOL) uploadLimitEndIsSet {
  return __uploadLimitEnd_isset;
}

- (void) unsetUploadLimitEnd {
  __uploadLimitEnd_isset = NO;
}

- (int64_t) uploadLimitNextMonth {
  return __uploadLimitNextMonth;
}

- (void) setUploadLimitNextMonth: (int64_t) uploadLimitNextMonth {
  __uploadLimitNextMonth = uploadLimitNextMonth;
  __uploadLimitNextMonth_isset = YES;
}

- (BOOL) uploadLimitNextMonthIsSet {
  return __uploadLimitNextMonth_isset;
}

- (void) unsetUploadLimitNextMonth {
  __uploadLimitNextMonth_isset = NO;
}

- (int) premiumServiceStatus {
  return __premiumServiceStatus;
}

- (void) setPremiumServiceStatus: (int) premiumServiceStatus {
  __premiumServiceStatus = premiumServiceStatus;
  __premiumServiceStatus_isset = YES;
}

- (BOOL) premiumServiceStatusIsSet {
  return __premiumServiceStatus_isset;
}

- (void) unsetPremiumServiceStatus {
  __premiumServiceStatus_isset = NO;
}

- (NSString *) premiumOrderNumber {
  return [[__premiumOrderNumber retain] autorelease];
}

- (void) setPremiumOrderNumber: (NSString *) premiumOrderNumber {
  [premiumOrderNumber retain];
  [__premiumOrderNumber release];
  __premiumOrderNumber = premiumOrderNumber;
  __premiumOrderNumber_isset = YES;
}

- (BOOL) premiumOrderNumberIsSet {
  return __premiumOrderNumber_isset;
}

- (void) unsetPremiumOrderNumber {
  [__premiumOrderNumber release];
  __premiumOrderNumber = nil;
  __premiumOrderNumber_isset = NO;
}

- (NSString *) premiumCommerceService {
  return [[__premiumCommerceService retain] autorelease];
}

- (void) setPremiumCommerceService: (NSString *) premiumCommerceService {
  [premiumCommerceService retain];
  [__premiumCommerceService release];
  __premiumCommerceService = premiumCommerceService;
  __premiumCommerceService_isset = YES;
}

- (BOOL) premiumCommerceServiceIsSet {
  return __premiumCommerceService_isset;
}

- (void) unsetPremiumCommerceService {
  [__premiumCommerceService release];
  __premiumCommerceService = nil;
  __premiumCommerceService_isset = NO;
}

- (int64_t) premiumServiceStart {
  return __premiumServiceStart;
}

- (void) setPremiumServiceStart: (int64_t) premiumServiceStart {
  __premiumServiceStart = premiumServiceStart;
  __premiumServiceStart_isset = YES;
}

- (BOOL) premiumServiceStartIsSet {
  return __premiumServiceStart_isset;
}

- (void) unsetPremiumServiceStart {
  __premiumServiceStart_isset = NO;
}

- (NSString *) premiumServiceSKU {
  return [[__premiumServiceSKU retain] autorelease];
}

- (void) setPremiumServiceSKU: (NSString *) premiumServiceSKU {
  [premiumServiceSKU retain];
  [__premiumServiceSKU release];
  __premiumServiceSKU = premiumServiceSKU;
  __premiumServiceSKU_isset = YES;
}

- (BOOL) premiumServiceSKUIsSet {
  return __premiumServiceSKU_isset;
}

- (void) unsetPremiumServiceSKU {
  [__premiumServiceSKU release];
  __premiumServiceSKU = nil;
  __premiumServiceSKU_isset = NO;
}

- (int64_t) lastSuccessfulCharge {
  return __lastSuccessfulCharge;
}

- (void) setLastSuccessfulCharge: (int64_t) lastSuccessfulCharge {
  __lastSuccessfulCharge = lastSuccessfulCharge;
  __lastSuccessfulCharge_isset = YES;
}

- (BOOL) lastSuccessfulChargeIsSet {
  return __lastSuccessfulCharge_isset;
}

- (void) unsetLastSuccessfulCharge {
  __lastSuccessfulCharge_isset = NO;
}

- (int64_t) lastFailedCharge {
  return __lastFailedCharge;
}

- (void) setLastFailedCharge: (int64_t) lastFailedCharge {
  __lastFailedCharge = lastFailedCharge;
  __lastFailedCharge_isset = YES;
}

- (BOOL) lastFailedChargeIsSet {
  return __lastFailedCharge_isset;
}

- (void) unsetLastFailedCharge {
  __lastFailedCharge_isset = NO;
}

- (NSString *) lastFailedChargeReason {
  return [[__lastFailedChargeReason retain] autorelease];
}

- (void) setLastFailedChargeReason: (NSString *) lastFailedChargeReason {
  [lastFailedChargeReason retain];
  [__lastFailedChargeReason release];
  __lastFailedChargeReason = lastFailedChargeReason;
  __lastFailedChargeReason_isset = YES;
}

- (BOOL) lastFailedChargeReasonIsSet {
  return __lastFailedChargeReason_isset;
}

- (void) unsetLastFailedChargeReason {
  [__lastFailedChargeReason release];
  __lastFailedChargeReason = nil;
  __lastFailedChargeReason_isset = NO;
}

- (int64_t) nextPaymentDue {
  return __nextPaymentDue;
}

- (void) setNextPaymentDue: (int64_t) nextPaymentDue {
  __nextPaymentDue = nextPaymentDue;
  __nextPaymentDue_isset = YES;
}

- (BOOL) nextPaymentDueIsSet {
  return __nextPaymentDue_isset;
}

- (void) unsetNextPaymentDue {
  __nextPaymentDue_isset = NO;
}

- (int64_t) premiumLockUntil {
  return __premiumLockUntil;
}

- (void) setPremiumLockUntil: (int64_t) premiumLockUntil {
  __premiumLockUntil = premiumLockUntil;
  __premiumLockUntil_isset = YES;
}

- (BOOL) premiumLockUntilIsSet {
  return __premiumLockUntil_isset;
}

- (void) unsetPremiumLockUntil {
  __premiumLockUntil_isset = NO;
}

- (int64_t) updated {
  return __updated;
}

- (void) setUpdated: (int64_t) updated {
  __updated = updated;
  __updated_isset = YES;
}

- (BOOL) updatedIsSet {
  return __updated_isset;
}

- (void) unsetUpdated {
  __updated_isset = NO;
}

- (NSString *) premiumSubscriptionNumber {
  return [[__premiumSubscriptionNumber retain] autorelease];
}

- (void) setPremiumSubscriptionNumber: (NSString *) premiumSubscriptionNumber {
  [premiumSubscriptionNumber retain];
  [__premiumSubscriptionNumber release];
  __premiumSubscriptionNumber = premiumSubscriptionNumber;
  __premiumSubscriptionNumber_isset = YES;
}

- (BOOL) premiumSubscriptionNumberIsSet {
  return __premiumSubscriptionNumber_isset;
}

- (void) unsetPremiumSubscriptionNumber {
  [__premiumSubscriptionNumber release];
  __premiumSubscriptionNumber = nil;
  __premiumSubscriptionNumber_isset = NO;
}

- (int64_t) lastRequestedCharge {
  return __lastRequestedCharge;
}

- (void) setLastRequestedCharge: (int64_t) lastRequestedCharge {
  __lastRequestedCharge = lastRequestedCharge;
  __lastRequestedCharge_isset = YES;
}

- (BOOL) lastRequestedChargeIsSet {
  return __lastRequestedCharge_isset;
}

- (void) unsetLastRequestedCharge {
  __lastRequestedCharge_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUploadLimit: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUploadLimitEnd: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUploadLimitNextMonth: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_I32) {
          int fieldValue = [inProtocol readI32];
          [self setPremiumServiceStatus: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPremiumOrderNumber: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPremiumCommerceService: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setPremiumServiceStart: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPremiumServiceSKU: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setLastSuccessfulCharge: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setLastFailedCharge: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setLastFailedChargeReason: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setNextPaymentDue: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setPremiumLockUntil: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 14:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUpdated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 16:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPremiumSubscriptionNumber: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 17:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setLastRequestedCharge: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Accounting"];
  if (__uploadLimit_isset) {
    [outProtocol writeFieldBeginWithName: @"uploadLimit" type: TType_I64 fieldID: 1];
    [outProtocol writeI64: __uploadLimit];
    [outProtocol writeFieldEnd];
  }
  if (__uploadLimitEnd_isset) {
    [outProtocol writeFieldBeginWithName: @"uploadLimitEnd" type: TType_I64 fieldID: 2];
    [outProtocol writeI64: __uploadLimitEnd];
    [outProtocol writeFieldEnd];
  }
  if (__uploadLimitNextMonth_isset) {
    [outProtocol writeFieldBeginWithName: @"uploadLimitNextMonth" type: TType_I64 fieldID: 3];
    [outProtocol writeI64: __uploadLimitNextMonth];
    [outProtocol writeFieldEnd];
  }
  if (__premiumServiceStatus_isset) {
    [outProtocol writeFieldBeginWithName: @"premiumServiceStatus" type: TType_I32 fieldID: 4];
    [outProtocol writeI32: __premiumServiceStatus];
    [outProtocol writeFieldEnd];
  }
  if (__premiumOrderNumber_isset) {
    if (__premiumOrderNumber != nil) {
      [outProtocol writeFieldBeginWithName: @"premiumOrderNumber" type: TType_STRING fieldID: 5];
      [outProtocol writeString: __premiumOrderNumber];
      [outProtocol writeFieldEnd];
    }
  }
  if (__premiumCommerceService_isset) {
    if (__premiumCommerceService != nil) {
      [outProtocol writeFieldBeginWithName: @"premiumCommerceService" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __premiumCommerceService];
      [outProtocol writeFieldEnd];
    }
  }
  if (__premiumServiceStart_isset) {
    [outProtocol writeFieldBeginWithName: @"premiumServiceStart" type: TType_I64 fieldID: 7];
    [outProtocol writeI64: __premiumServiceStart];
    [outProtocol writeFieldEnd];
  }
  if (__premiumServiceSKU_isset) {
    if (__premiumServiceSKU != nil) {
      [outProtocol writeFieldBeginWithName: @"premiumServiceSKU" type: TType_STRING fieldID: 8];
      [outProtocol writeString: __premiumServiceSKU];
      [outProtocol writeFieldEnd];
    }
  }
  if (__lastSuccessfulCharge_isset) {
    [outProtocol writeFieldBeginWithName: @"lastSuccessfulCharge" type: TType_I64 fieldID: 9];
    [outProtocol writeI64: __lastSuccessfulCharge];
    [outProtocol writeFieldEnd];
  }
  if (__lastFailedCharge_isset) {
    [outProtocol writeFieldBeginWithName: @"lastFailedCharge" type: TType_I64 fieldID: 10];
    [outProtocol writeI64: __lastFailedCharge];
    [outProtocol writeFieldEnd];
  }
  if (__lastFailedChargeReason_isset) {
    if (__lastFailedChargeReason != nil) {
      [outProtocol writeFieldBeginWithName: @"lastFailedChargeReason" type: TType_STRING fieldID: 11];
      [outProtocol writeString: __lastFailedChargeReason];
      [outProtocol writeFieldEnd];
    }
  }
  if (__nextPaymentDue_isset) {
    [outProtocol writeFieldBeginWithName: @"nextPaymentDue" type: TType_I64 fieldID: 12];
    [outProtocol writeI64: __nextPaymentDue];
    [outProtocol writeFieldEnd];
  }
  if (__premiumLockUntil_isset) {
    [outProtocol writeFieldBeginWithName: @"premiumLockUntil" type: TType_I64 fieldID: 13];
    [outProtocol writeI64: __premiumLockUntil];
    [outProtocol writeFieldEnd];
  }
  if (__updated_isset) {
    [outProtocol writeFieldBeginWithName: @"updated" type: TType_I64 fieldID: 14];
    [outProtocol writeI64: __updated];
    [outProtocol writeFieldEnd];
  }
  if (__premiumSubscriptionNumber_isset) {
    if (__premiumSubscriptionNumber != nil) {
      [outProtocol writeFieldBeginWithName: @"premiumSubscriptionNumber" type: TType_STRING fieldID: 16];
      [outProtocol writeString: __premiumSubscriptionNumber];
      [outProtocol writeFieldEnd];
    }
  }
  if (__lastRequestedCharge_isset) {
    [outProtocol writeFieldBeginWithName: @"lastRequestedCharge" type: TType_I64 fieldID: 17];
    [outProtocol writeI64: __lastRequestedCharge];
    [outProtocol writeFieldEnd];
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Accounting("];
  [ms appendString: @"uploadLimit:"];
  [ms appendFormat: @"%qi", __uploadLimit];
  [ms appendString: @",uploadLimitEnd:"];
  [ms appendFormat: @"%qi", __uploadLimitEnd];
  [ms appendString: @",uploadLimitNextMonth:"];
  [ms appendFormat: @"%qi", __uploadLimitNextMonth];
  [ms appendString: @",premiumServiceStatus:"];
  [ms appendFormat: @"%i", __premiumServiceStatus];
  [ms appendString: @",premiumOrderNumber:"];
  [ms appendFormat: @"\"%@\"", __premiumOrderNumber];
  [ms appendString: @",premiumCommerceService:"];
  [ms appendFormat: @"\"%@\"", __premiumCommerceService];
  [ms appendString: @",premiumServiceStart:"];
  [ms appendFormat: @"%qi", __premiumServiceStart];
  [ms appendString: @",premiumServiceSKU:"];
  [ms appendFormat: @"\"%@\"", __premiumServiceSKU];
  [ms appendString: @",lastSuccessfulCharge:"];
  [ms appendFormat: @"%qi", __lastSuccessfulCharge];
  [ms appendString: @",lastFailedCharge:"];
  [ms appendFormat: @"%qi", __lastFailedCharge];
  [ms appendString: @",lastFailedChargeReason:"];
  [ms appendFormat: @"\"%@\"", __lastFailedChargeReason];
  [ms appendString: @",nextPaymentDue:"];
  [ms appendFormat: @"%qi", __nextPaymentDue];
  [ms appendString: @",premiumLockUntil:"];
  [ms appendFormat: @"%qi", __premiumLockUntil];
  [ms appendString: @",updated:"];
  [ms appendFormat: @"%qi", __updated];
  [ms appendString: @",premiumSubscriptionNumber:"];
  [ms appendFormat: @"\"%@\"", __premiumSubscriptionNumber];
  [ms appendString: @",lastRequestedCharge:"];
  [ms appendFormat: @"%qi", __lastRequestedCharge];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMUser

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic id;
@dynamic username;
@dynamic email;
@dynamic name;
@dynamic timezone;
@dynamic privilege;
@dynamic created;
@dynamic updated;
@dynamic deleted;
@dynamic active;
@dynamic shardId;
@dynamic attributes;
@dynamic accounting;
#endif

- (id) initWithId: (EDAMUserID) id username: (NSString *) username email: (NSString *) email name: (NSString *) name timezone: (NSString *) timezone privilege: (int) privilege created: (EDAMTimestamp) created updated: (EDAMTimestamp) updated deleted: (EDAMTimestamp) deleted active: (BOOL) active shardId: (NSString *) shardId attributes: (EDAMUserAttributes *) attributes accounting: (EDAMAccounting *) accounting
{
  self = [super init];
  __id = id;
  __id_isset = YES;
  __username = [username retain];
  __username_isset = YES;
  __email = [email retain];
  __email_isset = YES;
  __name = [name retain];
  __name_isset = YES;
  __timezone = [timezone retain];
  __timezone_isset = YES;
  __privilege = privilege;
  __privilege_isset = YES;
  __created = created;
  __created_isset = YES;
  __updated = updated;
  __updated_isset = YES;
  __deleted = deleted;
  __deleted_isset = YES;
  __active = active;
  __active_isset = YES;
  __shardId = [shardId retain];
  __shardId_isset = YES;
  __attributes = [attributes retain];
  __attributes_isset = YES;
  __accounting = [accounting retain];
  __accounting_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"id"])
  {
    __id = [decoder decodeInt32ForKey: @"id"];
    __id_isset = YES;
  }
  if ([decoder containsValueForKey: @"username"])
  {
    __username = [[decoder decodeObjectForKey: @"username"] retain];
    __username_isset = YES;
  }
  if ([decoder containsValueForKey: @"email"])
  {
    __email = [[decoder decodeObjectForKey: @"email"] retain];
    __email_isset = YES;
  }
  if ([decoder containsValueForKey: @"name"])
  {
    __name = [[decoder decodeObjectForKey: @"name"] retain];
    __name_isset = YES;
  }
  if ([decoder containsValueForKey: @"timezone"])
  {
    __timezone = [[decoder decodeObjectForKey: @"timezone"] retain];
    __timezone_isset = YES;
  }
  if ([decoder containsValueForKey: @"privilege"])
  {
    __privilege = [decoder decodeIntForKey: @"privilege"];
    __privilege_isset = YES;
  }
  if ([decoder containsValueForKey: @"created"])
  {
    __created = [decoder decodeInt64ForKey: @"created"];
    __created_isset = YES;
  }
  if ([decoder containsValueForKey: @"updated"])
  {
    __updated = [decoder decodeInt64ForKey: @"updated"];
    __updated_isset = YES;
  }
  if ([decoder containsValueForKey: @"deleted"])
  {
    __deleted = [decoder decodeInt64ForKey: @"deleted"];
    __deleted_isset = YES;
  }
  if ([decoder containsValueForKey: @"active"])
  {
    __active = [decoder decodeBoolForKey: @"active"];
    __active_isset = YES;
  }
  if ([decoder containsValueForKey: @"shardId"])
  {
    __shardId = [[decoder decodeObjectForKey: @"shardId"] retain];
    __shardId_isset = YES;
  }
  if ([decoder containsValueForKey: @"attributes"])
  {
    __attributes = [[decoder decodeObjectForKey: @"attributes"] retain];
    __attributes_isset = YES;
  }
  if ([decoder containsValueForKey: @"accounting"])
  {
    __accounting = [[decoder decodeObjectForKey: @"accounting"] retain];
    __accounting_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__id_isset)
  {
    [encoder encodeInt32: __id forKey: @"id"];
  }
  if (__username_isset)
  {
    [encoder encodeObject: __username forKey: @"username"];
  }
  if (__email_isset)
  {
    [encoder encodeObject: __email forKey: @"email"];
  }
  if (__name_isset)
  {
    [encoder encodeObject: __name forKey: @"name"];
  }
  if (__timezone_isset)
  {
    [encoder encodeObject: __timezone forKey: @"timezone"];
  }
  if (__privilege_isset)
  {
    [encoder encodeInt: __privilege forKey: @"privilege"];
  }
  if (__created_isset)
  {
    [encoder encodeInt64: __created forKey: @"created"];
  }
  if (__updated_isset)
  {
    [encoder encodeInt64: __updated forKey: @"updated"];
  }
  if (__deleted_isset)
  {
    [encoder encodeInt64: __deleted forKey: @"deleted"];
  }
  if (__active_isset)
  {
    [encoder encodeBool: __active forKey: @"active"];
  }
  if (__shardId_isset)
  {
    [encoder encodeObject: __shardId forKey: @"shardId"];
  }
  if (__attributes_isset)
  {
    [encoder encodeObject: __attributes forKey: @"attributes"];
  }
  if (__accounting_isset)
  {
    [encoder encodeObject: __accounting forKey: @"accounting"];
  }
}

- (void) dealloc
{
  [__username release];
  [__email release];
  [__name release];
  [__timezone release];
  [__shardId release];
  [__attributes release];
  [__accounting release];
  [super dealloc];
}

- (int32_t) id {
  return __id;
}

- (void) setId: (int32_t) id {
  __id = id;
  __id_isset = YES;
}

- (BOOL) idIsSet {
  return __id_isset;
}

- (void) unsetId {
  __id_isset = NO;
}

- (NSString *) username {
  return [[__username retain] autorelease];
}

- (void) setUsername: (NSString *) username {
  [username retain];
  [__username release];
  __username = username;
  __username_isset = YES;
}

- (BOOL) usernameIsSet {
  return __username_isset;
}

- (void) unsetUsername {
  [__username release];
  __username = nil;
  __username_isset = NO;
}

- (NSString *) email {
  return [[__email retain] autorelease];
}

- (void) setEmail: (NSString *) email {
  [email retain];
  [__email release];
  __email = email;
  __email_isset = YES;
}

- (BOOL) emailIsSet {
  return __email_isset;
}

- (void) unsetEmail {
  [__email release];
  __email = nil;
  __email_isset = NO;
}

- (NSString *) name {
  return [[__name retain] autorelease];
}

- (void) setName: (NSString *) name {
  [name retain];
  [__name release];
  __name = name;
  __name_isset = YES;
}

- (BOOL) nameIsSet {
  return __name_isset;
}

- (void) unsetName {
  [__name release];
  __name = nil;
  __name_isset = NO;
}

- (NSString *) timezone {
  return [[__timezone retain] autorelease];
}

- (void) setTimezone: (NSString *) timezone {
  [timezone retain];
  [__timezone release];
  __timezone = timezone;
  __timezone_isset = YES;
}

- (BOOL) timezoneIsSet {
  return __timezone_isset;
}

- (void) unsetTimezone {
  [__timezone release];
  __timezone = nil;
  __timezone_isset = NO;
}

- (int) privilege {
  return __privilege;
}

- (void) setPrivilege: (int) privilege {
  __privilege = privilege;
  __privilege_isset = YES;
}

- (BOOL) privilegeIsSet {
  return __privilege_isset;
}

- (void) unsetPrivilege {
  __privilege_isset = NO;
}

- (int64_t) created {
  return __created;
}

- (void) setCreated: (int64_t) created {
  __created = created;
  __created_isset = YES;
}

- (BOOL) createdIsSet {
  return __created_isset;
}

- (void) unsetCreated {
  __created_isset = NO;
}

- (int64_t) updated {
  return __updated;
}

- (void) setUpdated: (int64_t) updated {
  __updated = updated;
  __updated_isset = YES;
}

- (BOOL) updatedIsSet {
  return __updated_isset;
}

- (void) unsetUpdated {
  __updated_isset = NO;
}

- (int64_t) deleted {
  return __deleted;
}

- (void) setDeleted: (int64_t) deleted {
  __deleted = deleted;
  __deleted_isset = YES;
}

- (BOOL) deletedIsSet {
  return __deleted_isset;
}

- (void) unsetDeleted {
  __deleted_isset = NO;
}

- (BOOL) active {
  return __active;
}

- (void) setActive: (BOOL) active {
  __active = active;
  __active_isset = YES;
}

- (BOOL) activeIsSet {
  return __active_isset;
}

- (void) unsetActive {
  __active_isset = NO;
}

- (NSString *) shardId {
  return [[__shardId retain] autorelease];
}

- (void) setShardId: (NSString *) shardId {
  [shardId retain];
  [__shardId release];
  __shardId = shardId;
  __shardId_isset = YES;
}

- (BOOL) shardIdIsSet {
  return __shardId_isset;
}

- (void) unsetShardId {
  [__shardId release];
  __shardId = nil;
  __shardId_isset = NO;
}

- (EDAMUserAttributes *) attributes {
  return [[__attributes retain] autorelease];
}

- (void) setAttributes: (EDAMUserAttributes *) attributes {
  [attributes retain];
  [__attributes release];
  __attributes = attributes;
  __attributes_isset = YES;
}

- (BOOL) attributesIsSet {
  return __attributes_isset;
}

- (void) unsetAttributes {
  [__attributes release];
  __attributes = nil;
  __attributes_isset = NO;
}

- (EDAMAccounting *) accounting {
  return [[__accounting retain] autorelease];
}

- (void) setAccounting: (EDAMAccounting *) accounting {
  [accounting retain];
  [__accounting release];
  __accounting = accounting;
  __accounting_isset = YES;
}

- (BOOL) accountingIsSet {
  return __accounting_isset;
}

- (void) unsetAccounting {
  [__accounting release];
  __accounting = nil;
  __accounting_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setUsername: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setEmail: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setTimezone: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I32) {
          int fieldValue = [inProtocol readI32];
          [self setPrivilege: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setCreated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUpdated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setDeleted: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setActive: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 14:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setShardId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 15:
        if (fieldType == TType_STRUCT) {
          EDAMUserAttributes *fieldValue = [[EDAMUserAttributes alloc] init];
          [fieldValue read: inProtocol];
          [self setAttributes: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 16:
        if (fieldType == TType_STRUCT) {
          EDAMAccounting *fieldValue = [[EDAMAccounting alloc] init];
          [fieldValue read: inProtocol];
          [self setAccounting: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"User"];
  if (__id_isset) {
    [outProtocol writeFieldBeginWithName: @"id" type: TType_I32 fieldID: 1];
    [outProtocol writeI32: __id];
    [outProtocol writeFieldEnd];
  }
  if (__username_isset) {
    if (__username != nil) {
      [outProtocol writeFieldBeginWithName: @"username" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __username];
      [outProtocol writeFieldEnd];
    }
  }
  if (__email_isset) {
    if (__email != nil) {
      [outProtocol writeFieldBeginWithName: @"email" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __email];
      [outProtocol writeFieldEnd];
    }
  }
  if (__name_isset) {
    if (__name != nil) {
      [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __name];
      [outProtocol writeFieldEnd];
    }
  }
  if (__timezone_isset) {
    if (__timezone != nil) {
      [outProtocol writeFieldBeginWithName: @"timezone" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __timezone];
      [outProtocol writeFieldEnd];
    }
  }
  if (__privilege_isset) {
    [outProtocol writeFieldBeginWithName: @"privilege" type: TType_I32 fieldID: 7];
    [outProtocol writeI32: __privilege];
    [outProtocol writeFieldEnd];
  }
  if (__created_isset) {
    [outProtocol writeFieldBeginWithName: @"created" type: TType_I64 fieldID: 9];
    [outProtocol writeI64: __created];
    [outProtocol writeFieldEnd];
  }
  if (__updated_isset) {
    [outProtocol writeFieldBeginWithName: @"updated" type: TType_I64 fieldID: 10];
    [outProtocol writeI64: __updated];
    [outProtocol writeFieldEnd];
  }
  if (__deleted_isset) {
    [outProtocol writeFieldBeginWithName: @"deleted" type: TType_I64 fieldID: 11];
    [outProtocol writeI64: __deleted];
    [outProtocol writeFieldEnd];
  }
  if (__active_isset) {
    [outProtocol writeFieldBeginWithName: @"active" type: TType_BOOL fieldID: 13];
    [outProtocol writeBool: __active];
    [outProtocol writeFieldEnd];
  }
  if (__shardId_isset) {
    if (__shardId != nil) {
      [outProtocol writeFieldBeginWithName: @"shardId" type: TType_STRING fieldID: 14];
      [outProtocol writeString: __shardId];
      [outProtocol writeFieldEnd];
    }
  }
  if (__attributes_isset) {
    if (__attributes != nil) {
      [outProtocol writeFieldBeginWithName: @"attributes" type: TType_STRUCT fieldID: 15];
      [__attributes write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__accounting_isset) {
    if (__accounting != nil) {
      [outProtocol writeFieldBeginWithName: @"accounting" type: TType_STRUCT fieldID: 16];
      [__accounting write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"User("];
  [ms appendString: @"id:"];
  [ms appendFormat: @"%i", __id];
  [ms appendString: @",username:"];
  [ms appendFormat: @"\"%@\"", __username];
  [ms appendString: @",email:"];
  [ms appendFormat: @"\"%@\"", __email];
  [ms appendString: @",name:"];
  [ms appendFormat: @"\"%@\"", __name];
  [ms appendString: @",timezone:"];
  [ms appendFormat: @"\"%@\"", __timezone];
  [ms appendString: @",privilege:"];
  [ms appendFormat: @"%i", __privilege];
  [ms appendString: @",created:"];
  [ms appendFormat: @"%qi", __created];
  [ms appendString: @",updated:"];
  [ms appendFormat: @"%qi", __updated];
  [ms appendString: @",deleted:"];
  [ms appendFormat: @"%qi", __deleted];
  [ms appendString: @",active:"];
  [ms appendFormat: @"%i", __active];
  [ms appendString: @",shardId:"];
  [ms appendFormat: @"\"%@\"", __shardId];
  [ms appendString: @",attributes:"];
  [ms appendFormat: @"%@", __attributes];
  [ms appendString: @",accounting:"];
  [ms appendFormat: @"%@", __accounting];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMTag

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic guid;
@dynamic name;
@dynamic parentGuid;
@dynamic updateSequenceNum;
#endif

- (id) initWithGuid: (EDAMGuid) guid name: (NSString *) name parentGuid: (EDAMGuid) parentGuid updateSequenceNum: (int32_t) updateSequenceNum
{
  self = [super init];
  __guid = [guid retain];
  __guid_isset = YES;
  __name = [name retain];
  __name_isset = YES;
  __parentGuid = [parentGuid retain];
  __parentGuid_isset = YES;
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"guid"])
  {
    __guid = [[decoder decodeObjectForKey: @"guid"] retain];
    __guid_isset = YES;
  }
  if ([decoder containsValueForKey: @"name"])
  {
    __name = [[decoder decodeObjectForKey: @"name"] retain];
    __name_isset = YES;
  }
  if ([decoder containsValueForKey: @"parentGuid"])
  {
    __parentGuid = [[decoder decodeObjectForKey: @"parentGuid"] retain];
    __parentGuid_isset = YES;
  }
  if ([decoder containsValueForKey: @"updateSequenceNum"])
  {
    __updateSequenceNum = [decoder decodeInt32ForKey: @"updateSequenceNum"];
    __updateSequenceNum_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__guid_isset)
  {
    [encoder encodeObject: __guid forKey: @"guid"];
  }
  if (__name_isset)
  {
    [encoder encodeObject: __name forKey: @"name"];
  }
  if (__parentGuid_isset)
  {
    [encoder encodeObject: __parentGuid forKey: @"parentGuid"];
  }
  if (__updateSequenceNum_isset)
  {
    [encoder encodeInt32: __updateSequenceNum forKey: @"updateSequenceNum"];
  }
}

- (void) dealloc
{
  [__guid release];
  [__name release];
  [__parentGuid release];
  [super dealloc];
}

- (NSString *) guid {
  return [[__guid retain] autorelease];
}

- (void) setGuid: (NSString *) guid {
  [guid retain];
  [__guid release];
  __guid = guid;
  __guid_isset = YES;
}

- (BOOL) guidIsSet {
  return __guid_isset;
}

- (void) unsetGuid {
  [__guid release];
  __guid = nil;
  __guid_isset = NO;
}

- (NSString *) name {
  return [[__name retain] autorelease];
}

- (void) setName: (NSString *) name {
  [name retain];
  [__name release];
  __name = name;
  __name_isset = YES;
}

- (BOOL) nameIsSet {
  return __name_isset;
}

- (void) unsetName {
  [__name release];
  __name = nil;
  __name_isset = NO;
}

- (NSString *) parentGuid {
  return [[__parentGuid retain] autorelease];
}

- (void) setParentGuid: (NSString *) parentGuid {
  [parentGuid retain];
  [__parentGuid release];
  __parentGuid = parentGuid;
  __parentGuid_isset = YES;
}

- (BOOL) parentGuidIsSet {
  return __parentGuid_isset;
}

- (void) unsetParentGuid {
  [__parentGuid release];
  __parentGuid = nil;
  __parentGuid_isset = NO;
}

- (int32_t) updateSequenceNum {
  return __updateSequenceNum;
}

- (void) setUpdateSequenceNum: (int32_t) updateSequenceNum {
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
}

- (BOOL) updateSequenceNumIsSet {
  return __updateSequenceNum_isset;
}

- (void) unsetUpdateSequenceNum {
  __updateSequenceNum_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setParentGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUpdateSequenceNum: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Tag"];
  if (__guid_isset) {
    if (__guid != nil) {
      [outProtocol writeFieldBeginWithName: @"guid" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __guid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__name_isset) {
    if (__name != nil) {
      [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __name];
      [outProtocol writeFieldEnd];
    }
  }
  if (__parentGuid_isset) {
    if (__parentGuid != nil) {
      [outProtocol writeFieldBeginWithName: @"parentGuid" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __parentGuid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__updateSequenceNum_isset) {
    [outProtocol writeFieldBeginWithName: @"updateSequenceNum" type: TType_I32 fieldID: 4];
    [outProtocol writeI32: __updateSequenceNum];
    [outProtocol writeFieldEnd];
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Tag("];
  [ms appendString: @"guid:"];
  [ms appendFormat: @"\"%@\"", __guid];
  [ms appendString: @",name:"];
  [ms appendFormat: @"\"%@\"", __name];
  [ms appendString: @",parentGuid:"];
  [ms appendFormat: @"\"%@\"", __parentGuid];
  [ms appendString: @",updateSequenceNum:"];
  [ms appendFormat: @"%i", __updateSequenceNum];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMResourceAttributes

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic sourceURL;
@dynamic timestamp;
@dynamic latitude;
@dynamic longitude;
@dynamic altitude;
@dynamic cameraMake;
@dynamic cameraModel;
@dynamic clientWillIndex;
@dynamic recoType;
@dynamic fileName;
@dynamic attachment;
#endif

- (id) initWithSourceURL: (NSString *) sourceURL timestamp: (EDAMTimestamp) timestamp latitude: (double) latitude longitude: (double) longitude altitude: (double) altitude cameraMake: (NSString *) cameraMake cameraModel: (NSString *) cameraModel clientWillIndex: (BOOL) clientWillIndex recoType: (NSString *) recoType fileName: (NSString *) fileName attachment: (BOOL) attachment
{
  self = [super init];
  __sourceURL = [sourceURL retain];
  __sourceURL_isset = YES;
  __timestamp = timestamp;
  __timestamp_isset = YES;
  __latitude = latitude;
  __latitude_isset = YES;
  __longitude = longitude;
  __longitude_isset = YES;
  __altitude = altitude;
  __altitude_isset = YES;
  __cameraMake = [cameraMake retain];
  __cameraMake_isset = YES;
  __cameraModel = [cameraModel retain];
  __cameraModel_isset = YES;
  __clientWillIndex = clientWillIndex;
  __clientWillIndex_isset = YES;
  __recoType = [recoType retain];
  __recoType_isset = YES;
  __fileName = [fileName retain];
  __fileName_isset = YES;
  __attachment = attachment;
  __attachment_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"sourceURL"])
  {
    __sourceURL = [[decoder decodeObjectForKey: @"sourceURL"] retain];
    __sourceURL_isset = YES;
  }
  if ([decoder containsValueForKey: @"timestamp"])
  {
    __timestamp = [decoder decodeInt64ForKey: @"timestamp"];
    __timestamp_isset = YES;
  }
  if ([decoder containsValueForKey: @"latitude"])
  {
    __latitude = [decoder decodeDoubleForKey: @"latitude"];
    __latitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"longitude"])
  {
    __longitude = [decoder decodeDoubleForKey: @"longitude"];
    __longitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"altitude"])
  {
    __altitude = [decoder decodeDoubleForKey: @"altitude"];
    __altitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"cameraMake"])
  {
    __cameraMake = [[decoder decodeObjectForKey: @"cameraMake"] retain];
    __cameraMake_isset = YES;
  }
  if ([decoder containsValueForKey: @"cameraModel"])
  {
    __cameraModel = [[decoder decodeObjectForKey: @"cameraModel"] retain];
    __cameraModel_isset = YES;
  }
  if ([decoder containsValueForKey: @"clientWillIndex"])
  {
    __clientWillIndex = [decoder decodeBoolForKey: @"clientWillIndex"];
    __clientWillIndex_isset = YES;
  }
  if ([decoder containsValueForKey: @"recoType"])
  {
    __recoType = [[decoder decodeObjectForKey: @"recoType"] retain];
    __recoType_isset = YES;
  }
  if ([decoder containsValueForKey: @"fileName"])
  {
    __fileName = [[decoder decodeObjectForKey: @"fileName"] retain];
    __fileName_isset = YES;
  }
  if ([decoder containsValueForKey: @"attachment"])
  {
    __attachment = [decoder decodeBoolForKey: @"attachment"];
    __attachment_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__sourceURL_isset)
  {
    [encoder encodeObject: __sourceURL forKey: @"sourceURL"];
  }
  if (__timestamp_isset)
  {
    [encoder encodeInt64: __timestamp forKey: @"timestamp"];
  }
  if (__latitude_isset)
  {
    [encoder encodeDouble: __latitude forKey: @"latitude"];
  }
  if (__longitude_isset)
  {
    [encoder encodeDouble: __longitude forKey: @"longitude"];
  }
  if (__altitude_isset)
  {
    [encoder encodeDouble: __altitude forKey: @"altitude"];
  }
  if (__cameraMake_isset)
  {
    [encoder encodeObject: __cameraMake forKey: @"cameraMake"];
  }
  if (__cameraModel_isset)
  {
    [encoder encodeObject: __cameraModel forKey: @"cameraModel"];
  }
  if (__clientWillIndex_isset)
  {
    [encoder encodeBool: __clientWillIndex forKey: @"clientWillIndex"];
  }
  if (__recoType_isset)
  {
    [encoder encodeObject: __recoType forKey: @"recoType"];
  }
  if (__fileName_isset)
  {
    [encoder encodeObject: __fileName forKey: @"fileName"];
  }
  if (__attachment_isset)
  {
    [encoder encodeBool: __attachment forKey: @"attachment"];
  }
}

- (void) dealloc
{
  [__sourceURL release];
  [__cameraMake release];
  [__cameraModel release];
  [__recoType release];
  [__fileName release];
  [super dealloc];
}

- (NSString *) sourceURL {
  return [[__sourceURL retain] autorelease];
}

- (void) setSourceURL: (NSString *) sourceURL {
  [sourceURL retain];
  [__sourceURL release];
  __sourceURL = sourceURL;
  __sourceURL_isset = YES;
}

- (BOOL) sourceURLIsSet {
  return __sourceURL_isset;
}

- (void) unsetSourceURL {
  [__sourceURL release];
  __sourceURL = nil;
  __sourceURL_isset = NO;
}

- (int64_t) timestamp {
  return __timestamp;
}

- (void) setTimestamp: (int64_t) timestamp {
  __timestamp = timestamp;
  __timestamp_isset = YES;
}

- (BOOL) timestampIsSet {
  return __timestamp_isset;
}

- (void) unsetTimestamp {
  __timestamp_isset = NO;
}

- (double) latitude {
  return __latitude;
}

- (void) setLatitude: (double) latitude {
  __latitude = latitude;
  __latitude_isset = YES;
}

- (BOOL) latitudeIsSet {
  return __latitude_isset;
}

- (void) unsetLatitude {
  __latitude_isset = NO;
}

- (double) longitude {
  return __longitude;
}

- (void) setLongitude: (double) longitude {
  __longitude = longitude;
  __longitude_isset = YES;
}

- (BOOL) longitudeIsSet {
  return __longitude_isset;
}

- (void) unsetLongitude {
  __longitude_isset = NO;
}

- (double) altitude {
  return __altitude;
}

- (void) setAltitude: (double) altitude {
  __altitude = altitude;
  __altitude_isset = YES;
}

- (BOOL) altitudeIsSet {
  return __altitude_isset;
}

- (void) unsetAltitude {
  __altitude_isset = NO;
}

- (NSString *) cameraMake {
  return [[__cameraMake retain] autorelease];
}

- (void) setCameraMake: (NSString *) cameraMake {
  [cameraMake retain];
  [__cameraMake release];
  __cameraMake = cameraMake;
  __cameraMake_isset = YES;
}

- (BOOL) cameraMakeIsSet {
  return __cameraMake_isset;
}

- (void) unsetCameraMake {
  [__cameraMake release];
  __cameraMake = nil;
  __cameraMake_isset = NO;
}

- (NSString *) cameraModel {
  return [[__cameraModel retain] autorelease];
}

- (void) setCameraModel: (NSString *) cameraModel {
  [cameraModel retain];
  [__cameraModel release];
  __cameraModel = cameraModel;
  __cameraModel_isset = YES;
}

- (BOOL) cameraModelIsSet {
  return __cameraModel_isset;
}

- (void) unsetCameraModel {
  [__cameraModel release];
  __cameraModel = nil;
  __cameraModel_isset = NO;
}

- (BOOL) clientWillIndex {
  return __clientWillIndex;
}

- (void) setClientWillIndex: (BOOL) clientWillIndex {
  __clientWillIndex = clientWillIndex;
  __clientWillIndex_isset = YES;
}

- (BOOL) clientWillIndexIsSet {
  return __clientWillIndex_isset;
}

- (void) unsetClientWillIndex {
  __clientWillIndex_isset = NO;
}

- (NSString *) recoType {
  return [[__recoType retain] autorelease];
}

- (void) setRecoType: (NSString *) recoType {
  [recoType retain];
  [__recoType release];
  __recoType = recoType;
  __recoType_isset = YES;
}

- (BOOL) recoTypeIsSet {
  return __recoType_isset;
}

- (void) unsetRecoType {
  [__recoType release];
  __recoType = nil;
  __recoType_isset = NO;
}

- (NSString *) fileName {
  return [[__fileName retain] autorelease];
}

- (void) setFileName: (NSString *) fileName {
  [fileName retain];
  [__fileName release];
  __fileName = fileName;
  __fileName_isset = YES;
}

- (BOOL) fileNameIsSet {
  return __fileName_isset;
}

- (void) unsetFileName {
  [__fileName release];
  __fileName = nil;
  __fileName_isset = NO;
}

- (BOOL) attachment {
  return __attachment;
}

- (void) setAttachment: (BOOL) attachment {
  __attachment = attachment;
  __attachment_isset = YES;
}

- (BOOL) attachmentIsSet {
  return __attachment_isset;
}

- (void) unsetAttachment {
  __attachment_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setSourceURL: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setTimestamp: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setLatitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setLongitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setAltitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setCameraMake: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setCameraModel: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setClientWillIndex: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setRecoType: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setFileName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setAttachment: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"ResourceAttributes"];
  if (__sourceURL_isset) {
    if (__sourceURL != nil) {
      [outProtocol writeFieldBeginWithName: @"sourceURL" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __sourceURL];
      [outProtocol writeFieldEnd];
    }
  }
  if (__timestamp_isset) {
    [outProtocol writeFieldBeginWithName: @"timestamp" type: TType_I64 fieldID: 2];
    [outProtocol writeI64: __timestamp];
    [outProtocol writeFieldEnd];
  }
  if (__latitude_isset) {
    [outProtocol writeFieldBeginWithName: @"latitude" type: TType_DOUBLE fieldID: 3];
    [outProtocol writeDouble: __latitude];
    [outProtocol writeFieldEnd];
  }
  if (__longitude_isset) {
    [outProtocol writeFieldBeginWithName: @"longitude" type: TType_DOUBLE fieldID: 4];
    [outProtocol writeDouble: __longitude];
    [outProtocol writeFieldEnd];
  }
  if (__altitude_isset) {
    [outProtocol writeFieldBeginWithName: @"altitude" type: TType_DOUBLE fieldID: 5];
    [outProtocol writeDouble: __altitude];
    [outProtocol writeFieldEnd];
  }
  if (__cameraMake_isset) {
    if (__cameraMake != nil) {
      [outProtocol writeFieldBeginWithName: @"cameraMake" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __cameraMake];
      [outProtocol writeFieldEnd];
    }
  }
  if (__cameraModel_isset) {
    if (__cameraModel != nil) {
      [outProtocol writeFieldBeginWithName: @"cameraModel" type: TType_STRING fieldID: 7];
      [outProtocol writeString: __cameraModel];
      [outProtocol writeFieldEnd];
    }
  }
  if (__clientWillIndex_isset) {
    [outProtocol writeFieldBeginWithName: @"clientWillIndex" type: TType_BOOL fieldID: 8];
    [outProtocol writeBool: __clientWillIndex];
    [outProtocol writeFieldEnd];
  }
  if (__recoType_isset) {
    if (__recoType != nil) {
      [outProtocol writeFieldBeginWithName: @"recoType" type: TType_STRING fieldID: 9];
      [outProtocol writeString: __recoType];
      [outProtocol writeFieldEnd];
    }
  }
  if (__fileName_isset) {
    if (__fileName != nil) {
      [outProtocol writeFieldBeginWithName: @"fileName" type: TType_STRING fieldID: 10];
      [outProtocol writeString: __fileName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__attachment_isset) {
    [outProtocol writeFieldBeginWithName: @"attachment" type: TType_BOOL fieldID: 11];
    [outProtocol writeBool: __attachment];
    [outProtocol writeFieldEnd];
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"ResourceAttributes("];
  [ms appendString: @"sourceURL:"];
  [ms appendFormat: @"\"%@\"", __sourceURL];
  [ms appendString: @",timestamp:"];
  [ms appendFormat: @"%qi", __timestamp];
  [ms appendString: @",latitude:"];
  [ms appendFormat: @"%f", __latitude];
  [ms appendString: @",longitude:"];
  [ms appendFormat: @"%f", __longitude];
  [ms appendString: @",altitude:"];
  [ms appendFormat: @"%f", __altitude];
  [ms appendString: @",cameraMake:"];
  [ms appendFormat: @"\"%@\"", __cameraMake];
  [ms appendString: @",cameraModel:"];
  [ms appendFormat: @"\"%@\"", __cameraModel];
  [ms appendString: @",clientWillIndex:"];
  [ms appendFormat: @"%i", __clientWillIndex];
  [ms appendString: @",recoType:"];
  [ms appendFormat: @"\"%@\"", __recoType];
  [ms appendString: @",fileName:"];
  [ms appendFormat: @"\"%@\"", __fileName];
  [ms appendString: @",attachment:"];
  [ms appendFormat: @"%i", __attachment];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMResource

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic guid;
@dynamic noteGuid;
@dynamic data;
@dynamic mime;
@dynamic width;
@dynamic height;
@dynamic duration;
@dynamic active;
@dynamic recognition;
@dynamic attributes;
@dynamic updateSequenceNum;
@dynamic alternateData;
#endif

- (id) initWithGuid: (EDAMGuid) guid noteGuid: (EDAMGuid) noteGuid data: (EDAMData *) data mime: (NSString *) mime width: (int16_t) width height: (int16_t) height duration: (int16_t) duration active: (BOOL) active recognition: (EDAMData *) recognition attributes: (EDAMResourceAttributes *) attributes updateSequenceNum: (int32_t) updateSequenceNum alternateData: (EDAMData *) alternateData
{
  self = [super init];
  __guid = [guid retain];
  __guid_isset = YES;
  __noteGuid = [noteGuid retain];
  __noteGuid_isset = YES;
  __data = [data retain];
  __data_isset = YES;
  __mime = [mime retain];
  __mime_isset = YES;
  __width = width;
  __width_isset = YES;
  __height = height;
  __height_isset = YES;
  __duration = duration;
  __duration_isset = YES;
  __active = active;
  __active_isset = YES;
  __recognition = [recognition retain];
  __recognition_isset = YES;
  __attributes = [attributes retain];
  __attributes_isset = YES;
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
  __alternateData = [alternateData retain];
  __alternateData_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"guid"])
  {
    __guid = [[decoder decodeObjectForKey: @"guid"] retain];
    __guid_isset = YES;
  }
  if ([decoder containsValueForKey: @"noteGuid"])
  {
    __noteGuid = [[decoder decodeObjectForKey: @"noteGuid"] retain];
    __noteGuid_isset = YES;
  }
  if ([decoder containsValueForKey: @"data"])
  {
    __data = [[decoder decodeObjectForKey: @"data"] retain];
    __data_isset = YES;
  }
  if ([decoder containsValueForKey: @"mime"])
  {
    __mime = [[decoder decodeObjectForKey: @"mime"] retain];
    __mime_isset = YES;
  }
  if ([decoder containsValueForKey: @"width"])
  {
    __width = [decoder decodeIntForKey: @"width"];
    __width_isset = YES;
  }
  if ([decoder containsValueForKey: @"height"])
  {
    __height = [decoder decodeIntForKey: @"height"];
    __height_isset = YES;
  }
  if ([decoder containsValueForKey: @"duration"])
  {
    __duration = [decoder decodeIntForKey: @"duration"];
    __duration_isset = YES;
  }
  if ([decoder containsValueForKey: @"active"])
  {
    __active = [decoder decodeBoolForKey: @"active"];
    __active_isset = YES;
  }
  if ([decoder containsValueForKey: @"recognition"])
  {
    __recognition = [[decoder decodeObjectForKey: @"recognition"] retain];
    __recognition_isset = YES;
  }
  if ([decoder containsValueForKey: @"attributes"])
  {
    __attributes = [[decoder decodeObjectForKey: @"attributes"] retain];
    __attributes_isset = YES;
  }
  if ([decoder containsValueForKey: @"updateSequenceNum"])
  {
    __updateSequenceNum = [decoder decodeInt32ForKey: @"updateSequenceNum"];
    __updateSequenceNum_isset = YES;
  }
  if ([decoder containsValueForKey: @"alternateData"])
  {
    __alternateData = [[decoder decodeObjectForKey: @"alternateData"] retain];
    __alternateData_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__guid_isset)
  {
    [encoder encodeObject: __guid forKey: @"guid"];
  }
  if (__noteGuid_isset)
  {
    [encoder encodeObject: __noteGuid forKey: @"noteGuid"];
  }
  if (__data_isset)
  {
    [encoder encodeObject: __data forKey: @"data"];
  }
  if (__mime_isset)
  {
    [encoder encodeObject: __mime forKey: @"mime"];
  }
  if (__width_isset)
  {
    [encoder encodeInt: __width forKey: @"width"];
  }
  if (__height_isset)
  {
    [encoder encodeInt: __height forKey: @"height"];
  }
  if (__duration_isset)
  {
    [encoder encodeInt: __duration forKey: @"duration"];
  }
  if (__active_isset)
  {
    [encoder encodeBool: __active forKey: @"active"];
  }
  if (__recognition_isset)
  {
    [encoder encodeObject: __recognition forKey: @"recognition"];
  }
  if (__attributes_isset)
  {
    [encoder encodeObject: __attributes forKey: @"attributes"];
  }
  if (__updateSequenceNum_isset)
  {
    [encoder encodeInt32: __updateSequenceNum forKey: @"updateSequenceNum"];
  }
  if (__alternateData_isset)
  {
    [encoder encodeObject: __alternateData forKey: @"alternateData"];
  }
}

- (void) dealloc
{
  [__guid release];
  [__noteGuid release];
  [__data release];
  [__mime release];
  [__recognition release];
  [__attributes release];
  [__alternateData release];
  [super dealloc];
}

- (NSString *) guid {
  return [[__guid retain] autorelease];
}

- (void) setGuid: (NSString *) guid {
  [guid retain];
  [__guid release];
  __guid = guid;
  __guid_isset = YES;
}

- (BOOL) guidIsSet {
  return __guid_isset;
}

- (void) unsetGuid {
  [__guid release];
  __guid = nil;
  __guid_isset = NO;
}

- (NSString *) noteGuid {
  return [[__noteGuid retain] autorelease];
}

- (void) setNoteGuid: (NSString *) noteGuid {
  [noteGuid retain];
  [__noteGuid release];
  __noteGuid = noteGuid;
  __noteGuid_isset = YES;
}

- (BOOL) noteGuidIsSet {
  return __noteGuid_isset;
}

- (void) unsetNoteGuid {
  [__noteGuid release];
  __noteGuid = nil;
  __noteGuid_isset = NO;
}

- (EDAMData *) data {
  return [[__data retain] autorelease];
}

- (void) setData: (EDAMData *) data {
  [data retain];
  [__data release];
  __data = data;
  __data_isset = YES;
}

- (BOOL) dataIsSet {
  return __data_isset;
}

- (void) unsetData {
  [__data release];
  __data = nil;
  __data_isset = NO;
}

- (NSString *) mime {
  return [[__mime retain] autorelease];
}

- (void) setMime: (NSString *) mime {
  [mime retain];
  [__mime release];
  __mime = mime;
  __mime_isset = YES;
}

- (BOOL) mimeIsSet {
  return __mime_isset;
}

- (void) unsetMime {
  [__mime release];
  __mime = nil;
  __mime_isset = NO;
}

- (int16_t) width {
  return __width;
}

- (void) setWidth: (int16_t) width {
  __width = width;
  __width_isset = YES;
}

- (BOOL) widthIsSet {
  return __width_isset;
}

- (void) unsetWidth {
  __width_isset = NO;
}

- (int16_t) height {
  return __height;
}

- (void) setHeight: (int16_t) height {
  __height = height;
  __height_isset = YES;
}

- (BOOL) heightIsSet {
  return __height_isset;
}

- (void) unsetHeight {
  __height_isset = NO;
}

- (int16_t) duration {
  return __duration;
}

- (void) setDuration: (int16_t) duration {
  __duration = duration;
  __duration_isset = YES;
}

- (BOOL) durationIsSet {
  return __duration_isset;
}

- (void) unsetDuration {
  __duration_isset = NO;
}

- (BOOL) active {
  return __active;
}

- (void) setActive: (BOOL) active {
  __active = active;
  __active_isset = YES;
}

- (BOOL) activeIsSet {
  return __active_isset;
}

- (void) unsetActive {
  __active_isset = NO;
}

- (EDAMData *) recognition {
  return [[__recognition retain] autorelease];
}

- (void) setRecognition: (EDAMData *) recognition {
  [recognition retain];
  [__recognition release];
  __recognition = recognition;
  __recognition_isset = YES;
}

- (BOOL) recognitionIsSet {
  return __recognition_isset;
}

- (void) unsetRecognition {
  [__recognition release];
  __recognition = nil;
  __recognition_isset = NO;
}

- (EDAMResourceAttributes *) attributes {
  return [[__attributes retain] autorelease];
}

- (void) setAttributes: (EDAMResourceAttributes *) attributes {
  [attributes retain];
  [__attributes release];
  __attributes = attributes;
  __attributes_isset = YES;
}

- (BOOL) attributesIsSet {
  return __attributes_isset;
}

- (void) unsetAttributes {
  [__attributes release];
  __attributes = nil;
  __attributes_isset = NO;
}

- (int32_t) updateSequenceNum {
  return __updateSequenceNum;
}

- (void) setUpdateSequenceNum: (int32_t) updateSequenceNum {
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
}

- (BOOL) updateSequenceNumIsSet {
  return __updateSequenceNum_isset;
}

- (void) unsetUpdateSequenceNum {
  __updateSequenceNum_isset = NO;
}

- (EDAMData *) alternateData {
  return [[__alternateData retain] autorelease];
}

- (void) setAlternateData: (EDAMData *) alternateData {
  [alternateData retain];
  [__alternateData release];
  __alternateData = alternateData;
  __alternateData_isset = YES;
}

- (BOOL) alternateDataIsSet {
  return __alternateData_isset;
}

- (void) unsetAlternateData {
  [__alternateData release];
  __alternateData = nil;
  __alternateData_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setNoteGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRUCT) {
          EDAMData *fieldValue = [[EDAMData alloc] init];
          [fieldValue read: inProtocol];
          [self setData: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setMime: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setWidth: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setHeight: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setDuration: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setActive: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_STRUCT) {
          EDAMData *fieldValue = [[EDAMData alloc] init];
          [fieldValue read: inProtocol];
          [self setRecognition: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_STRUCT) {
          EDAMResourceAttributes *fieldValue = [[EDAMResourceAttributes alloc] init];
          [fieldValue read: inProtocol];
          [self setAttributes: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUpdateSequenceNum: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_STRUCT) {
          EDAMData *fieldValue = [[EDAMData alloc] init];
          [fieldValue read: inProtocol];
          [self setAlternateData: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Resource"];
  if (__guid_isset) {
    if (__guid != nil) {
      [outProtocol writeFieldBeginWithName: @"guid" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __guid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__noteGuid_isset) {
    if (__noteGuid != nil) {
      [outProtocol writeFieldBeginWithName: @"noteGuid" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __noteGuid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__data_isset) {
    if (__data != nil) {
      [outProtocol writeFieldBeginWithName: @"data" type: TType_STRUCT fieldID: 3];
      [__data write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__mime_isset) {
    if (__mime != nil) {
      [outProtocol writeFieldBeginWithName: @"mime" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __mime];
      [outProtocol writeFieldEnd];
    }
  }
  if (__width_isset) {
    [outProtocol writeFieldBeginWithName: @"width" type: TType_I16 fieldID: 5];
    [outProtocol writeI16: __width];
    [outProtocol writeFieldEnd];
  }
  if (__height_isset) {
    [outProtocol writeFieldBeginWithName: @"height" type: TType_I16 fieldID: 6];
    [outProtocol writeI16: __height];
    [outProtocol writeFieldEnd];
  }
  if (__duration_isset) {
    [outProtocol writeFieldBeginWithName: @"duration" type: TType_I16 fieldID: 7];
    [outProtocol writeI16: __duration];
    [outProtocol writeFieldEnd];
  }
  if (__active_isset) {
    [outProtocol writeFieldBeginWithName: @"active" type: TType_BOOL fieldID: 8];
    [outProtocol writeBool: __active];
    [outProtocol writeFieldEnd];
  }
  if (__recognition_isset) {
    if (__recognition != nil) {
      [outProtocol writeFieldBeginWithName: @"recognition" type: TType_STRUCT fieldID: 9];
      [__recognition write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__attributes_isset) {
    if (__attributes != nil) {
      [outProtocol writeFieldBeginWithName: @"attributes" type: TType_STRUCT fieldID: 11];
      [__attributes write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__updateSequenceNum_isset) {
    [outProtocol writeFieldBeginWithName: @"updateSequenceNum" type: TType_I32 fieldID: 12];
    [outProtocol writeI32: __updateSequenceNum];
    [outProtocol writeFieldEnd];
  }
  if (__alternateData_isset) {
    if (__alternateData != nil) {
      [outProtocol writeFieldBeginWithName: @"alternateData" type: TType_STRUCT fieldID: 13];
      [__alternateData write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Resource("];
  [ms appendString: @"guid:"];
  [ms appendFormat: @"\"%@\"", __guid];
  [ms appendString: @",noteGuid:"];
  [ms appendFormat: @"\"%@\"", __noteGuid];
  [ms appendString: @",data:"];
  [ms appendFormat: @"%@", __data];
  [ms appendString: @",mime:"];
  [ms appendFormat: @"\"%@\"", __mime];
  [ms appendString: @",width:"];
  [ms appendFormat: @"%hi", __width];
  [ms appendString: @",height:"];
  [ms appendFormat: @"%hi", __height];
  [ms appendString: @",duration:"];
  [ms appendFormat: @"%hi", __duration];
  [ms appendString: @",active:"];
  [ms appendFormat: @"%i", __active];
  [ms appendString: @",recognition:"];
  [ms appendFormat: @"%@", __recognition];
  [ms appendString: @",attributes:"];
  [ms appendFormat: @"%@", __attributes];
  [ms appendString: @",updateSequenceNum:"];
  [ms appendFormat: @"%i", __updateSequenceNum];
  [ms appendString: @",alternateData:"];
  [ms appendFormat: @"%@", __alternateData];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMNoteAttributes

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic subjectDate;
@dynamic latitude;
@dynamic longitude;
@dynamic altitude;
@dynamic author;
@dynamic source;
@dynamic sourceURL;
@dynamic sourceApplication;
#endif

- (id) initWithSubjectDate: (EDAMTimestamp) subjectDate latitude: (double) latitude longitude: (double) longitude altitude: (double) altitude author: (NSString *) author source: (NSString *) source sourceURL: (NSString *) sourceURL sourceApplication: (NSString *) sourceApplication
{
  self = [super init];
  __subjectDate = subjectDate;
  __subjectDate_isset = YES;
  __latitude = latitude;
  __latitude_isset = YES;
  __longitude = longitude;
  __longitude_isset = YES;
  __altitude = altitude;
  __altitude_isset = YES;
  __author = [author retain];
  __author_isset = YES;
  __source = [source retain];
  __source_isset = YES;
  __sourceURL = [sourceURL retain];
  __sourceURL_isset = YES;
  __sourceApplication = [sourceApplication retain];
  __sourceApplication_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"subjectDate"])
  {
    __subjectDate = [decoder decodeInt64ForKey: @"subjectDate"];
    __subjectDate_isset = YES;
  }
  if ([decoder containsValueForKey: @"latitude"])
  {
    __latitude = [decoder decodeDoubleForKey: @"latitude"];
    __latitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"longitude"])
  {
    __longitude = [decoder decodeDoubleForKey: @"longitude"];
    __longitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"altitude"])
  {
    __altitude = [decoder decodeDoubleForKey: @"altitude"];
    __altitude_isset = YES;
  }
  if ([decoder containsValueForKey: @"author"])
  {
    __author = [[decoder decodeObjectForKey: @"author"] retain];
    __author_isset = YES;
  }
  if ([decoder containsValueForKey: @"source"])
  {
    __source = [[decoder decodeObjectForKey: @"source"] retain];
    __source_isset = YES;
  }
  if ([decoder containsValueForKey: @"sourceURL"])
  {
    __sourceURL = [[decoder decodeObjectForKey: @"sourceURL"] retain];
    __sourceURL_isset = YES;
  }
  if ([decoder containsValueForKey: @"sourceApplication"])
  {
    __sourceApplication = [[decoder decodeObjectForKey: @"sourceApplication"] retain];
    __sourceApplication_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__subjectDate_isset)
  {
    [encoder encodeInt64: __subjectDate forKey: @"subjectDate"];
  }
  if (__latitude_isset)
  {
    [encoder encodeDouble: __latitude forKey: @"latitude"];
  }
  if (__longitude_isset)
  {
    [encoder encodeDouble: __longitude forKey: @"longitude"];
  }
  if (__altitude_isset)
  {
    [encoder encodeDouble: __altitude forKey: @"altitude"];
  }
  if (__author_isset)
  {
    [encoder encodeObject: __author forKey: @"author"];
  }
  if (__source_isset)
  {
    [encoder encodeObject: __source forKey: @"source"];
  }
  if (__sourceURL_isset)
  {
    [encoder encodeObject: __sourceURL forKey: @"sourceURL"];
  }
  if (__sourceApplication_isset)
  {
    [encoder encodeObject: __sourceApplication forKey: @"sourceApplication"];
  }
}

- (void) dealloc
{
  [__author release];
  [__source release];
  [__sourceURL release];
  [__sourceApplication release];
  [super dealloc];
}

- (int64_t) subjectDate {
  return __subjectDate;
}

- (void) setSubjectDate: (int64_t) subjectDate {
  __subjectDate = subjectDate;
  __subjectDate_isset = YES;
}

- (BOOL) subjectDateIsSet {
  return __subjectDate_isset;
}

- (void) unsetSubjectDate {
  __subjectDate_isset = NO;
}

- (double) latitude {
  return __latitude;
}

- (void) setLatitude: (double) latitude {
  __latitude = latitude;
  __latitude_isset = YES;
}

- (BOOL) latitudeIsSet {
  return __latitude_isset;
}

- (void) unsetLatitude {
  __latitude_isset = NO;
}

- (double) longitude {
  return __longitude;
}

- (void) setLongitude: (double) longitude {
  __longitude = longitude;
  __longitude_isset = YES;
}

- (BOOL) longitudeIsSet {
  return __longitude_isset;
}

- (void) unsetLongitude {
  __longitude_isset = NO;
}

- (double) altitude {
  return __altitude;
}

- (void) setAltitude: (double) altitude {
  __altitude = altitude;
  __altitude_isset = YES;
}

- (BOOL) altitudeIsSet {
  return __altitude_isset;
}

- (void) unsetAltitude {
  __altitude_isset = NO;
}

- (NSString *) author {
  return [[__author retain] autorelease];
}

- (void) setAuthor: (NSString *) author {
  [author retain];
  [__author release];
  __author = author;
  __author_isset = YES;
}

- (BOOL) authorIsSet {
  return __author_isset;
}

- (void) unsetAuthor {
  [__author release];
  __author = nil;
  __author_isset = NO;
}

- (NSString *) source {
  return [[__source retain] autorelease];
}

- (void) setSource: (NSString *) source {
  [source retain];
  [__source release];
  __source = source;
  __source_isset = YES;
}

- (BOOL) sourceIsSet {
  return __source_isset;
}

- (void) unsetSource {
  [__source release];
  __source = nil;
  __source_isset = NO;
}

- (NSString *) sourceURL {
  return [[__sourceURL retain] autorelease];
}

- (void) setSourceURL: (NSString *) sourceURL {
  [sourceURL retain];
  [__sourceURL release];
  __sourceURL = sourceURL;
  __sourceURL_isset = YES;
}

- (BOOL) sourceURLIsSet {
  return __sourceURL_isset;
}

- (void) unsetSourceURL {
  [__sourceURL release];
  __sourceURL = nil;
  __sourceURL_isset = NO;
}

- (NSString *) sourceApplication {
  return [[__sourceApplication retain] autorelease];
}

- (void) setSourceApplication: (NSString *) sourceApplication {
  [sourceApplication retain];
  [__sourceApplication release];
  __sourceApplication = sourceApplication;
  __sourceApplication_isset = YES;
}

- (BOOL) sourceApplicationIsSet {
  return __sourceApplication_isset;
}

- (void) unsetSourceApplication {
  [__sourceApplication release];
  __sourceApplication = nil;
  __sourceApplication_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setSubjectDate: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setLatitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setLongitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setAltitude: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setAuthor: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 14:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setSource: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 15:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setSourceURL: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 16:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setSourceApplication: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"NoteAttributes"];
  if (__subjectDate_isset) {
    [outProtocol writeFieldBeginWithName: @"subjectDate" type: TType_I64 fieldID: 1];
    [outProtocol writeI64: __subjectDate];
    [outProtocol writeFieldEnd];
  }
  if (__latitude_isset) {
    [outProtocol writeFieldBeginWithName: @"latitude" type: TType_DOUBLE fieldID: 10];
    [outProtocol writeDouble: __latitude];
    [outProtocol writeFieldEnd];
  }
  if (__longitude_isset) {
    [outProtocol writeFieldBeginWithName: @"longitude" type: TType_DOUBLE fieldID: 11];
    [outProtocol writeDouble: __longitude];
    [outProtocol writeFieldEnd];
  }
  if (__altitude_isset) {
    [outProtocol writeFieldBeginWithName: @"altitude" type: TType_DOUBLE fieldID: 12];
    [outProtocol writeDouble: __altitude];
    [outProtocol writeFieldEnd];
  }
  if (__author_isset) {
    if (__author != nil) {
      [outProtocol writeFieldBeginWithName: @"author" type: TType_STRING fieldID: 13];
      [outProtocol writeString: __author];
      [outProtocol writeFieldEnd];
    }
  }
  if (__source_isset) {
    if (__source != nil) {
      [outProtocol writeFieldBeginWithName: @"source" type: TType_STRING fieldID: 14];
      [outProtocol writeString: __source];
      [outProtocol writeFieldEnd];
    }
  }
  if (__sourceURL_isset) {
    if (__sourceURL != nil) {
      [outProtocol writeFieldBeginWithName: @"sourceURL" type: TType_STRING fieldID: 15];
      [outProtocol writeString: __sourceURL];
      [outProtocol writeFieldEnd];
    }
  }
  if (__sourceApplication_isset) {
    if (__sourceApplication != nil) {
      [outProtocol writeFieldBeginWithName: @"sourceApplication" type: TType_STRING fieldID: 16];
      [outProtocol writeString: __sourceApplication];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"NoteAttributes("];
  [ms appendString: @"subjectDate:"];
  [ms appendFormat: @"%qi", __subjectDate];
  [ms appendString: @",latitude:"];
  [ms appendFormat: @"%f", __latitude];
  [ms appendString: @",longitude:"];
  [ms appendFormat: @"%f", __longitude];
  [ms appendString: @",altitude:"];
  [ms appendFormat: @"%f", __altitude];
  [ms appendString: @",author:"];
  [ms appendFormat: @"\"%@\"", __author];
  [ms appendString: @",source:"];
  [ms appendFormat: @"\"%@\"", __source];
  [ms appendString: @",sourceURL:"];
  [ms appendFormat: @"\"%@\"", __sourceURL];
  [ms appendString: @",sourceApplication:"];
  [ms appendFormat: @"\"%@\"", __sourceApplication];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMNote

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic guid;
@dynamic title;
@dynamic content;
@dynamic contentHash;
@dynamic contentLength;
@dynamic created;
@dynamic updated;
@dynamic deleted;
@dynamic active;
@dynamic updateSequenceNum;
@dynamic notebookGuid;
@dynamic tagGuids;
@dynamic resources;
@dynamic attributes;
@dynamic tagNames;
#endif

- (id) initWithGuid: (EDAMGuid) guid title: (NSString *) title content: (NSString *) content contentHash: (NSData *) contentHash contentLength: (int32_t) contentLength created: (EDAMTimestamp) created updated: (EDAMTimestamp) updated deleted: (EDAMTimestamp) deleted active: (BOOL) active updateSequenceNum: (int32_t) updateSequenceNum notebookGuid: (NSString *) notebookGuid tagGuids: (NSArray *) tagGuids resources: (NSArray *) resources attributes: (EDAMNoteAttributes *) attributes tagNames: (NSArray *) tagNames
{
  self = [super init];
  __guid = [guid retain];
  __guid_isset = YES;
  __title = [title retain];
  __title_isset = YES;
  __content = [content retain];
  __content_isset = YES;
  __contentHash = [contentHash retain];
  __contentHash_isset = YES;
  __contentLength = contentLength;
  __contentLength_isset = YES;
  __created = created;
  __created_isset = YES;
  __updated = updated;
  __updated_isset = YES;
  __deleted = deleted;
  __deleted_isset = YES;
  __active = active;
  __active_isset = YES;
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
  __notebookGuid = [notebookGuid retain];
  __notebookGuid_isset = YES;
  __tagGuids = [tagGuids retain];
  __tagGuids_isset = YES;
  __resources = [resources retain];
  __resources_isset = YES;
  __attributes = [attributes retain];
  __attributes_isset = YES;
  __tagNames = [tagNames retain];
  __tagNames_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"guid"])
  {
    __guid = [[decoder decodeObjectForKey: @"guid"] retain];
    __guid_isset = YES;
  }
  if ([decoder containsValueForKey: @"title"])
  {
    __title = [[decoder decodeObjectForKey: @"title"] retain];
    __title_isset = YES;
  }
  if ([decoder containsValueForKey: @"content"])
  {
    __content = [[decoder decodeObjectForKey: @"content"] retain];
    __content_isset = YES;
  }
  if ([decoder containsValueForKey: @"contentHash"])
  {
    __contentHash = [[decoder decodeObjectForKey: @"contentHash"] retain];
    __contentHash_isset = YES;
  }
  if ([decoder containsValueForKey: @"contentLength"])
  {
    __contentLength = [decoder decodeInt32ForKey: @"contentLength"];
    __contentLength_isset = YES;
  }
  if ([decoder containsValueForKey: @"created"])
  {
    __created = [decoder decodeInt64ForKey: @"created"];
    __created_isset = YES;
  }
  if ([decoder containsValueForKey: @"updated"])
  {
    __updated = [decoder decodeInt64ForKey: @"updated"];
    __updated_isset = YES;
  }
  if ([decoder containsValueForKey: @"deleted"])
  {
    __deleted = [decoder decodeInt64ForKey: @"deleted"];
    __deleted_isset = YES;
  }
  if ([decoder containsValueForKey: @"active"])
  {
    __active = [decoder decodeBoolForKey: @"active"];
    __active_isset = YES;
  }
  if ([decoder containsValueForKey: @"updateSequenceNum"])
  {
    __updateSequenceNum = [decoder decodeInt32ForKey: @"updateSequenceNum"];
    __updateSequenceNum_isset = YES;
  }
  if ([decoder containsValueForKey: @"notebookGuid"])
  {
    __notebookGuid = [[decoder decodeObjectForKey: @"notebookGuid"] retain];
    __notebookGuid_isset = YES;
  }
  if ([decoder containsValueForKey: @"tagGuids"])
  {
    __tagGuids = [[decoder decodeObjectForKey: @"tagGuids"] retain];
    __tagGuids_isset = YES;
  }
  if ([decoder containsValueForKey: @"resources"])
  {
    __resources = [[decoder decodeObjectForKey: @"resources"] retain];
    __resources_isset = YES;
  }
  if ([decoder containsValueForKey: @"attributes"])
  {
    __attributes = [[decoder decodeObjectForKey: @"attributes"] retain];
    __attributes_isset = YES;
  }
  if ([decoder containsValueForKey: @"tagNames"])
  {
    __tagNames = [[decoder decodeObjectForKey: @"tagNames"] retain];
    __tagNames_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__guid_isset)
  {
    [encoder encodeObject: __guid forKey: @"guid"];
  }
  if (__title_isset)
  {
    [encoder encodeObject: __title forKey: @"title"];
  }
  if (__content_isset)
  {
    [encoder encodeObject: __content forKey: @"content"];
  }
  if (__contentHash_isset)
  {
    [encoder encodeObject: __contentHash forKey: @"contentHash"];
  }
  if (__contentLength_isset)
  {
    [encoder encodeInt32: __contentLength forKey: @"contentLength"];
  }
  if (__created_isset)
  {
    [encoder encodeInt64: __created forKey: @"created"];
  }
  if (__updated_isset)
  {
    [encoder encodeInt64: __updated forKey: @"updated"];
  }
  if (__deleted_isset)
  {
    [encoder encodeInt64: __deleted forKey: @"deleted"];
  }
  if (__active_isset)
  {
    [encoder encodeBool: __active forKey: @"active"];
  }
  if (__updateSequenceNum_isset)
  {
    [encoder encodeInt32: __updateSequenceNum forKey: @"updateSequenceNum"];
  }
  if (__notebookGuid_isset)
  {
    [encoder encodeObject: __notebookGuid forKey: @"notebookGuid"];
  }
  if (__tagGuids_isset)
  {
    [encoder encodeObject: __tagGuids forKey: @"tagGuids"];
  }
  if (__resources_isset)
  {
    [encoder encodeObject: __resources forKey: @"resources"];
  }
  if (__attributes_isset)
  {
    [encoder encodeObject: __attributes forKey: @"attributes"];
  }
  if (__tagNames_isset)
  {
    [encoder encodeObject: __tagNames forKey: @"tagNames"];
  }
}

- (void) dealloc
{
  [__guid release];
  [__title release];
  [__content release];
  [__contentHash release];
  [__notebookGuid release];
  [__tagGuids release];
  [__resources release];
  [__attributes release];
  [__tagNames release];
  [super dealloc];
}

- (NSString *) guid {
  return [[__guid retain] autorelease];
}

- (void) setGuid: (NSString *) guid {
  [guid retain];
  [__guid release];
  __guid = guid;
  __guid_isset = YES;
}

- (BOOL) guidIsSet {
  return __guid_isset;
}

- (void) unsetGuid {
  [__guid release];
  __guid = nil;
  __guid_isset = NO;
}

- (NSString *) title {
  return [[__title retain] autorelease];
}

- (void) setTitle: (NSString *) title {
  [title retain];
  [__title release];
  __title = title;
  __title_isset = YES;
}

- (BOOL) titleIsSet {
  return __title_isset;
}

- (void) unsetTitle {
  [__title release];
  __title = nil;
  __title_isset = NO;
}

- (NSString *) content {
  return [[__content retain] autorelease];
}

- (void) setContent: (NSString *) content {
  [content retain];
  [__content release];
  __content = content;
  __content_isset = YES;
}

- (BOOL) contentIsSet {
  return __content_isset;
}

- (void) unsetContent {
  [__content release];
  __content = nil;
  __content_isset = NO;
}

- (NSData *) contentHash {
  return [[__contentHash retain] autorelease];
}

- (void) setContentHash: (NSData *) contentHash {
  [contentHash retain];
  [__contentHash release];
  __contentHash = contentHash;
  __contentHash_isset = YES;
}

- (BOOL) contentHashIsSet {
  return __contentHash_isset;
}

- (void) unsetContentHash {
  [__contentHash release];
  __contentHash = nil;
  __contentHash_isset = NO;
}

- (int32_t) contentLength {
  return __contentLength;
}

- (void) setContentLength: (int32_t) contentLength {
  __contentLength = contentLength;
  __contentLength_isset = YES;
}

- (BOOL) contentLengthIsSet {
  return __contentLength_isset;
}

- (void) unsetContentLength {
  __contentLength_isset = NO;
}

- (int64_t) created {
  return __created;
}

- (void) setCreated: (int64_t) created {
  __created = created;
  __created_isset = YES;
}

- (BOOL) createdIsSet {
  return __created_isset;
}

- (void) unsetCreated {
  __created_isset = NO;
}

- (int64_t) updated {
  return __updated;
}

- (void) setUpdated: (int64_t) updated {
  __updated = updated;
  __updated_isset = YES;
}

- (BOOL) updatedIsSet {
  return __updated_isset;
}

- (void) unsetUpdated {
  __updated_isset = NO;
}

- (int64_t) deleted {
  return __deleted;
}

- (void) setDeleted: (int64_t) deleted {
  __deleted = deleted;
  __deleted_isset = YES;
}

- (BOOL) deletedIsSet {
  return __deleted_isset;
}

- (void) unsetDeleted {
  __deleted_isset = NO;
}

- (BOOL) active {
  return __active;
}

- (void) setActive: (BOOL) active {
  __active = active;
  __active_isset = YES;
}

- (BOOL) activeIsSet {
  return __active_isset;
}

- (void) unsetActive {
  __active_isset = NO;
}

- (int32_t) updateSequenceNum {
  return __updateSequenceNum;
}

- (void) setUpdateSequenceNum: (int32_t) updateSequenceNum {
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
}

- (BOOL) updateSequenceNumIsSet {
  return __updateSequenceNum_isset;
}

- (void) unsetUpdateSequenceNum {
  __updateSequenceNum_isset = NO;
}

- (NSString *) notebookGuid {
  return [[__notebookGuid retain] autorelease];
}

- (void) setNotebookGuid: (NSString *) notebookGuid {
  [notebookGuid retain];
  [__notebookGuid release];
  __notebookGuid = notebookGuid;
  __notebookGuid_isset = YES;
}

- (BOOL) notebookGuidIsSet {
  return __notebookGuid_isset;
}

- (void) unsetNotebookGuid {
  [__notebookGuid release];
  __notebookGuid = nil;
  __notebookGuid_isset = NO;
}

- (NSArray *) tagGuids {
  return [[__tagGuids retain] autorelease];
}

- (void) setTagGuids: (NSArray *) tagGuids {
  [tagGuids retain];
  [__tagGuids release];
  __tagGuids = tagGuids;
  __tagGuids_isset = YES;
}

- (BOOL) tagGuidsIsSet {
  return __tagGuids_isset;
}

- (void) unsetTagGuids {
  [__tagGuids release];
  __tagGuids = nil;
  __tagGuids_isset = NO;
}

- (NSArray *) resources {
  return [[__resources retain] autorelease];
}

- (void) setResources: (NSArray *) resources {
  [resources retain];
  [__resources release];
  __resources = resources;
  __resources_isset = YES;
}

- (BOOL) resourcesIsSet {
  return __resources_isset;
}

- (void) unsetResources {
  [__resources release];
  __resources = nil;
  __resources_isset = NO;
}

- (EDAMNoteAttributes *) attributes {
  return [[__attributes retain] autorelease];
}

- (void) setAttributes: (EDAMNoteAttributes *) attributes {
  [attributes retain];
  [__attributes release];
  __attributes = attributes;
  __attributes_isset = YES;
}

- (BOOL) attributesIsSet {
  return __attributes_isset;
}

- (void) unsetAttributes {
  [__attributes release];
  __attributes = nil;
  __attributes_isset = NO;
}

- (NSArray *) tagNames {
  return [[__tagNames retain] autorelease];
}

- (void) setTagNames: (NSArray *) tagNames {
  [tagNames retain];
  [__tagNames release];
  __tagNames = tagNames;
  __tagNames_isset = YES;
}

- (BOOL) tagNamesIsSet {
  return __tagNames_isset;
}

- (void) unsetTagNames {
  [__tagNames release];
  __tagNames = nil;
  __tagNames_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setTitle: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setContent: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSData * fieldValue = [inProtocol readBinary];
          [self setContentHash: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setContentLength: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setCreated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setUpdated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setDeleted: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setActive: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUpdateSequenceNum: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setNotebookGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_LIST) {
          int _size10;
          [inProtocol readListBeginReturningElementType: NULL size: &_size10];
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size10];
          int _i11;
          for (_i11 = 0; _i11 < _size10; ++_i11)
          {
            NSString * _elem12 = [inProtocol readString];
            [fieldValue addObject: _elem12];
          }
          [inProtocol readListEnd];
          [self setTagGuids: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 13:
        if (fieldType == TType_LIST) {
          int _size13;
          [inProtocol readListBeginReturningElementType: NULL size: &_size13];
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size13];
          int _i14;
          for (_i14 = 0; _i14 < _size13; ++_i14)
          {
            EDAMResource *_elem15 = [[EDAMResource alloc] init];
            [_elem15 read: inProtocol];
            [fieldValue addObject: _elem15];
            [_elem15 release];
          }
          [inProtocol readListEnd];
          [self setResources: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 14:
        if (fieldType == TType_STRUCT) {
          EDAMNoteAttributes *fieldValue = [[EDAMNoteAttributes alloc] init];
          [fieldValue read: inProtocol];
          [self setAttributes: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 15:
        if (fieldType == TType_LIST) {
          int _size16;
          [inProtocol readListBeginReturningElementType: NULL size: &_size16];
          NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size16];
          int _i17;
          for (_i17 = 0; _i17 < _size16; ++_i17)
          {
            NSString * _elem18 = [inProtocol readString];
            [fieldValue addObject: _elem18];
          }
          [inProtocol readListEnd];
          [self setTagNames: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Note"];
  if (__guid_isset) {
    if (__guid != nil) {
      [outProtocol writeFieldBeginWithName: @"guid" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __guid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__title_isset) {
    if (__title != nil) {
      [outProtocol writeFieldBeginWithName: @"title" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __title];
      [outProtocol writeFieldEnd];
    }
  }
  if (__content_isset) {
    if (__content != nil) {
      [outProtocol writeFieldBeginWithName: @"content" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __content];
      [outProtocol writeFieldEnd];
    }
  }
  if (__contentHash_isset) {
    if (__contentHash != nil) {
      [outProtocol writeFieldBeginWithName: @"contentHash" type: TType_STRING fieldID: 4];
      [outProtocol writeBinary: __contentHash];
      [outProtocol writeFieldEnd];
    }
  }
  if (__contentLength_isset) {
    [outProtocol writeFieldBeginWithName: @"contentLength" type: TType_I32 fieldID: 5];
    [outProtocol writeI32: __contentLength];
    [outProtocol writeFieldEnd];
  }
  if (__created_isset) {
    [outProtocol writeFieldBeginWithName: @"created" type: TType_I64 fieldID: 6];
    [outProtocol writeI64: __created];
    [outProtocol writeFieldEnd];
  }
  if (__updated_isset) {
    [outProtocol writeFieldBeginWithName: @"updated" type: TType_I64 fieldID: 7];
    [outProtocol writeI64: __updated];
    [outProtocol writeFieldEnd];
  }
  if (__deleted_isset) {
    [outProtocol writeFieldBeginWithName: @"deleted" type: TType_I64 fieldID: 8];
    [outProtocol writeI64: __deleted];
    [outProtocol writeFieldEnd];
  }
  if (__active_isset) {
    [outProtocol writeFieldBeginWithName: @"active" type: TType_BOOL fieldID: 9];
    [outProtocol writeBool: __active];
    [outProtocol writeFieldEnd];
  }
  if (__updateSequenceNum_isset) {
    [outProtocol writeFieldBeginWithName: @"updateSequenceNum" type: TType_I32 fieldID: 10];
    [outProtocol writeI32: __updateSequenceNum];
    [outProtocol writeFieldEnd];
  }
  if (__notebookGuid_isset) {
    if (__notebookGuid != nil) {
      [outProtocol writeFieldBeginWithName: @"notebookGuid" type: TType_STRING fieldID: 11];
      [outProtocol writeString: __notebookGuid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__tagGuids_isset) {
    if (__tagGuids != nil) {
      [outProtocol writeFieldBeginWithName: @"tagGuids" type: TType_LIST fieldID: 12];
      {
        [outProtocol writeListBeginWithElementType: TType_STRING size: [__tagGuids count]];
        NSUInteger i20;
        for (i20 = 0; i20 < [__tagGuids count]; i20++)
        {
          [outProtocol writeString: [__tagGuids objectAtIndex: i20]];
        }
        [outProtocol writeListEnd];
      }
      [outProtocol writeFieldEnd];
    }
  }
  if (__resources_isset) {
    if (__resources != nil) {
      [outProtocol writeFieldBeginWithName: @"resources" type: TType_LIST fieldID: 13];
      {
        [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__resources count]];
        NSUInteger i22;
        for (i22 = 0; i22 < [__resources count]; i22++)
        {
          [[__resources objectAtIndex: i22] write: outProtocol];
        }
        [outProtocol writeListEnd];
      }
      [outProtocol writeFieldEnd];
    }
  }
  if (__attributes_isset) {
    if (__attributes != nil) {
      [outProtocol writeFieldBeginWithName: @"attributes" type: TType_STRUCT fieldID: 14];
      [__attributes write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__tagNames_isset) {
    if (__tagNames != nil) {
      [outProtocol writeFieldBeginWithName: @"tagNames" type: TType_LIST fieldID: 15];
      {
        [outProtocol writeListBeginWithElementType: TType_STRING size: [__tagNames count]];
        NSUInteger i24;
        for (i24 = 0; i24 < [__tagNames count]; i24++)
        {
          [outProtocol writeString: [__tagNames objectAtIndex: i24]];
        }
        [outProtocol writeListEnd];
      }
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Note("];
  [ms appendString: @"guid:"];
  [ms appendFormat: @"\"%@\"", __guid];
  [ms appendString: @",title:"];
  [ms appendFormat: @"\"%@\"", __title];
  [ms appendString: @",content:"];
  [ms appendFormat: @"\"%@\"", __content];
  [ms appendString: @",contentHash:"];
  [ms appendFormat: @"\"%@\"", __contentHash];
  [ms appendString: @",contentLength:"];
  [ms appendFormat: @"%i", __contentLength];
  [ms appendString: @",created:"];
  [ms appendFormat: @"%qi", __created];
  [ms appendString: @",updated:"];
  [ms appendFormat: @"%qi", __updated];
  [ms appendString: @",deleted:"];
  [ms appendFormat: @"%qi", __deleted];
  [ms appendString: @",active:"];
  [ms appendFormat: @"%i", __active];
  [ms appendString: @",updateSequenceNum:"];
  [ms appendFormat: @"%i", __updateSequenceNum];
  [ms appendString: @",notebookGuid:"];
  [ms appendFormat: @"\"%@\"", __notebookGuid];
  [ms appendString: @",tagGuids:"];
  [ms appendFormat: @"%@", __tagGuids];
  [ms appendString: @",resources:"];
  [ms appendFormat: @"%@", __resources];
  [ms appendString: @",attributes:"];
  [ms appendFormat: @"%@", __attributes];
  [ms appendString: @",tagNames:"];
  [ms appendFormat: @"%@", __tagNames];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMPublishing

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic uri;
@dynamic order;
@dynamic ascending;
@dynamic publicDescription;
#endif

- (id) initWithUri: (NSString *) uri order: (int) order ascending: (BOOL) ascending publicDescription: (NSString *) publicDescription
{
  self = [super init];
  __uri = [uri retain];
  __uri_isset = YES;
  __order = order;
  __order_isset = YES;
  __ascending = ascending;
  __ascending_isset = YES;
  __publicDescription = [publicDescription retain];
  __publicDescription_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"uri"])
  {
    __uri = [[decoder decodeObjectForKey: @"uri"] retain];
    __uri_isset = YES;
  }
  if ([decoder containsValueForKey: @"order"])
  {
    __order = [decoder decodeIntForKey: @"order"];
    __order_isset = YES;
  }
  if ([decoder containsValueForKey: @"ascending"])
  {
    __ascending = [decoder decodeBoolForKey: @"ascending"];
    __ascending_isset = YES;
  }
  if ([decoder containsValueForKey: @"publicDescription"])
  {
    __publicDescription = [[decoder decodeObjectForKey: @"publicDescription"] retain];
    __publicDescription_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__uri_isset)
  {
    [encoder encodeObject: __uri forKey: @"uri"];
  }
  if (__order_isset)
  {
    [encoder encodeInt: __order forKey: @"order"];
  }
  if (__ascending_isset)
  {
    [encoder encodeBool: __ascending forKey: @"ascending"];
  }
  if (__publicDescription_isset)
  {
    [encoder encodeObject: __publicDescription forKey: @"publicDescription"];
  }
}

- (void) dealloc
{
  [__uri release];
  [__publicDescription release];
  [super dealloc];
}

- (NSString *) uri {
  return [[__uri retain] autorelease];
}

- (void) setUri: (NSString *) uri {
  [uri retain];
  [__uri release];
  __uri = uri;
  __uri_isset = YES;
}

- (BOOL) uriIsSet {
  return __uri_isset;
}

- (void) unsetUri {
  [__uri release];
  __uri = nil;
  __uri_isset = NO;
}

- (int) order {
  return __order;
}

- (void) setOrder: (int) order {
  __order = order;
  __order_isset = YES;
}

- (BOOL) orderIsSet {
  return __order_isset;
}

- (void) unsetOrder {
  __order_isset = NO;
}

- (BOOL) ascending {
  return __ascending;
}

- (void) setAscending: (BOOL) ascending {
  __ascending = ascending;
  __ascending_isset = YES;
}

- (BOOL) ascendingIsSet {
  return __ascending_isset;
}

- (void) unsetAscending {
  __ascending_isset = NO;
}

- (NSString *) publicDescription {
  return [[__publicDescription retain] autorelease];
}

- (void) setPublicDescription: (NSString *) publicDescription {
  [publicDescription retain];
  [__publicDescription release];
  __publicDescription = publicDescription;
  __publicDescription_isset = YES;
}

- (BOOL) publicDescriptionIsSet {
  return __publicDescription_isset;
}

- (void) unsetPublicDescription {
  [__publicDescription release];
  __publicDescription = nil;
  __publicDescription_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setUri: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I32) {
          int fieldValue = [inProtocol readI32];
          [self setOrder: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setAscending: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setPublicDescription: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Publishing"];
  if (__uri_isset) {
    if (__uri != nil) {
      [outProtocol writeFieldBeginWithName: @"uri" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __uri];
      [outProtocol writeFieldEnd];
    }
  }
  if (__order_isset) {
    [outProtocol writeFieldBeginWithName: @"order" type: TType_I32 fieldID: 2];
    [outProtocol writeI32: __order];
    [outProtocol writeFieldEnd];
  }
  if (__ascending_isset) {
    [outProtocol writeFieldBeginWithName: @"ascending" type: TType_BOOL fieldID: 3];
    [outProtocol writeBool: __ascending];
    [outProtocol writeFieldEnd];
  }
  if (__publicDescription_isset) {
    if (__publicDescription != nil) {
      [outProtocol writeFieldBeginWithName: @"publicDescription" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __publicDescription];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Publishing("];
  [ms appendString: @"uri:"];
  [ms appendFormat: @"\"%@\"", __uri];
  [ms appendString: @",order:"];
  [ms appendFormat: @"%i", __order];
  [ms appendString: @",ascending:"];
  [ms appendFormat: @"%i", __ascending];
  [ms appendString: @",publicDescription:"];
  [ms appendFormat: @"\"%@\"", __publicDescription];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMNotebook

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic guid;
@dynamic name;
@dynamic updateSequenceNum;
@dynamic defaultNotebook;
@dynamic serviceCreated;
@dynamic serviceUpdated;
@dynamic publishing;
@dynamic published;
@dynamic stack;
#endif

- (id) initWithGuid: (EDAMGuid) guid name: (NSString *) name updateSequenceNum: (int32_t) updateSequenceNum defaultNotebook: (BOOL) defaultNotebook serviceCreated: (EDAMTimestamp) serviceCreated serviceUpdated: (EDAMTimestamp) serviceUpdated publishing: (EDAMPublishing *) publishing published: (BOOL) published stack: (NSString *) stack
{
  self = [super init];
  __guid = [guid retain];
  __guid_isset = YES;
  __name = [name retain];
  __name_isset = YES;
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
  __defaultNotebook = defaultNotebook;
  __defaultNotebook_isset = YES;
  __serviceCreated = serviceCreated;
  __serviceCreated_isset = YES;
  __serviceUpdated = serviceUpdated;
  __serviceUpdated_isset = YES;
  __publishing = [publishing retain];
  __publishing_isset = YES;
  __published = published;
  __published_isset = YES;
  __stack = [stack retain];
  __stack_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"guid"])
  {
    __guid = [[decoder decodeObjectForKey: @"guid"] retain];
    __guid_isset = YES;
  }
  if ([decoder containsValueForKey: @"name"])
  {
    __name = [[decoder decodeObjectForKey: @"name"] retain];
    __name_isset = YES;
  }
  if ([decoder containsValueForKey: @"updateSequenceNum"])
  {
    __updateSequenceNum = [decoder decodeInt32ForKey: @"updateSequenceNum"];
    __updateSequenceNum_isset = YES;
  }
  if ([decoder containsValueForKey: @"defaultNotebook"])
  {
    __defaultNotebook = [decoder decodeBoolForKey: @"defaultNotebook"];
    __defaultNotebook_isset = YES;
  }
  if ([decoder containsValueForKey: @"serviceCreated"])
  {
    __serviceCreated = [decoder decodeInt64ForKey: @"serviceCreated"];
    __serviceCreated_isset = YES;
  }
  if ([decoder containsValueForKey: @"serviceUpdated"])
  {
    __serviceUpdated = [decoder decodeInt64ForKey: @"serviceUpdated"];
    __serviceUpdated_isset = YES;
  }
  if ([decoder containsValueForKey: @"publishing"])
  {
    __publishing = [[decoder decodeObjectForKey: @"publishing"] retain];
    __publishing_isset = YES;
  }
  if ([decoder containsValueForKey: @"published"])
  {
    __published = [decoder decodeBoolForKey: @"published"];
    __published_isset = YES;
  }
  if ([decoder containsValueForKey: @"stack"])
  {
    __stack = [[decoder decodeObjectForKey: @"stack"] retain];
    __stack_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__guid_isset)
  {
    [encoder encodeObject: __guid forKey: @"guid"];
  }
  if (__name_isset)
  {
    [encoder encodeObject: __name forKey: @"name"];
  }
  if (__updateSequenceNum_isset)
  {
    [encoder encodeInt32: __updateSequenceNum forKey: @"updateSequenceNum"];
  }
  if (__defaultNotebook_isset)
  {
    [encoder encodeBool: __defaultNotebook forKey: @"defaultNotebook"];
  }
  if (__serviceCreated_isset)
  {
    [encoder encodeInt64: __serviceCreated forKey: @"serviceCreated"];
  }
  if (__serviceUpdated_isset)
  {
    [encoder encodeInt64: __serviceUpdated forKey: @"serviceUpdated"];
  }
  if (__publishing_isset)
  {
    [encoder encodeObject: __publishing forKey: @"publishing"];
  }
  if (__published_isset)
  {
    [encoder encodeBool: __published forKey: @"published"];
  }
  if (__stack_isset)
  {
    [encoder encodeObject: __stack forKey: @"stack"];
  }
}

- (void) dealloc
{
  [__guid release];
  [__name release];
  [__publishing release];
  [__stack release];
  [super dealloc];
}

- (NSString *) guid {
  return [[__guid retain] autorelease];
}

- (void) setGuid: (NSString *) guid {
  [guid retain];
  [__guid release];
  __guid = guid;
  __guid_isset = YES;
}

- (BOOL) guidIsSet {
  return __guid_isset;
}

- (void) unsetGuid {
  [__guid release];
  __guid = nil;
  __guid_isset = NO;
}

- (NSString *) name {
  return [[__name retain] autorelease];
}

- (void) setName: (NSString *) name {
  [name retain];
  [__name release];
  __name = name;
  __name_isset = YES;
}

- (BOOL) nameIsSet {
  return __name_isset;
}

- (void) unsetName {
  [__name release];
  __name = nil;
  __name_isset = NO;
}

- (int32_t) updateSequenceNum {
  return __updateSequenceNum;
}

- (void) setUpdateSequenceNum: (int32_t) updateSequenceNum {
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
}

- (BOOL) updateSequenceNumIsSet {
  return __updateSequenceNum_isset;
}

- (void) unsetUpdateSequenceNum {
  __updateSequenceNum_isset = NO;
}

- (BOOL) defaultNotebook {
  return __defaultNotebook;
}

- (void) setDefaultNotebook: (BOOL) defaultNotebook {
  __defaultNotebook = defaultNotebook;
  __defaultNotebook_isset = YES;
}

- (BOOL) defaultNotebookIsSet {
  return __defaultNotebook_isset;
}

- (void) unsetDefaultNotebook {
  __defaultNotebook_isset = NO;
}

- (int64_t) serviceCreated {
  return __serviceCreated;
}

- (void) setServiceCreated: (int64_t) serviceCreated {
  __serviceCreated = serviceCreated;
  __serviceCreated_isset = YES;
}

- (BOOL) serviceCreatedIsSet {
  return __serviceCreated_isset;
}

- (void) unsetServiceCreated {
  __serviceCreated_isset = NO;
}

- (int64_t) serviceUpdated {
  return __serviceUpdated;
}

- (void) setServiceUpdated: (int64_t) serviceUpdated {
  __serviceUpdated = serviceUpdated;
  __serviceUpdated_isset = YES;
}

- (BOOL) serviceUpdatedIsSet {
  return __serviceUpdated_isset;
}

- (void) unsetServiceUpdated {
  __serviceUpdated_isset = NO;
}

- (EDAMPublishing *) publishing {
  return [[__publishing retain] autorelease];
}

- (void) setPublishing: (EDAMPublishing *) publishing {
  [publishing retain];
  [__publishing release];
  __publishing = publishing;
  __publishing_isset = YES;
}

- (BOOL) publishingIsSet {
  return __publishing_isset;
}

- (void) unsetPublishing {
  [__publishing release];
  __publishing = nil;
  __publishing_isset = NO;
}

- (BOOL) published {
  return __published;
}

- (void) setPublished: (BOOL) published {
  __published = published;
  __published_isset = YES;
}

- (BOOL) publishedIsSet {
  return __published_isset;
}

- (void) unsetPublished {
  __published_isset = NO;
}

- (NSString *) stack {
  return [[__stack retain] autorelease];
}

- (void) setStack: (NSString *) stack {
  [stack retain];
  [__stack release];
  __stack = stack;
  __stack_isset = YES;
}

- (BOOL) stackIsSet {
  return __stack_isset;
}

- (void) unsetStack {
  [__stack release];
  __stack = nil;
  __stack_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUpdateSequenceNum: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setDefaultNotebook: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setServiceCreated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setServiceUpdated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_STRUCT) {
          EDAMPublishing *fieldValue = [[EDAMPublishing alloc] init];
          [fieldValue read: inProtocol];
          [self setPublishing: fieldValue];
          [fieldValue release];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setPublished: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setStack: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Notebook"];
  if (__guid_isset) {
    if (__guid != nil) {
      [outProtocol writeFieldBeginWithName: @"guid" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __guid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__name_isset) {
    if (__name != nil) {
      [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __name];
      [outProtocol writeFieldEnd];
    }
  }
  if (__updateSequenceNum_isset) {
    [outProtocol writeFieldBeginWithName: @"updateSequenceNum" type: TType_I32 fieldID: 5];
    [outProtocol writeI32: __updateSequenceNum];
    [outProtocol writeFieldEnd];
  }
  if (__defaultNotebook_isset) {
    [outProtocol writeFieldBeginWithName: @"defaultNotebook" type: TType_BOOL fieldID: 6];
    [outProtocol writeBool: __defaultNotebook];
    [outProtocol writeFieldEnd];
  }
  if (__serviceCreated_isset) {
    [outProtocol writeFieldBeginWithName: @"serviceCreated" type: TType_I64 fieldID: 7];
    [outProtocol writeI64: __serviceCreated];
    [outProtocol writeFieldEnd];
  }
  if (__serviceUpdated_isset) {
    [outProtocol writeFieldBeginWithName: @"serviceUpdated" type: TType_I64 fieldID: 8];
    [outProtocol writeI64: __serviceUpdated];
    [outProtocol writeFieldEnd];
  }
  if (__publishing_isset) {
    if (__publishing != nil) {
      [outProtocol writeFieldBeginWithName: @"publishing" type: TType_STRUCT fieldID: 10];
      [__publishing write: outProtocol];
      [outProtocol writeFieldEnd];
    }
  }
  if (__published_isset) {
    [outProtocol writeFieldBeginWithName: @"published" type: TType_BOOL fieldID: 11];
    [outProtocol writeBool: __published];
    [outProtocol writeFieldEnd];
  }
  if (__stack_isset) {
    if (__stack != nil) {
      [outProtocol writeFieldBeginWithName: @"stack" type: TType_STRING fieldID: 12];
      [outProtocol writeString: __stack];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Notebook("];
  [ms appendString: @"guid:"];
  [ms appendFormat: @"\"%@\"", __guid];
  [ms appendString: @",name:"];
  [ms appendFormat: @"\"%@\"", __name];
  [ms appendString: @",updateSequenceNum:"];
  [ms appendFormat: @"%i", __updateSequenceNum];
  [ms appendString: @",defaultNotebook:"];
  [ms appendFormat: @"%i", __defaultNotebook];
  [ms appendString: @",serviceCreated:"];
  [ms appendFormat: @"%qi", __serviceCreated];
  [ms appendString: @",serviceUpdated:"];
  [ms appendFormat: @"%qi", __serviceUpdated];
  [ms appendString: @",publishing:"];
  [ms appendFormat: @"%@", __publishing];
  [ms appendString: @",published:"];
  [ms appendFormat: @"%i", __published];
  [ms appendString: @",stack:"];
  [ms appendFormat: @"\"%@\"", __stack];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMSavedSearch

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic guid;
@dynamic name;
@dynamic query;
@dynamic format;
@dynamic updateSequenceNum;
#endif

- (id) initWithGuid: (EDAMGuid) guid name: (NSString *) name query: (NSString *) query format: (int) format updateSequenceNum: (int32_t) updateSequenceNum
{
  self = [super init];
  __guid = [guid retain];
  __guid_isset = YES;
  __name = [name retain];
  __name_isset = YES;
  __query = [query retain];
  __query_isset = YES;
  __format = format;
  __format_isset = YES;
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"guid"])
  {
    __guid = [[decoder decodeObjectForKey: @"guid"] retain];
    __guid_isset = YES;
  }
  if ([decoder containsValueForKey: @"name"])
  {
    __name = [[decoder decodeObjectForKey: @"name"] retain];
    __name_isset = YES;
  }
  if ([decoder containsValueForKey: @"query"])
  {
    __query = [[decoder decodeObjectForKey: @"query"] retain];
    __query_isset = YES;
  }
  if ([decoder containsValueForKey: @"format"])
  {
    __format = [decoder decodeIntForKey: @"format"];
    __format_isset = YES;
  }
  if ([decoder containsValueForKey: @"updateSequenceNum"])
  {
    __updateSequenceNum = [decoder decodeInt32ForKey: @"updateSequenceNum"];
    __updateSequenceNum_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__guid_isset)
  {
    [encoder encodeObject: __guid forKey: @"guid"];
  }
  if (__name_isset)
  {
    [encoder encodeObject: __name forKey: @"name"];
  }
  if (__query_isset)
  {
    [encoder encodeObject: __query forKey: @"query"];
  }
  if (__format_isset)
  {
    [encoder encodeInt: __format forKey: @"format"];
  }
  if (__updateSequenceNum_isset)
  {
    [encoder encodeInt32: __updateSequenceNum forKey: @"updateSequenceNum"];
  }
}

- (void) dealloc
{
  [__guid release];
  [__name release];
  [__query release];
  [super dealloc];
}

- (NSString *) guid {
  return [[__guid retain] autorelease];
}

- (void) setGuid: (NSString *) guid {
  [guid retain];
  [__guid release];
  __guid = guid;
  __guid_isset = YES;
}

- (BOOL) guidIsSet {
  return __guid_isset;
}

- (void) unsetGuid {
  [__guid release];
  __guid = nil;
  __guid_isset = NO;
}

- (NSString *) name {
  return [[__name retain] autorelease];
}

- (void) setName: (NSString *) name {
  [name retain];
  [__name release];
  __name = name;
  __name_isset = YES;
}

- (BOOL) nameIsSet {
  return __name_isset;
}

- (void) unsetName {
  [__name release];
  __name = nil;
  __name_isset = NO;
}

- (NSString *) query {
  return [[__query retain] autorelease];
}

- (void) setQuery: (NSString *) query {
  [query retain];
  [__query release];
  __query = query;
  __query_isset = YES;
}

- (BOOL) queryIsSet {
  return __query_isset;
}

- (void) unsetQuery {
  [__query release];
  __query = nil;
  __query_isset = NO;
}

- (int) format {
  return __format;
}

- (void) setFormat: (int) format {
  __format = format;
  __format_isset = YES;
}

- (BOOL) formatIsSet {
  return __format_isset;
}

- (void) unsetFormat {
  __format_isset = NO;
}

- (int32_t) updateSequenceNum {
  return __updateSequenceNum;
}

- (void) setUpdateSequenceNum: (int32_t) updateSequenceNum {
  __updateSequenceNum = updateSequenceNum;
  __updateSequenceNum_isset = YES;
}

- (BOOL) updateSequenceNumIsSet {
  return __updateSequenceNum_isset;
}

- (void) unsetUpdateSequenceNum {
  __updateSequenceNum_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setQuery: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_I32) {
          int fieldValue = [inProtocol readI32];
          [self setFormat: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUpdateSequenceNum: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"SavedSearch"];
  if (__guid_isset) {
    if (__guid != nil) {
      [outProtocol writeFieldBeginWithName: @"guid" type: TType_STRING fieldID: 1];
      [outProtocol writeString: __guid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__name_isset) {
    if (__name != nil) {
      [outProtocol writeFieldBeginWithName: @"name" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __name];
      [outProtocol writeFieldEnd];
    }
  }
  if (__query_isset) {
    if (__query != nil) {
      [outProtocol writeFieldBeginWithName: @"query" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __query];
      [outProtocol writeFieldEnd];
    }
  }
  if (__format_isset) {
    [outProtocol writeFieldBeginWithName: @"format" type: TType_I32 fieldID: 4];
    [outProtocol writeI32: __format];
    [outProtocol writeFieldEnd];
  }
  if (__updateSequenceNum_isset) {
    [outProtocol writeFieldBeginWithName: @"updateSequenceNum" type: TType_I32 fieldID: 5];
    [outProtocol writeI32: __updateSequenceNum];
    [outProtocol writeFieldEnd];
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"SavedSearch("];
  [ms appendString: @"guid:"];
  [ms appendFormat: @"\"%@\"", __guid];
  [ms appendString: @",name:"];
  [ms appendFormat: @"\"%@\"", __name];
  [ms appendString: @",query:"];
  [ms appendFormat: @"\"%@\"", __query];
  [ms appendString: @",format:"];
  [ms appendFormat: @"%i", __format];
  [ms appendString: @",updateSequenceNum:"];
  [ms appendFormat: @"%i", __updateSequenceNum];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMAd

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic id;
@dynamic width;
@dynamic height;
@dynamic advertiserName;
@dynamic imageUrl;
@dynamic destinationUrl;
@dynamic displaySeconds;
@dynamic score;
@dynamic image;
@dynamic imageMime;
@dynamic html;
@dynamic displayFrequency;
#endif

- (id) initWithId: (int32_t) id width: (int16_t) width height: (int16_t) height advertiserName: (NSString *) advertiserName imageUrl: (NSString *) imageUrl destinationUrl: (NSString *) destinationUrl displaySeconds: (int16_t) displaySeconds score: (double) score image: (NSData *) image imageMime: (NSString *) imageMime html: (NSString *) html displayFrequency: (double) displayFrequency
{
  self = [super init];
  __id = id;
  __id_isset = YES;
  __width = width;
  __width_isset = YES;
  __height = height;
  __height_isset = YES;
  __advertiserName = [advertiserName retain];
  __advertiserName_isset = YES;
  __imageUrl = [imageUrl retain];
  __imageUrl_isset = YES;
  __destinationUrl = [destinationUrl retain];
  __destinationUrl_isset = YES;
  __displaySeconds = displaySeconds;
  __displaySeconds_isset = YES;
  __score = score;
  __score_isset = YES;
  __image = [image retain];
  __image_isset = YES;
  __imageMime = [imageMime retain];
  __imageMime_isset = YES;
  __html = [html retain];
  __html_isset = YES;
  __displayFrequency = displayFrequency;
  __displayFrequency_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"id"])
  {
    __id = [decoder decodeInt32ForKey: @"id"];
    __id_isset = YES;
  }
  if ([decoder containsValueForKey: @"width"])
  {
    __width = [decoder decodeIntForKey: @"width"];
    __width_isset = YES;
  }
  if ([decoder containsValueForKey: @"height"])
  {
    __height = [decoder decodeIntForKey: @"height"];
    __height_isset = YES;
  }
  if ([decoder containsValueForKey: @"advertiserName"])
  {
    __advertiserName = [[decoder decodeObjectForKey: @"advertiserName"] retain];
    __advertiserName_isset = YES;
  }
  if ([decoder containsValueForKey: @"imageUrl"])
  {
    __imageUrl = [[decoder decodeObjectForKey: @"imageUrl"] retain];
    __imageUrl_isset = YES;
  }
  if ([decoder containsValueForKey: @"destinationUrl"])
  {
    __destinationUrl = [[decoder decodeObjectForKey: @"destinationUrl"] retain];
    __destinationUrl_isset = YES;
  }
  if ([decoder containsValueForKey: @"displaySeconds"])
  {
    __displaySeconds = [decoder decodeIntForKey: @"displaySeconds"];
    __displaySeconds_isset = YES;
  }
  if ([decoder containsValueForKey: @"score"])
  {
    __score = [decoder decodeDoubleForKey: @"score"];
    __score_isset = YES;
  }
  if ([decoder containsValueForKey: @"image"])
  {
    __image = [[decoder decodeObjectForKey: @"image"] retain];
    __image_isset = YES;
  }
  if ([decoder containsValueForKey: @"imageMime"])
  {
    __imageMime = [[decoder decodeObjectForKey: @"imageMime"] retain];
    __imageMime_isset = YES;
  }
  if ([decoder containsValueForKey: @"html"])
  {
    __html = [[decoder decodeObjectForKey: @"html"] retain];
    __html_isset = YES;
  }
  if ([decoder containsValueForKey: @"displayFrequency"])
  {
    __displayFrequency = [decoder decodeDoubleForKey: @"displayFrequency"];
    __displayFrequency_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__id_isset)
  {
    [encoder encodeInt32: __id forKey: @"id"];
  }
  if (__width_isset)
  {
    [encoder encodeInt: __width forKey: @"width"];
  }
  if (__height_isset)
  {
    [encoder encodeInt: __height forKey: @"height"];
  }
  if (__advertiserName_isset)
  {
    [encoder encodeObject: __advertiserName forKey: @"advertiserName"];
  }
  if (__imageUrl_isset)
  {
    [encoder encodeObject: __imageUrl forKey: @"imageUrl"];
  }
  if (__destinationUrl_isset)
  {
    [encoder encodeObject: __destinationUrl forKey: @"destinationUrl"];
  }
  if (__displaySeconds_isset)
  {
    [encoder encodeInt: __displaySeconds forKey: @"displaySeconds"];
  }
  if (__score_isset)
  {
    [encoder encodeDouble: __score forKey: @"score"];
  }
  if (__image_isset)
  {
    [encoder encodeObject: __image forKey: @"image"];
  }
  if (__imageMime_isset)
  {
    [encoder encodeObject: __imageMime forKey: @"imageMime"];
  }
  if (__html_isset)
  {
    [encoder encodeObject: __html forKey: @"html"];
  }
  if (__displayFrequency_isset)
  {
    [encoder encodeDouble: __displayFrequency forKey: @"displayFrequency"];
  }
}

- (void) dealloc
{
  [__advertiserName release];
  [__imageUrl release];
  [__destinationUrl release];
  [__image release];
  [__imageMime release];
  [__html release];
  [super dealloc];
}

- (int32_t) id {
  return __id;
}

- (void) setId: (int32_t) id {
  __id = id;
  __id_isset = YES;
}

- (BOOL) idIsSet {
  return __id_isset;
}

- (void) unsetId {
  __id_isset = NO;
}

- (int16_t) width {
  return __width;
}

- (void) setWidth: (int16_t) width {
  __width = width;
  __width_isset = YES;
}

- (BOOL) widthIsSet {
  return __width_isset;
}

- (void) unsetWidth {
  __width_isset = NO;
}

- (int16_t) height {
  return __height;
}

- (void) setHeight: (int16_t) height {
  __height = height;
  __height_isset = YES;
}

- (BOOL) heightIsSet {
  return __height_isset;
}

- (void) unsetHeight {
  __height_isset = NO;
}

- (NSString *) advertiserName {
  return [[__advertiserName retain] autorelease];
}

- (void) setAdvertiserName: (NSString *) advertiserName {
  [advertiserName retain];
  [__advertiserName release];
  __advertiserName = advertiserName;
  __advertiserName_isset = YES;
}

- (BOOL) advertiserNameIsSet {
  return __advertiserName_isset;
}

- (void) unsetAdvertiserName {
  [__advertiserName release];
  __advertiserName = nil;
  __advertiserName_isset = NO;
}

- (NSString *) imageUrl {
  return [[__imageUrl retain] autorelease];
}

- (void) setImageUrl: (NSString *) imageUrl {
  [imageUrl retain];
  [__imageUrl release];
  __imageUrl = imageUrl;
  __imageUrl_isset = YES;
}

- (BOOL) imageUrlIsSet {
  return __imageUrl_isset;
}

- (void) unsetImageUrl {
  [__imageUrl release];
  __imageUrl = nil;
  __imageUrl_isset = NO;
}

- (NSString *) destinationUrl {
  return [[__destinationUrl retain] autorelease];
}

- (void) setDestinationUrl: (NSString *) destinationUrl {
  [destinationUrl retain];
  [__destinationUrl release];
  __destinationUrl = destinationUrl;
  __destinationUrl_isset = YES;
}

- (BOOL) destinationUrlIsSet {
  return __destinationUrl_isset;
}

- (void) unsetDestinationUrl {
  [__destinationUrl release];
  __destinationUrl = nil;
  __destinationUrl_isset = NO;
}

- (int16_t) displaySeconds {
  return __displaySeconds;
}

- (void) setDisplaySeconds: (int16_t) displaySeconds {
  __displaySeconds = displaySeconds;
  __displaySeconds_isset = YES;
}

- (BOOL) displaySecondsIsSet {
  return __displaySeconds_isset;
}

- (void) unsetDisplaySeconds {
  __displaySeconds_isset = NO;
}

- (double) score {
  return __score;
}

- (void) setScore: (double) score {
  __score = score;
  __score_isset = YES;
}

- (BOOL) scoreIsSet {
  return __score_isset;
}

- (void) unsetScore {
  __score_isset = NO;
}

- (NSData *) image {
  return [[__image retain] autorelease];
}

- (void) setImage: (NSData *) image {
  [image retain];
  [__image release];
  __image = image;
  __image_isset = YES;
}

- (BOOL) imageIsSet {
  return __image_isset;
}

- (void) unsetImage {
  [__image release];
  __image = nil;
  __image_isset = NO;
}

- (NSString *) imageMime {
  return [[__imageMime retain] autorelease];
}

- (void) setImageMime: (NSString *) imageMime {
  [imageMime retain];
  [__imageMime release];
  __imageMime = imageMime;
  __imageMime_isset = YES;
}

- (BOOL) imageMimeIsSet {
  return __imageMime_isset;
}

- (void) unsetImageMime {
  [__imageMime release];
  __imageMime = nil;
  __imageMime_isset = NO;
}

- (NSString *) html {
  return [[__html retain] autorelease];
}

- (void) setHtml: (NSString *) html {
  [html retain];
  [__html release];
  __html = html;
  __html_isset = YES;
}

- (BOOL) htmlIsSet {
  return __html_isset;
}

- (void) unsetHtml {
  [__html release];
  __html = nil;
  __html_isset = NO;
}

- (double) displayFrequency {
  return __displayFrequency;
}

- (void) setDisplayFrequency: (double) displayFrequency {
  __displayFrequency = displayFrequency;
  __displayFrequency_isset = YES;
}

- (BOOL) displayFrequencyIsSet {
  return __displayFrequency_isset;
}

- (void) unsetDisplayFrequency {
  __displayFrequency_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setWidth: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setHeight: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setAdvertiserName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setImageUrl: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setDestinationUrl: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I16) {
          int16_t fieldValue = [inProtocol readI16];
          [self setDisplaySeconds: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setScore: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_STRING) {
          NSData * fieldValue = [inProtocol readBinary];
          [self setImage: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 10:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setImageMime: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 11:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setHtml: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 12:
        if (fieldType == TType_DOUBLE) {
          double fieldValue = [inProtocol readDouble];
          [self setDisplayFrequency: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"Ad"];
  if (__id_isset) {
    [outProtocol writeFieldBeginWithName: @"id" type: TType_I32 fieldID: 1];
    [outProtocol writeI32: __id];
    [outProtocol writeFieldEnd];
  }
  if (__width_isset) {
    [outProtocol writeFieldBeginWithName: @"width" type: TType_I16 fieldID: 2];
    [outProtocol writeI16: __width];
    [outProtocol writeFieldEnd];
  }
  if (__height_isset) {
    [outProtocol writeFieldBeginWithName: @"height" type: TType_I16 fieldID: 3];
    [outProtocol writeI16: __height];
    [outProtocol writeFieldEnd];
  }
  if (__advertiserName_isset) {
    if (__advertiserName != nil) {
      [outProtocol writeFieldBeginWithName: @"advertiserName" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __advertiserName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__imageUrl_isset) {
    if (__imageUrl != nil) {
      [outProtocol writeFieldBeginWithName: @"imageUrl" type: TType_STRING fieldID: 5];
      [outProtocol writeString: __imageUrl];
      [outProtocol writeFieldEnd];
    }
  }
  if (__destinationUrl_isset) {
    if (__destinationUrl != nil) {
      [outProtocol writeFieldBeginWithName: @"destinationUrl" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __destinationUrl];
      [outProtocol writeFieldEnd];
    }
  }
  if (__displaySeconds_isset) {
    [outProtocol writeFieldBeginWithName: @"displaySeconds" type: TType_I16 fieldID: 7];
    [outProtocol writeI16: __displaySeconds];
    [outProtocol writeFieldEnd];
  }
  if (__score_isset) {
    [outProtocol writeFieldBeginWithName: @"score" type: TType_DOUBLE fieldID: 8];
    [outProtocol writeDouble: __score];
    [outProtocol writeFieldEnd];
  }
  if (__image_isset) {
    if (__image != nil) {
      [outProtocol writeFieldBeginWithName: @"image" type: TType_STRING fieldID: 9];
      [outProtocol writeBinary: __image];
      [outProtocol writeFieldEnd];
    }
  }
  if (__imageMime_isset) {
    if (__imageMime != nil) {
      [outProtocol writeFieldBeginWithName: @"imageMime" type: TType_STRING fieldID: 10];
      [outProtocol writeString: __imageMime];
      [outProtocol writeFieldEnd];
    }
  }
  if (__html_isset) {
    if (__html != nil) {
      [outProtocol writeFieldBeginWithName: @"html" type: TType_STRING fieldID: 11];
      [outProtocol writeString: __html];
      [outProtocol writeFieldEnd];
    }
  }
  if (__displayFrequency_isset) {
    [outProtocol writeFieldBeginWithName: @"displayFrequency" type: TType_DOUBLE fieldID: 12];
    [outProtocol writeDouble: __displayFrequency];
    [outProtocol writeFieldEnd];
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"Ad("];
  [ms appendString: @"id:"];
  [ms appendFormat: @"%i", __id];
  [ms appendString: @",width:"];
  [ms appendFormat: @"%hi", __width];
  [ms appendString: @",height:"];
  [ms appendFormat: @"%hi", __height];
  [ms appendString: @",advertiserName:"];
  [ms appendFormat: @"\"%@\"", __advertiserName];
  [ms appendString: @",imageUrl:"];
  [ms appendFormat: @"\"%@\"", __imageUrl];
  [ms appendString: @",destinationUrl:"];
  [ms appendFormat: @"\"%@\"", __destinationUrl];
  [ms appendString: @",displaySeconds:"];
  [ms appendFormat: @"%hi", __displaySeconds];
  [ms appendString: @",score:"];
  [ms appendFormat: @"%f", __score];
  [ms appendString: @",image:"];
  [ms appendFormat: @"\"%@\"", __image];
  [ms appendString: @",imageMime:"];
  [ms appendFormat: @"\"%@\"", __imageMime];
  [ms appendString: @",html:"];
  [ms appendFormat: @"\"%@\"", __html];
  [ms appendString: @",displayFrequency:"];
  [ms appendFormat: @"%f", __displayFrequency];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMSharedNotebook

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic id;
@dynamic userId;
@dynamic notebookGuid;
@dynamic email;
@dynamic notebookModifiable;
@dynamic requireLogin;
@dynamic serviceCreated;
@dynamic shareKey;
@dynamic username;
#endif

- (id) initWithId: (int64_t) id userId: (int32_t) userId notebookGuid: (NSString *) notebookGuid email: (NSString *) email notebookModifiable: (BOOL) notebookModifiable requireLogin: (BOOL) requireLogin serviceCreated: (EDAMTimestamp) serviceCreated shareKey: (NSString *) shareKey username: (NSString *) username
{
  self = [super init];
  __id = id;
  __id_isset = YES;
  __userId = userId;
  __userId_isset = YES;
  __notebookGuid = [notebookGuid retain];
  __notebookGuid_isset = YES;
  __email = [email retain];
  __email_isset = YES;
  __notebookModifiable = notebookModifiable;
  __notebookModifiable_isset = YES;
  __requireLogin = requireLogin;
  __requireLogin_isset = YES;
  __serviceCreated = serviceCreated;
  __serviceCreated_isset = YES;
  __shareKey = [shareKey retain];
  __shareKey_isset = YES;
  __username = [username retain];
  __username_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"id"])
  {
    __id = [decoder decodeInt64ForKey: @"id"];
    __id_isset = YES;
  }
  if ([decoder containsValueForKey: @"userId"])
  {
    __userId = [decoder decodeInt32ForKey: @"userId"];
    __userId_isset = YES;
  }
  if ([decoder containsValueForKey: @"notebookGuid"])
  {
    __notebookGuid = [[decoder decodeObjectForKey: @"notebookGuid"] retain];
    __notebookGuid_isset = YES;
  }
  if ([decoder containsValueForKey: @"email"])
  {
    __email = [[decoder decodeObjectForKey: @"email"] retain];
    __email_isset = YES;
  }
  if ([decoder containsValueForKey: @"notebookModifiable"])
  {
    __notebookModifiable = [decoder decodeBoolForKey: @"notebookModifiable"];
    __notebookModifiable_isset = YES;
  }
  if ([decoder containsValueForKey: @"requireLogin"])
  {
    __requireLogin = [decoder decodeBoolForKey: @"requireLogin"];
    __requireLogin_isset = YES;
  }
  if ([decoder containsValueForKey: @"serviceCreated"])
  {
    __serviceCreated = [decoder decodeInt64ForKey: @"serviceCreated"];
    __serviceCreated_isset = YES;
  }
  if ([decoder containsValueForKey: @"shareKey"])
  {
    __shareKey = [[decoder decodeObjectForKey: @"shareKey"] retain];
    __shareKey_isset = YES;
  }
  if ([decoder containsValueForKey: @"username"])
  {
    __username = [[decoder decodeObjectForKey: @"username"] retain];
    __username_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__id_isset)
  {
    [encoder encodeInt64: __id forKey: @"id"];
  }
  if (__userId_isset)
  {
    [encoder encodeInt32: __userId forKey: @"userId"];
  }
  if (__notebookGuid_isset)
  {
    [encoder encodeObject: __notebookGuid forKey: @"notebookGuid"];
  }
  if (__email_isset)
  {
    [encoder encodeObject: __email forKey: @"email"];
  }
  if (__notebookModifiable_isset)
  {
    [encoder encodeBool: __notebookModifiable forKey: @"notebookModifiable"];
  }
  if (__requireLogin_isset)
  {
    [encoder encodeBool: __requireLogin forKey: @"requireLogin"];
  }
  if (__serviceCreated_isset)
  {
    [encoder encodeInt64: __serviceCreated forKey: @"serviceCreated"];
  }
  if (__shareKey_isset)
  {
    [encoder encodeObject: __shareKey forKey: @"shareKey"];
  }
  if (__username_isset)
  {
    [encoder encodeObject: __username forKey: @"username"];
  }
}

- (void) dealloc
{
  [__notebookGuid release];
  [__email release];
  [__shareKey release];
  [__username release];
  [super dealloc];
}

- (int64_t) id {
  return __id;
}

- (void) setId: (int64_t) id {
  __id = id;
  __id_isset = YES;
}

- (BOOL) idIsSet {
  return __id_isset;
}

- (void) unsetId {
  __id_isset = NO;
}

- (int32_t) userId {
  return __userId;
}

- (void) setUserId: (int32_t) userId {
  __userId = userId;
  __userId_isset = YES;
}

- (BOOL) userIdIsSet {
  return __userId_isset;
}

- (void) unsetUserId {
  __userId_isset = NO;
}

- (NSString *) notebookGuid {
  return [[__notebookGuid retain] autorelease];
}

- (void) setNotebookGuid: (NSString *) notebookGuid {
  [notebookGuid retain];
  [__notebookGuid release];
  __notebookGuid = notebookGuid;
  __notebookGuid_isset = YES;
}

- (BOOL) notebookGuidIsSet {
  return __notebookGuid_isset;
}

- (void) unsetNotebookGuid {
  [__notebookGuid release];
  __notebookGuid = nil;
  __notebookGuid_isset = NO;
}

- (NSString *) email {
  return [[__email retain] autorelease];
}

- (void) setEmail: (NSString *) email {
  [email retain];
  [__email release];
  __email = email;
  __email_isset = YES;
}

- (BOOL) emailIsSet {
  return __email_isset;
}

- (void) unsetEmail {
  [__email release];
  __email = nil;
  __email_isset = NO;
}

- (BOOL) notebookModifiable {
  return __notebookModifiable;
}

- (void) setNotebookModifiable: (BOOL) notebookModifiable {
  __notebookModifiable = notebookModifiable;
  __notebookModifiable_isset = YES;
}

- (BOOL) notebookModifiableIsSet {
  return __notebookModifiable_isset;
}

- (void) unsetNotebookModifiable {
  __notebookModifiable_isset = NO;
}

- (BOOL) requireLogin {
  return __requireLogin;
}

- (void) setRequireLogin: (BOOL) requireLogin {
  __requireLogin = requireLogin;
  __requireLogin_isset = YES;
}

- (BOOL) requireLoginIsSet {
  return __requireLogin_isset;
}

- (void) unsetRequireLogin {
  __requireLogin_isset = NO;
}

- (int64_t) serviceCreated {
  return __serviceCreated;
}

- (void) setServiceCreated: (int64_t) serviceCreated {
  __serviceCreated = serviceCreated;
  __serviceCreated_isset = YES;
}

- (BOOL) serviceCreatedIsSet {
  return __serviceCreated_isset;
}

- (void) unsetServiceCreated {
  __serviceCreated_isset = NO;
}

- (NSString *) shareKey {
  return [[__shareKey retain] autorelease];
}

- (void) setShareKey: (NSString *) shareKey {
  [shareKey retain];
  [__shareKey release];
  __shareKey = shareKey;
  __shareKey_isset = YES;
}

- (BOOL) shareKeyIsSet {
  return __shareKey_isset;
}

- (void) unsetShareKey {
  [__shareKey release];
  __shareKey = nil;
  __shareKey_isset = NO;
}

- (NSString *) username {
  return [[__username retain] autorelease];
}

- (void) setUsername: (NSString *) username {
  [username retain];
  [__username release];
  __username = username;
  __username_isset = YES;
}

- (BOOL) usernameIsSet {
  return __username_isset;
}

- (void) unsetUsername {
  [__username release];
  __username = nil;
  __username_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_I32) {
          int32_t fieldValue = [inProtocol readI32];
          [self setUserId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setNotebookGuid: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setEmail: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setNotebookModifiable: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_BOOL) {
          BOOL fieldValue = [inProtocol readBool];
          [self setRequireLogin: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 7:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setServiceCreated: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 8:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setShareKey: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 9:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setUsername: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"SharedNotebook"];
  if (__id_isset) {
    [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: 1];
    [outProtocol writeI64: __id];
    [outProtocol writeFieldEnd];
  }
  if (__userId_isset) {
    [outProtocol writeFieldBeginWithName: @"userId" type: TType_I32 fieldID: 2];
    [outProtocol writeI32: __userId];
    [outProtocol writeFieldEnd];
  }
  if (__notebookGuid_isset) {
    if (__notebookGuid != nil) {
      [outProtocol writeFieldBeginWithName: @"notebookGuid" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __notebookGuid];
      [outProtocol writeFieldEnd];
    }
  }
  if (__email_isset) {
    if (__email != nil) {
      [outProtocol writeFieldBeginWithName: @"email" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __email];
      [outProtocol writeFieldEnd];
    }
  }
  if (__notebookModifiable_isset) {
    [outProtocol writeFieldBeginWithName: @"notebookModifiable" type: TType_BOOL fieldID: 5];
    [outProtocol writeBool: __notebookModifiable];
    [outProtocol writeFieldEnd];
  }
  if (__requireLogin_isset) {
    [outProtocol writeFieldBeginWithName: @"requireLogin" type: TType_BOOL fieldID: 6];
    [outProtocol writeBool: __requireLogin];
    [outProtocol writeFieldEnd];
  }
  if (__serviceCreated_isset) {
    [outProtocol writeFieldBeginWithName: @"serviceCreated" type: TType_I64 fieldID: 7];
    [outProtocol writeI64: __serviceCreated];
    [outProtocol writeFieldEnd];
  }
  if (__shareKey_isset) {
    if (__shareKey != nil) {
      [outProtocol writeFieldBeginWithName: @"shareKey" type: TType_STRING fieldID: 8];
      [outProtocol writeString: __shareKey];
      [outProtocol writeFieldEnd];
    }
  }
  if (__username_isset) {
    if (__username != nil) {
      [outProtocol writeFieldBeginWithName: @"username" type: TType_STRING fieldID: 9];
      [outProtocol writeString: __username];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"SharedNotebook("];
  [ms appendString: @"id:"];
  [ms appendFormat: @"%qi", __id];
  [ms appendString: @",userId:"];
  [ms appendFormat: @"%i", __userId];
  [ms appendString: @",notebookGuid:"];
  [ms appendFormat: @"\"%@\"", __notebookGuid];
  [ms appendString: @",email:"];
  [ms appendFormat: @"\"%@\"", __email];
  [ms appendString: @",notebookModifiable:"];
  [ms appendFormat: @"%i", __notebookModifiable];
  [ms appendString: @",requireLogin:"];
  [ms appendFormat: @"%i", __requireLogin];
  [ms appendString: @",serviceCreated:"];
  [ms appendFormat: @"%qi", __serviceCreated];
  [ms appendString: @",shareKey:"];
  [ms appendFormat: @"\"%@\"", __shareKey];
  [ms appendString: @",username:"];
  [ms appendFormat: @"\"%@\"", __username];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

@implementation EDAMLinkedNotebook

#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
@dynamic id;
@dynamic shareName;
@dynamic username;
@dynamic shardId;
@dynamic shareKey;
@dynamic uri;
#endif

- (id) initWithId: (int64_t) id shareName: (NSString *) shareName username: (NSString *) username shardId: (NSString *) shardId shareKey: (NSString *) shareKey uri: (NSString *) uri
{
  self = [super init];
  __id = id;
  __id_isset = YES;
  __shareName = [shareName retain];
  __shareName_isset = YES;
  __username = [username retain];
  __username_isset = YES;
  __shardId = [shardId retain];
  __shardId_isset = YES;
  __shareKey = [shareKey retain];
  __shareKey_isset = YES;
  __uri = [uri retain];
  __uri_isset = YES;
  return self;
}

- (id) initWithCoder: (NSCoder *) decoder
{
  self = [super init];
  if ([decoder containsValueForKey: @"id"])
  {
    __id = [decoder decodeInt64ForKey: @"id"];
    __id_isset = YES;
  }
  if ([decoder containsValueForKey: @"shareName"])
  {
    __shareName = [[decoder decodeObjectForKey: @"shareName"] retain];
    __shareName_isset = YES;
  }
  if ([decoder containsValueForKey: @"username"])
  {
    __username = [[decoder decodeObjectForKey: @"username"] retain];
    __username_isset = YES;
  }
  if ([decoder containsValueForKey: @"shardId"])
  {
    __shardId = [[decoder decodeObjectForKey: @"shardId"] retain];
    __shardId_isset = YES;
  }
  if ([decoder containsValueForKey: @"shareKey"])
  {
    __shareKey = [[decoder decodeObjectForKey: @"shareKey"] retain];
    __shareKey_isset = YES;
  }
  if ([decoder containsValueForKey: @"uri"])
  {
    __uri = [[decoder decodeObjectForKey: @"uri"] retain];
    __uri_isset = YES;
  }
  return self;
}

- (void) encodeWithCoder: (NSCoder *) encoder
{
  if (__id_isset)
  {
    [encoder encodeInt64: __id forKey: @"id"];
  }
  if (__shareName_isset)
  {
    [encoder encodeObject: __shareName forKey: @"shareName"];
  }
  if (__username_isset)
  {
    [encoder encodeObject: __username forKey: @"username"];
  }
  if (__shardId_isset)
  {
    [encoder encodeObject: __shardId forKey: @"shardId"];
  }
  if (__shareKey_isset)
  {
    [encoder encodeObject: __shareKey forKey: @"shareKey"];
  }
  if (__uri_isset)
  {
    [encoder encodeObject: __uri forKey: @"uri"];
  }
}

- (void) dealloc
{
  [__shareName release];
  [__username release];
  [__shardId release];
  [__shareKey release];
  [__uri release];
  [super dealloc];
}

- (int64_t) id {
  return __id;
}

- (void) setId: (int64_t) id {
  __id = id;
  __id_isset = YES;
}

- (BOOL) idIsSet {
  return __id_isset;
}

- (void) unsetId {
  __id_isset = NO;
}

- (NSString *) shareName {
  return [[__shareName retain] autorelease];
}

- (void) setShareName: (NSString *) shareName {
  [shareName retain];
  [__shareName release];
  __shareName = shareName;
  __shareName_isset = YES;
}

- (BOOL) shareNameIsSet {
  return __shareName_isset;
}

- (void) unsetShareName {
  [__shareName release];
  __shareName = nil;
  __shareName_isset = NO;
}

- (NSString *) username {
  return [[__username retain] autorelease];
}

- (void) setUsername: (NSString *) username {
  [username retain];
  [__username release];
  __username = username;
  __username_isset = YES;
}

- (BOOL) usernameIsSet {
  return __username_isset;
}

- (void) unsetUsername {
  [__username release];
  __username = nil;
  __username_isset = NO;
}

- (NSString *) shardId {
  return [[__shardId retain] autorelease];
}

- (void) setShardId: (NSString *) shardId {
  [shardId retain];
  [__shardId release];
  __shardId = shardId;
  __shardId_isset = YES;
}

- (BOOL) shardIdIsSet {
  return __shardId_isset;
}

- (void) unsetShardId {
  [__shardId release];
  __shardId = nil;
  __shardId_isset = NO;
}

- (NSString *) shareKey {
  return [[__shareKey retain] autorelease];
}

- (void) setShareKey: (NSString *) shareKey {
  [shareKey retain];
  [__shareKey release];
  __shareKey = shareKey;
  __shareKey_isset = YES;
}

- (BOOL) shareKeyIsSet {
  return __shareKey_isset;
}

- (void) unsetShareKey {
  [__shareKey release];
  __shareKey = nil;
  __shareKey_isset = NO;
}

- (NSString *) uri {
  return [[__uri retain] autorelease];
}

- (void) setUri: (NSString *) uri {
  [uri retain];
  [__uri release];
  __uri = uri;
  __uri_isset = YES;
}

- (BOOL) uriIsSet {
  return __uri_isset;
}

- (void) unsetUri {
  [__uri release];
  __uri = nil;
  __uri_isset = NO;
}

- (void) read: (id <TProtocol>) inProtocol
{
  NSString * fieldName;
  int fieldType;
  int fieldID;

  [inProtocol readStructBeginReturningName: NULL];
  while (true)
  {
    [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
    if (fieldType == TType_STOP) { 
      break;
    }
    switch (fieldID)
    {
      case 1:
        if (fieldType == TType_I64) {
          int64_t fieldValue = [inProtocol readI64];
          [self setId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 2:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setShareName: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 3:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setUsername: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 4:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setShardId: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 5:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setShareKey: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      case 6:
        if (fieldType == TType_STRING) {
          NSString * fieldValue = [inProtocol readString];
          [self setUri: fieldValue];
        } else { 
          [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        }
        break;
      default:
        [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
        break;
    }
    [inProtocol readFieldEnd];
  }
  [inProtocol readStructEnd];
}

- (void) write: (id <TProtocol>) outProtocol {
  [outProtocol writeStructBeginWithName: @"LinkedNotebook"];
  if (__id_isset) {
    [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: 1];
    [outProtocol writeI64: __id];
    [outProtocol writeFieldEnd];
  }
  if (__shareName_isset) {
    if (__shareName != nil) {
      [outProtocol writeFieldBeginWithName: @"shareName" type: TType_STRING fieldID: 2];
      [outProtocol writeString: __shareName];
      [outProtocol writeFieldEnd];
    }
  }
  if (__username_isset) {
    if (__username != nil) {
      [outProtocol writeFieldBeginWithName: @"username" type: TType_STRING fieldID: 3];
      [outProtocol writeString: __username];
      [outProtocol writeFieldEnd];
    }
  }
  if (__shardId_isset) {
    if (__shardId != nil) {
      [outProtocol writeFieldBeginWithName: @"shardId" type: TType_STRING fieldID: 4];
      [outProtocol writeString: __shardId];
      [outProtocol writeFieldEnd];
    }
  }
  if (__shareKey_isset) {
    if (__shareKey != nil) {
      [outProtocol writeFieldBeginWithName: @"shareKey" type: TType_STRING fieldID: 5];
      [outProtocol writeString: __shareKey];
      [outProtocol writeFieldEnd];
    }
  }
  if (__uri_isset) {
    if (__uri != nil) {
      [outProtocol writeFieldBeginWithName: @"uri" type: TType_STRING fieldID: 6];
      [outProtocol writeString: __uri];
      [outProtocol writeFieldEnd];
    }
  }
  [outProtocol writeFieldStop];
  [outProtocol writeStructEnd];
}

- (NSString *) description {
  NSMutableString * ms = [NSMutableString stringWithString: @"LinkedNotebook("];
  [ms appendString: @"id:"];
  [ms appendFormat: @"%qi", __id];
  [ms appendString: @",shareName:"];
  [ms appendFormat: @"\"%@\"", __shareName];
  [ms appendString: @",username:"];
  [ms appendFormat: @"\"%@\"", __username];
  [ms appendString: @",shardId:"];
  [ms appendFormat: @"\"%@\"", __shardId];
  [ms appendString: @",shareKey:"];
  [ms appendFormat: @"\"%@\"", __shareKey];
  [ms appendString: @",uri:"];
  [ms appendFormat: @"\"%@\"", __uri];
  [ms appendString: @")"];
  return [NSString stringWithString: ms];
}

@end

