/*
 * Copyright (c) 2015 by Evernote Corporation, All rights reserved.
 *
 * Use of the source code and binary libraries included in this package
 * is permitted under the following terms:
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

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

#import <Foundation/Foundation.h>

#import "ENTProtocol.h"
#import "ENTException.h"
#import "FATObject.h"
#import "EDAMUserStore.h"
#import "EDAMTypes.h"
#import "EDAMErrors.h"
#import "EDAMLimits.h"

#import "EDAMNoteStore.h"

@implementation EDAMSyncState

+ (NSString *) structName {
  return @"SyncState";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I64 optional:NO name:@"currentTime"],
        [FATField fieldWithIndex:2 type:TType_I64 optional:NO name:@"fullSyncBefore"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"updateCount"],
        [FATField fieldWithIndex:4 type:TType_I64 optional:YES name:@"uploaded"],
        [FATField fieldWithIndex:5 type:TType_I64 optional:YES name:@"userLastUpdated"],
        [FATField fieldWithIndex:6 type:TType_I64 optional:YES name:@"userMaxMessageEventId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMPreferences

+ (NSString *) structName {
  return @"Preferences";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"updateSequenceNum"],
        [FATField fieldWithIndex:2 type:TType_MAP optional:YES name:@"preferences" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSyncChunk

+ (NSString *) structName {
  return @"SyncChunk";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I64 optional:NO name:@"currentTime"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"chunkHighUSN"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"updateCount"],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"notes" valueType:TType_STRUCT valueClass:[EDAMNote class]],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"notebooks" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
        [FATField fieldWithIndex:6 type:TType_LIST optional:YES name:@"tags" valueType:TType_STRUCT valueClass:[EDAMTag class]],
        [FATField fieldWithIndex:7 type:TType_LIST optional:YES name:@"searches" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]],
        [FATField fieldWithIndex:8 type:TType_LIST optional:YES name:@"resources" valueType:TType_STRUCT valueClass:[EDAMResource class]],
        [FATField fieldWithIndex:9 type:TType_LIST optional:YES name:@"expungedNotes" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:10 type:TType_LIST optional:YES name:@"expungedNotebooks" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:11 type:TType_LIST optional:YES name:@"expungedTags" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:12 type:TType_LIST optional:YES name:@"expungedSearches" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:13 type:TType_LIST optional:YES name:@"linkedNotebooks" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]],
        [FATField fieldWithIndex:14 type:TType_LIST optional:YES name:@"expungedLinkedNotebooks" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:15 type:TType_STRUCT optional:YES name:@"preferences" valueType:TType_STRUCT valueClass:[EDAMPreferences class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSyncChunkFilter

+ (NSString *) structName {
  return @"SyncChunkFilter";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_BOOL optional:YES name:@"includeNotes"],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"includeNoteResources"],
        [FATField fieldWithIndex:3 type:TType_BOOL optional:YES name:@"includeNoteAttributes"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"includeNotebooks"],
        [FATField fieldWithIndex:5 type:TType_BOOL optional:YES name:@"includeTags"],
        [FATField fieldWithIndex:6 type:TType_BOOL optional:YES name:@"includeSearches"],
        [FATField fieldWithIndex:7 type:TType_BOOL optional:YES name:@"includeResources"],
        [FATField fieldWithIndex:8 type:TType_BOOL optional:YES name:@"includeLinkedNotebooks"],
        [FATField fieldWithIndex:9 type:TType_BOOL optional:YES name:@"includeExpunged"],
        [FATField fieldWithIndex:10 type:TType_BOOL optional:YES name:@"includeNoteApplicationDataFullMap"],
        [FATField fieldWithIndex:12 type:TType_BOOL optional:YES name:@"includeResourceApplicationDataFullMap"],
        [FATField fieldWithIndex:13 type:TType_BOOL optional:YES name:@"includeNoteResourceApplicationDataFullMap"],
        [FATField fieldWithIndex:14 type:TType_BOOL optional:YES name:@"includePreferences"],
        [FATField fieldWithIndex:17 type:TType_BOOL optional:YES name:@"includedSharedNotes"],
        [FATField fieldWithIndex:16 type:TType_BOOL optional:YES name:@"omitSharedNotebooks"],
        [FATField fieldWithIndex:11 type:TType_STRING optional:YES name:@"requireNoteContentClass"],
        [FATField fieldWithIndex:15 type:TType_SET optional:YES name:@"notebookGuids" valueType:TType_STRING valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteFilter

+ (NSString *) structName {
  return @"NoteFilter";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"order"],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"ascending"],
        [FATField fieldWithIndex:3 type:TType_STRING optional:YES name:@"words"],
        [FATField fieldWithIndex:4 type:TType_STRING optional:YES name:@"notebookGuid"],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"tagGuids" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:6 type:TType_STRING optional:YES name:@"timeZone"],
        [FATField fieldWithIndex:7 type:TType_BOOL optional:YES name:@"inactive"],
        [FATField fieldWithIndex:8 type:TType_STRING optional:YES name:@"emphasized"],
        [FATField fieldWithIndex:9 type:TType_BOOL optional:YES name:@"includeAllReadableNotebooks"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteList

+ (NSString *) structName {
  return @"NoteList";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"startIndex"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"totalNotes"],
        [FATField fieldWithIndex:3 type:TType_LIST optional:NO name:@"notes" valueType:TType_STRUCT valueClass:[EDAMNote class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"stoppedWords" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"searchedWords" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:6 type:TType_I32 optional:YES name:@"updateCount"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteMetadata

+ (NSString *) structName {
  return @"NoteMetadata";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"guid"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"title"],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"contentLength"],
        [FATField fieldWithIndex:6 type:TType_I64 optional:YES name:@"created"],
        [FATField fieldWithIndex:7 type:TType_I64 optional:YES name:@"updated"],
        [FATField fieldWithIndex:8 type:TType_I64 optional:YES name:@"deleted"],
        [FATField fieldWithIndex:10 type:TType_I32 optional:YES name:@"updateSequenceNum"],
        [FATField fieldWithIndex:11 type:TType_STRING optional:YES name:@"notebookGuid"],
        [FATField fieldWithIndex:12 type:TType_LIST optional:YES name:@"tagGuids" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:14 type:TType_STRUCT optional:YES name:@"attributes" valueType:TType_STRUCT valueClass:[EDAMNoteAttributes class]],
        [FATField fieldWithIndex:20 type:TType_STRING optional:YES name:@"largestResourceMime"],
        [FATField fieldWithIndex:21 type:TType_I32 optional:YES name:@"largestResourceSize"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNotesMetadataList

+ (NSString *) structName {
  return @"NotesMetadataList";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"startIndex"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"totalNotes"],
        [FATField fieldWithIndex:3 type:TType_LIST optional:NO name:@"notes" valueType:TType_STRUCT valueClass:[EDAMNoteMetadata class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"stoppedWords" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"searchedWords" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:6 type:TType_I32 optional:YES name:@"updateCount"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNotesMetadataResultSpec

+ (NSString *) structName {
  return @"NotesMetadataResultSpec";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"includeTitle"],
        [FATField fieldWithIndex:5 type:TType_BOOL optional:YES name:@"includeContentLength"],
        [FATField fieldWithIndex:6 type:TType_BOOL optional:YES name:@"includeCreated"],
        [FATField fieldWithIndex:7 type:TType_BOOL optional:YES name:@"includeUpdated"],
        [FATField fieldWithIndex:8 type:TType_BOOL optional:YES name:@"includeDeleted"],
        [FATField fieldWithIndex:10 type:TType_BOOL optional:YES name:@"includeUpdateSequenceNum"],
        [FATField fieldWithIndex:11 type:TType_BOOL optional:YES name:@"includeNotebookGuid"],
        [FATField fieldWithIndex:12 type:TType_BOOL optional:YES name:@"includeTagGuids"],
        [FATField fieldWithIndex:14 type:TType_BOOL optional:YES name:@"includeAttributes"],
        [FATField fieldWithIndex:20 type:TType_BOOL optional:YES name:@"includeLargestResourceMime"],
        [FATField fieldWithIndex:21 type:TType_BOOL optional:YES name:@"includeLargestResourceSize"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteCollectionCounts

+ (NSString *) structName {
  return @"NoteCollectionCounts";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_MAP optional:YES name:@"notebookCounts" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:2 type:TType_MAP optional:YES name:@"tagCounts" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"trashCount"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteResultSpec

+ (NSString *) structName {
  return @"NoteResultSpec";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_BOOL optional:YES name:@"includeContent"],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"includeResourcesData"],
        [FATField fieldWithIndex:3 type:TType_BOOL optional:YES name:@"includeResourcesRecognition"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"includeResourcesAlternateData"],
        [FATField fieldWithIndex:5 type:TType_BOOL optional:YES name:@"includeSharedNotes"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMAdImpressions

+ (NSString *) structName {
  return @"AdImpressions";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"adId"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"impressionCount"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"impressionTime"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMAdParameters

+ (NSString *) structName {
  return @"AdParameters";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"clientLanguage"],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"impressions" valueType:TType_STRUCT valueClass:[EDAMAdImpressions class]],
        [FATField fieldWithIndex:5 type:TType_BOOL optional:YES name:@"supportHtml"],
        [FATField fieldWithIndex:6 type:TType_MAP optional:YES name:@"clientProperties" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteEmailParameters

+ (NSString *) structName {
  return @"NoteEmailParameters";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"guid"],
        [FATField fieldWithIndex:2 type:TType_STRUCT optional:YES name:@"note" valueType:TType_STRUCT valueClass:[EDAMNote class]],
        [FATField fieldWithIndex:3 type:TType_LIST optional:YES name:@"toAddresses" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"ccAddresses" valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:5 type:TType_STRING optional:YES name:@"subject"],
        [FATField fieldWithIndex:6 type:TType_STRING optional:YES name:@"message"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteVersionId

+ (NSString *) structName {
  return @"NoteVersionId";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"updateSequenceNum"],
        [FATField fieldWithIndex:2 type:TType_I64 optional:NO name:@"updated"],
        [FATField fieldWithIndex:3 type:TType_I64 optional:NO name:@"saved"],
        [FATField fieldWithIndex:4 type:TType_STRING optional:NO name:@"title"],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"lastEditorId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMClientUsageMetrics

+ (NSString *) structName {
  return @"ClientUsageMetrics";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"sessions"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"subjectConsumerKey"],
        [FATField fieldWithIndex:3 type:TType_STRING optional:YES name:@"subjectConsumerSecret"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMRelatedQuery

+ (NSString *) structName {
  return @"RelatedQuery";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"noteGuid"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"plainText"],
        [FATField fieldWithIndex:3 type:TType_STRUCT optional:YES name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]],
        [FATField fieldWithIndex:4 type:TType_STRING optional:YES name:@"referenceUri"],
        [FATField fieldWithIndex:5 type:TType_STRING optional:YES name:@"context"],
        [FATField fieldWithIndex:6 type:TType_STRING optional:YES name:@"cacheKey"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMRelatedResult

+ (NSString *) structName {
  return @"RelatedResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"notes" valueType:TType_STRUCT valueClass:[EDAMNote class]],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"notebooks" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
        [FATField fieldWithIndex:3 type:TType_LIST optional:YES name:@"tags" valueType:TType_STRUCT valueClass:[EDAMTag class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"containingNotebooks" valueType:TType_STRUCT valueClass:[EDAMNotebookDescriptor class]],
        [FATField fieldWithIndex:5 type:TType_STRING optional:YES name:@"debugInfo"],
        [FATField fieldWithIndex:6 type:TType_LIST optional:YES name:@"experts" valueType:TType_STRUCT valueClass:[EDAMUserProfile class]],
        [FATField fieldWithIndex:7 type:TType_LIST optional:YES name:@"relatedContent" valueType:TType_STRUCT valueClass:[EDAMRelatedContent class]],
        [FATField fieldWithIndex:8 type:TType_STRING optional:YES name:@"cacheKey"],
        [FATField fieldWithIndex:9 type:TType_I32 optional:YES name:@"cacheExpires"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMRelatedResultSpec

+ (NSString *) structName {
  return @"RelatedResultSpec";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"maxNotes"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"maxNotebooks"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"maxTags"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"writableNotebooksOnly"],
        [FATField fieldWithIndex:5 type:TType_BOOL optional:YES name:@"includeContainingNotebooks"],
        [FATField fieldWithIndex:6 type:TType_BOOL optional:YES name:@"includeDebugInfo"],
        [FATField fieldWithIndex:7 type:TType_I32 optional:YES name:@"maxExperts"],
        [FATField fieldWithIndex:8 type:TType_I32 optional:YES name:@"maxRelatedContent"],
        [FATField fieldWithIndex:9 type:TType_SET optional:YES name:@"relatedContentTypes" valueType:TType_I32 valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSearchSuggestionQuery

+ (NSString *) structName {
  return @"SearchSuggestionQuery";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"prefix"],
        [FATField fieldWithIndex:2 type:TType_STRUCT optional:YES name:@"contextFilter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSearchSuggestionResultSpec

+ (NSString *) structName {
  return @"SearchSuggestionResultSpec";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"maxTypeAheadSuggestions"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSearchSuggestion

+ (NSString *) structName {
  return @"SearchSuggestion";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"suggestionText"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSearchSuggestionResult

+ (NSString *) structName {
  return @"SearchSuggestionResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"typeAheadSuggestions" valueType:TType_STRUCT valueClass:[EDAMSearchSuggestion class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMTimeZone

+ (NSString *) structName {
  return @"TimeZone";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"id"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"displayName"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"rawUTCOffsetMillis"],
        [FATField fieldWithIndex:4 type:TType_I32 optional:YES name:@"dstSavingsAdjustmentMillis"],
        [FATField fieldWithIndex:5 type:TType_I64 optional:YES name:@"nextEnterDaylightSavings"],
        [FATField fieldWithIndex:6 type:TType_I64 optional:YES name:@"nextLeaveDaylightSavings"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMTimeZoneSpec

+ (NSString *) structName {
  return @"TimeZoneSpec";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"id"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"rawUTCOffsetMillis"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"dstSavingsAdjustmentMillis"],
        [FATField fieldWithIndex:4 type:TType_I64 optional:YES name:@"nextEnterDaylightSavings"],
        [FATField fieldWithIndex:5 type:TType_I64 optional:YES name:@"nextLeaveDaylightSavings"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMContactsQuery

+ (NSString *) structName {
  return @"ContactsQuery";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"maxEntries"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"prefix"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMBusinessQuery

+ (NSString *) structName {
  return @"BusinessQuery";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRUCT optional:YES name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"numExperts"],
        [FATField fieldWithIndex:3 type:TType_BOOL optional:YES name:@"includeNotebooks"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"includeNotesCounts"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMBusinessQueryResult

+ (NSString *) structName {
  return @"BusinessQueryResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"totalNotebooks"],
        [FATField fieldWithIndex:2 type:TType_MAP optional:YES name:@"totalNotesByNotebook" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
        [FATField fieldWithIndex:3 type:TType_LIST optional:YES name:@"experts" valueType:TType_STRUCT valueClass:[EDAMUserProfile class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"matchingNotebooks" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteLockStatus

+ (NSString *) structName {
  return @"NoteLockStatus";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"noteUpdateSequenceNumber"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"lockHolderUserId"],
        [FATField fieldWithIndex:3 type:TType_I64 optional:YES name:@"lockRenewBy"],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"viewingUserIds" valueType:TType_I32 valueClass:NULL],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"viewIdleExpiration"],
        [FATField fieldWithIndex:6 type:TType_MAP optional:YES name:@"unknownUsers" keyType:TType_I32 keyClass:NULL valueType:TType_I32 valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMUpdateNoteIfUsnMatchesResult

+ (NSString *) structName {
  return @"UpdateNoteIfUsnMatchesResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRUCT optional:YES name:@"note" valueType:TType_STRUCT valueClass:[EDAMNote class]],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"updated"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMShareRelationshipRestrictions

+ (NSString *) structName {
  return @"ShareRelationshipRestrictions";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_BOOL optional:YES name:@"noSetReadOnly"],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"noSetReadPlusActivity"],
        [FATField fieldWithIndex:3 type:TType_BOOL optional:YES name:@"noSetModify"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"noSetFullAccess"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMInvitationShareRelationship

+ (NSString *) structName {
  return @"InvitationShareRelationship";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"displayName"],
        [FATField fieldWithIndex:2 type:TType_STRUCT optional:YES name:@"recipientUserIdentity" valueType:TType_STRUCT valueClass:[EDAMUserIdentity class]],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"privilege"],
        [FATField fieldWithIndex:4 type:TType_BOOL optional:YES name:@"allowPreview"],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"sharerUserId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMMemberShareRelationship

+ (NSString *) structName {
  return @"MemberShareRelationship";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"displayName"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"recipientUserId"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"bestPrivilege"],
        [FATField fieldWithIndex:4 type:TType_I32 optional:YES name:@"individualPrivilege"],
        [FATField fieldWithIndex:5 type:TType_STRUCT optional:YES name:@"restrictions" valueType:TType_STRUCT valueClass:[EDAMShareRelationshipRestrictions class]],
        [FATField fieldWithIndex:6 type:TType_I32 optional:YES name:@"sharerUserId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMShareRelationships

+ (NSString *) structName {
  return @"ShareRelationships";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"invitations" valueType:TType_STRUCT valueClass:[EDAMInvitationShareRelationship class]],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"memberships" valueType:TType_STRUCT valueClass:[EDAMMemberShareRelationship class]],
        [FATField fieldWithIndex:3 type:TType_STRUCT optional:YES name:@"invitationRestrictions" valueType:TType_STRUCT valueClass:[EDAMShareRelationshipRestrictions class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNotebookSharesParameters

+ (NSString *) structName {
  return @"ManageNotebookSharesParameters";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"notebookGuid"],
        [FATField fieldWithIndex:2 type:TType_STRING optional:YES name:@"inviteMessage"],
        [FATField fieldWithIndex:3 type:TType_LIST optional:YES name:@"membershipsToUpdate" valueType:TType_STRUCT valueClass:[EDAMMemberShareRelationship class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"invitationsToCreateOrUpdate" valueType:TType_STRUCT valueClass:[EDAMInvitationShareRelationship class]],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"unshares" valueType:TType_STRUCT valueClass:[EDAMUserIdentity class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNotebookSharesError

+ (NSString *) structName {
  return @"ManageNotebookSharesError";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRUCT optional:YES name:@"userIdentity" valueType:TType_STRUCT valueClass:[EDAMUserIdentity class]],
        [FATField fieldWithIndex:2 type:TType_STRUCT optional:YES name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
        [FATField fieldWithIndex:3 type:TType_STRUCT optional:YES name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNotebookSharesResult

+ (NSString *) structName {
  return @"ManageNotebookSharesResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"errors" valueType:TType_STRUCT valueClass:[EDAMManageNotebookSharesError class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMSharedNoteTemplate

+ (NSString *) structName {
  return @"SharedNoteTemplate";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"noteGuid"],
        [FATField fieldWithIndex:4 type:TType_I64 optional:YES name:@"recipientThreadId"],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"recipientContacts" valueType:TType_STRUCT valueClass:[EDAMContact class]],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"privilege"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNotebookShareTemplate

+ (NSString *) structName {
  return @"NotebookShareTemplate";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"notebookGuid"],
        [FATField fieldWithIndex:4 type:TType_I64 optional:YES name:@"recipientThreadId"],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"recipientContacts" valueType:TType_STRUCT valueClass:[EDAMContact class]],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"privilege"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMCreateOrUpdateNotebookSharesResult

+ (NSString *) structName {
  return @"CreateOrUpdateNotebookSharesResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I32 optional:YES name:@"updateSequenceNum"],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"matchingShares" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteShareRelationshipRestrictions

+ (NSString *) structName {
  return @"NoteShareRelationshipRestrictions";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_BOOL optional:YES name:@"noSetReadNote"],
        [FATField fieldWithIndex:2 type:TType_BOOL optional:YES name:@"noSetModifyNote"],
        [FATField fieldWithIndex:3 type:TType_BOOL optional:YES name:@"noSetFullAccess"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteMemberShareRelationship

+ (NSString *) structName {
  return @"NoteMemberShareRelationship";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"displayName"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"recipientUserId"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"privilege"],
        [FATField fieldWithIndex:4 type:TType_STRUCT optional:YES name:@"restrictions" valueType:TType_STRUCT valueClass:[EDAMNoteShareRelationshipRestrictions class]],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"sharerUserId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteInvitationShareRelationship

+ (NSString *) structName {
  return @"NoteInvitationShareRelationship";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"displayName"],
        [FATField fieldWithIndex:2 type:TType_I64 optional:YES name:@"recipientIdentityId"],
        [FATField fieldWithIndex:3 type:TType_I32 optional:YES name:@"privilege"],
        [FATField fieldWithIndex:5 type:TType_I32 optional:YES name:@"sharerUserId"],
    ];
  }
  return structFields;
}

@end

@implementation EDAMNoteShareRelationships

+ (NSString *) structName {
  return @"NoteShareRelationships";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"invitations" valueType:TType_STRUCT valueClass:[EDAMNoteInvitationShareRelationship class]],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"memberships" valueType:TType_STRUCT valueClass:[EDAMNoteMemberShareRelationship class]],
        [FATField fieldWithIndex:3 type:TType_STRUCT optional:YES name:@"invitationRestrictions" valueType:TType_STRUCT valueClass:[EDAMNoteShareRelationshipRestrictions class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNoteSharesParameters

+ (NSString *) structName {
  return @"ManageNoteSharesParameters";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_STRING optional:YES name:@"noteGuid"],
        [FATField fieldWithIndex:2 type:TType_LIST optional:YES name:@"membershipsToUpdate" valueType:TType_STRUCT valueClass:[EDAMNoteMemberShareRelationship class]],
        [FATField fieldWithIndex:3 type:TType_LIST optional:YES name:@"invitationsToUpdate" valueType:TType_STRUCT valueClass:[EDAMNoteInvitationShareRelationship class]],
        [FATField fieldWithIndex:4 type:TType_LIST optional:YES name:@"membershipsToUnshare" valueType:TType_I32 valueClass:NULL],
        [FATField fieldWithIndex:5 type:TType_LIST optional:YES name:@"invitationsToUnshare" valueType:TType_I64 valueClass:NULL],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNoteSharesError

+ (NSString *) structName {
  return @"ManageNoteSharesError";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_I64 optional:YES name:@"identityID"],
        [FATField fieldWithIndex:2 type:TType_I32 optional:YES name:@"userID"],
        [FATField fieldWithIndex:3 type:TType_STRUCT optional:YES name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
        [FATField fieldWithIndex:4 type:TType_STRUCT optional:YES name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
    ];
  }
  return structFields;
}

@end

@implementation EDAMManageNoteSharesResult

+ (NSString *) structName {
  return @"ManageNoteSharesResult";
}

+ (NSArray *) structFields {
  static NSArray *structFields = nil;
  if (structFields == nil)
  {
    structFields = @[
        [FATField fieldWithIndex:1 type:TType_LIST optional:YES name:@"errors" valueType:TType_STRUCT valueClass:[EDAMManageNoteSharesError class]],
    ];
  }
  return structFields;
}

@end


@implementation EDAMNoteStoreConstants
@end

@implementation EDAMNoteStoreClient
{
  id <ENTProtocol> _inProtocol;
  id <ENTProtocol> _outProtocol;
}
- (id) initWithProtocol: (id <ENTProtocol>) protocol
{
  return [self initWithInProtocol: protocol outProtocol: protocol];
}

- (id) initWithInProtocol: (id <ENTProtocol>) anInProtocol outProtocol: (id <ENTProtocol>) anOutProtocol
{
  self = [super init];
  if (self != nil)  {
    _inProtocol = anInProtocol;
    _outProtocol = anOutProtocol;
  }
  return self;
}

- (id<ENTProtocol>)inProtocol
{
  return _inProtocol;
}

- (id<ENTProtocol>)outProtocol
{
  return _outProtocol;
}

- (EDAMSyncState *) getSyncState: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"getSyncState"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getSyncState"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncState class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSyncState *) getSyncStateWithMetrics: (NSString *) authenticationToken clientMetrics: (EDAMClientUsageMetrics *) clientMetrics
{
  [ENTProtocolUtil sendMessage:@"getSyncStateWithMetrics"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"clientMetrics" valueType:TType_STRUCT valueClass:[EDAMClientUsageMetrics class]], clientMetrics, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getSyncStateWithMetrics"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncState class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSyncChunk *) getSyncChunk: (NSString *) authenticationToken afterUSN: (int32_t) afterUSN maxEntries: (int32_t) maxEntries fullSyncOnly: (BOOL) fullSyncOnly
{
  [ENTProtocolUtil sendMessage:@"getSyncChunk"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"afterUSN"], @(afterUSN), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"maxEntries"], @(maxEntries), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"fullSyncOnly"], @(fullSyncOnly), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getSyncChunk"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncChunk class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSyncChunk *) getFilteredSyncChunk: (NSString *) authenticationToken afterUSN: (int32_t) afterUSN maxEntries: (int32_t) maxEntries filter: (EDAMSyncChunkFilter *) filter
{
  [ENTProtocolUtil sendMessage:@"getFilteredSyncChunk"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"afterUSN"], @(afterUSN), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"maxEntries"], @(maxEntries), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_STRUCT optional:NO name:@"filter" valueType:TType_STRUCT valueClass:[EDAMSyncChunkFilter class]], filter, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getFilteredSyncChunk"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncChunk class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSyncState *) getLinkedNotebookSyncState: (NSString *) authenticationToken linkedNotebook: (EDAMLinkedNotebook *) linkedNotebook
{
  [ENTProtocolUtil sendMessage:@"getLinkedNotebookSyncState"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"linkedNotebook" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]], linkedNotebook, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getLinkedNotebookSyncState"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncState class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMSyncChunk *) getLinkedNotebookSyncChunk: (NSString *) authenticationToken linkedNotebook: (EDAMLinkedNotebook *) linkedNotebook afterUSN: (int32_t) afterUSN maxEntries: (int32_t) maxEntries fullSyncOnly: (BOOL) fullSyncOnly
{
  [ENTProtocolUtil sendMessage:@"getLinkedNotebookSyncChunk"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"linkedNotebook" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]], linkedNotebook, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"afterUSN"], @(afterUSN), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_I32 optional:NO name:@"maxEntries"], @(maxEntries), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_BOOL optional:NO name:@"fullSyncOnly"], @(fullSyncOnly), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getLinkedNotebookSyncChunk"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSyncChunk class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSArray *) listNotebooks: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSArray *) listPublishedBusinessNotebooks: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listPublishedBusinessNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listPublishedBusinessNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSArray *) listAccessibleBusinessNotebooks: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listAccessibleBusinessNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listAccessibleBusinessNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNotebook *) getNotebook: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNotebook *) getDefaultNotebook: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"getDefaultNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getDefaultNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNotebook *) createNotebook: (NSString *) authenticationToken notebook: (EDAMNotebook *) notebook
{
  [ENTProtocolUtil sendMessage:@"createNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notebook" valueType:TType_STRUCT valueClass:[EDAMNotebook class]], notebook, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) updateNotebook: (NSString *) authenticationToken notebook: (EDAMNotebook *) notebook
{
  [ENTProtocolUtil sendMessage:@"updateNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notebook" valueType:TType_STRUCT valueClass:[EDAMNotebook class]], notebook, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) expungeNotebook: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"expungeNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (NSArray *) listTags: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listTags"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listTags"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMTag class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSArray *) listTagsByNotebook: (NSString *) authenticationToken notebookGuid: (EDAMGuid) notebookGuid
{
  [ENTProtocolUtil sendMessage:@"listTagsByNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listTagsByNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMTag class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMTag *) getTag: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getTag"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getTag"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMTag class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMTag *) createTag: (NSString *) authenticationToken tag: (EDAMTag *) tag
{
  [ENTProtocolUtil sendMessage:@"createTag"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"tag" valueType:TType_STRUCT valueClass:[EDAMTag class]], tag, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createTag"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMTag class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) updateTag: (NSString *) authenticationToken tag: (EDAMTag *) tag
{
  [ENTProtocolUtil sendMessage:@"updateTag"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"tag" valueType:TType_STRUCT valueClass:[EDAMTag class]], tag, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateTag"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (void) untagAll: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"untagAll"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  [ENTProtocolUtil readMessage:@"untagAll"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) expungeTag: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"expungeTag"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeTag"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (NSArray *) listSearches: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listSearches"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listSearches"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSavedSearch *) getSearch: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getSearch"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getSearch"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMSavedSearch *) createSearch: (NSString *) authenticationToken search: (EDAMSavedSearch *) search
{
  [ENTProtocolUtil sendMessage:@"createSearch"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"search" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]], search, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createSearch"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) updateSearch: (NSString *) authenticationToken search: (EDAMSavedSearch *) search
{
  [ENTProtocolUtil sendMessage:@"updateSearch"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"search" valueType:TType_STRUCT valueClass:[EDAMSavedSearch class]], search, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateSearch"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) expungeSearch: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"expungeSearch"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeSearch"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (EDAMNoteList *) findNotes: (NSString *) authenticationToken filter: (EDAMNoteFilter *) filter offset: (int32_t) offset maxNotes: (int32_t) maxNotes
{
  [ENTProtocolUtil sendMessage:@"findNotes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]], filter, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"offset"], @(offset), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_I32 optional:NO name:@"maxNotes"], @(maxNotes), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findNotes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteList class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) findNoteOffset: (NSString *) authenticationToken filter: (EDAMNoteFilter *) filter guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"findNoteOffset"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]], filter, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"findNoteOffset"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (EDAMNotesMetadataList *) findNotesMetadata: (NSString *) authenticationToken filter: (EDAMNoteFilter *) filter offset: (int32_t) offset maxNotes: (int32_t) maxNotes resultSpec: (EDAMNotesMetadataResultSpec *) resultSpec
{
  [ENTProtocolUtil sendMessage:@"findNotesMetadata"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]], filter, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"offset"], @(offset), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_I32 optional:NO name:@"maxNotes"], @(maxNotes), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_STRUCT optional:NO name:@"resultSpec" valueType:TType_STRUCT valueClass:[EDAMNotesMetadataResultSpec class]], resultSpec, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findNotesMetadata"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotesMetadataList class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNoteCollectionCounts *) findNoteCounts: (NSString *) authenticationToken filter: (EDAMNoteFilter *) filter withTrash: (BOOL) withTrash
{
  [ENTProtocolUtil sendMessage:@"findNoteCounts"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"filter" valueType:TType_STRUCT valueClass:[EDAMNoteFilter class]], filter, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BOOL optional:NO name:@"withTrash"], @(withTrash), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findNoteCounts"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteCollectionCounts class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNote *) getNoteWithResultSpec: (NSString *) authenticationToken guid: (EDAMGuid) guid resultSpec: (EDAMNoteResultSpec *) resultSpec
{
  [ENTProtocolUtil sendMessage:@"getNoteWithResultSpec"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"resultSpec" valueType:TType_STRUCT valueClass:[EDAMNoteResultSpec class]], resultSpec, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteWithResultSpec"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNote *) getNote: (NSString *) authenticationToken guid: (EDAMGuid) guid withContent: (BOOL) withContent withResourcesData: (BOOL) withResourcesData withResourcesRecognition: (BOOL) withResourcesRecognition withResourcesAlternateData: (BOOL) withResourcesAlternateData
{
  [ENTProtocolUtil sendMessage:@"getNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BOOL optional:NO name:@"withContent"], @(withContent), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"withResourcesData"], @(withResourcesData), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_BOOL optional:NO name:@"withResourcesRecognition"], @(withResourcesRecognition), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:6 type:TType_BOOL optional:NO name:@"withResourcesAlternateData"], @(withResourcesAlternateData), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMPreferences *) getPreferences: (NSString *) authenticationToken preferenceNames: (NSArray *) preferenceNames
{
  [ENTProtocolUtil sendMessage:@"getPreferences"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_LIST optional:NO name:@"preferenceNames" valueType:TType_STRING valueClass:NULL], preferenceNames, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getPreferences"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMPreferences class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) updatePreferences: (NSString *) authenticationToken preferencesToUpdate: (NSDictionary *) preferencesToUpdate
{
  [ENTProtocolUtil sendMessage:@"updatePreferences"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_MAP optional:NO name:@"preferencesToUpdate" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL], preferencesToUpdate, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updatePreferences"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (EDAMLazyMap *) getNoteApplicationData: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getNoteApplicationData"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteApplicationData"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMLazyMap class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSString *) getNoteApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key
{
  [ENTProtocolUtil sendMessage:@"getNoteApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) setNoteApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key value: (NSString *) value
{
  [ENTProtocolUtil sendMessage:@"setNoteApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_STRING optional:NO name:@"value"], value, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"setNoteApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) unsetNoteApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key
{
  [ENTProtocolUtil sendMessage:@"unsetNoteApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"unsetNoteApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (NSString *) getNoteContent: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getNoteContent"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteContent"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSString *) getNoteSearchText: (NSString *) authenticationToken guid: (EDAMGuid) guid noteOnly: (BOOL) noteOnly tokenizeForIndexing: (BOOL) tokenizeForIndexing
{
  [ENTProtocolUtil sendMessage:@"getNoteSearchText"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BOOL optional:NO name:@"noteOnly"], @(noteOnly), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"tokenizeForIndexing"], @(tokenizeForIndexing), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteSearchText"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSString *) getResourceSearchText: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceSearchText"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceSearchText"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSArray *) getNoteTagNames: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getNoteTagNames"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteTagNames"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRING valueClass:NULL],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNote *) createNote: (NSString *) authenticationToken note: (EDAMNote *) note
{
  [ENTProtocolUtil sendMessage:@"createNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"note" valueType:TType_STRUCT valueClass:[EDAMNote class]], note, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNote *) updateNote: (NSString *) authenticationToken note: (EDAMNote *) note
{
  [ENTProtocolUtil sendMessage:@"updateNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"note" valueType:TType_STRUCT valueClass:[EDAMNote class]], note, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"updateNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) deleteNote: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"deleteNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"deleteNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) expungeNote: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"expungeNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) expungeNotes: (NSString *) authenticationToken noteGuids: (NSArray *) noteGuids
{
  [ENTProtocolUtil sendMessage:@"expungeNotes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_LIST optional:NO name:@"noteGuids" valueType:TType_STRING valueClass:NULL], noteGuids, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeNotes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) expungeInactiveNotes: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"expungeInactiveNotes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeInactiveNotes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (EDAMNote *) copyNote: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid toNotebookGuid: (EDAMGuid) toNotebookGuid
{
  [ENTProtocolUtil sendMessage:@"copyNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"toNotebookGuid"], toNotebookGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"copyNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSArray *) listNoteVersions: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid
{
  [ENTProtocolUtil sendMessage:@"listNoteVersions"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listNoteVersions"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteVersionId class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNote *) getNoteVersion: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid updateSequenceNum: (int32_t) updateSequenceNum withResourcesData: (BOOL) withResourcesData withResourcesRecognition: (BOOL) withResourcesRecognition withResourcesAlternateData: (BOOL) withResourcesAlternateData
{
  [ENTProtocolUtil sendMessage:@"getNoteVersion"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"updateSequenceNum"], @(updateSequenceNum), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"withResourcesData"], @(withResourcesData), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_BOOL optional:NO name:@"withResourcesRecognition"], @(withResourcesRecognition), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:6 type:TType_BOOL optional:NO name:@"withResourcesAlternateData"], @(withResourcesAlternateData), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteVersion"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMResource *) getResource: (NSString *) authenticationToken guid: (EDAMGuid) guid withData: (BOOL) withData withRecognition: (BOOL) withRecognition withAttributes: (BOOL) withAttributes withAlternateData: (BOOL) withAlternateData
{
  [ENTProtocolUtil sendMessage:@"getResource"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BOOL optional:NO name:@"withData"], @(withData), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"withRecognition"], @(withRecognition), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_BOOL optional:NO name:@"withAttributes"], @(withAttributes), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:6 type:TType_BOOL optional:NO name:@"withAlternateData"], @(withAlternateData), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResource"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMResource class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMLazyMap *) getResourceApplicationData: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceApplicationData"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceApplicationData"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMLazyMap class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSString *) getResourceApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key
{
  [ENTProtocolUtil sendMessage:@"getResourceApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (int32_t) setResourceApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key value: (NSString *) value
{
  [ENTProtocolUtil sendMessage:@"setResourceApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_STRING optional:NO name:@"value"], value, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"setResourceApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) unsetResourceApplicationDataEntry: (NSString *) authenticationToken guid: (EDAMGuid) guid key: (NSString *) key
{
  [ENTProtocolUtil sendMessage:@"unsetResourceApplicationDataEntry"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"key"], key, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"unsetResourceApplicationDataEntry"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) updateResource: (NSString *) authenticationToken resource: (EDAMResource *) resource
{
  [ENTProtocolUtil sendMessage:@"updateResource"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"resource" valueType:TType_STRUCT valueClass:[EDAMResource class]], resource, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateResource"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (NSData *) getResourceData: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceData"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceData"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_BINARY optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMResource *) getResourceByHash: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid contentHash: (NSData *) contentHash withData: (BOOL) withData withRecognition: (BOOL) withRecognition withAlternateData: (BOOL) withAlternateData
{
  [ENTProtocolUtil sendMessage:@"getResourceByHash"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BINARY optional:NO name:@"contentHash"], contentHash, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"withData"], @(withData), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:5 type:TType_BOOL optional:NO name:@"withRecognition"], @(withRecognition), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:6 type:TType_BOOL optional:NO name:@"withAlternateData"], @(withAlternateData), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceByHash"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMResource class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSData *) getResourceRecognition: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceRecognition"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceRecognition"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_BINARY optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSData *) getResourceAlternateData: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceAlternateData"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceAlternateData"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_BINARY optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMResourceAttributes *) getResourceAttributes: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"getResourceAttributes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getResourceAttributes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMResourceAttributes class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSArray *) getAds: (NSString *) authenticationToken adParameters: (EDAMAdParameters *) adParameters
{
  [ENTProtocolUtil sendMessage:@"getAds"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"adParameters" valueType:TType_STRUCT valueClass:[EDAMAdParameters class]], adParameters, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getAds"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMAd class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMAd *) getRandomAd: (NSString *) authenticationToken adParameters: (EDAMAdParameters *) adParameters
{
  [ENTProtocolUtil sendMessage:@"getRandomAd"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"adParameters" valueType:TType_STRUCT valueClass:[EDAMAdParameters class]], adParameters, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getRandomAd"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMAd class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNotebook *) getPublicNotebook: (EDAMUserID) userId publicUri: (NSString *) publicUri
{
  [ENTProtocolUtil sendMessage:@"getPublicNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_I32 optional:NO name:@"userId"], @(userId), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"publicUri"], publicUri, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getPublicNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMSharedNotebook *) createSharedNotebook: (NSString *) authenticationToken sharedNotebook: (EDAMSharedNotebook *) sharedNotebook
{
  [ENTProtocolUtil sendMessage:@"createSharedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"sharedNotebook" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]], sharedNotebook, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createSharedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSharedNotebook *) shareNotebook: (NSString *) authenticationToken sharedNotebook: (EDAMSharedNotebook *) sharedNotebook message: (NSString *) message
{
  [ENTProtocolUtil sendMessage:@"shareNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"sharedNotebook" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]], sharedNotebook, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"message"], message, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"shareNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMCreateOrUpdateNotebookSharesResult *) createOrUpdateNotebookShares: (NSString *) authenticationToken shareTemplate: (EDAMNotebookShareTemplate *) shareTemplate
{
  [ENTProtocolUtil sendMessage:@"createOrUpdateNotebookShares"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"shareTemplate" valueType:TType_STRUCT valueClass:[EDAMNotebookShareTemplate class]], shareTemplate, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createOrUpdateNotebookShares"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMCreateOrUpdateNotebookSharesResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:4 type:TType_STRUCT optional:NO name:@"invalidContactsException" valueType:TType_STRUCT valueClass:[EDAMInvalidContactsException class]],
                              ]];
}

- (int32_t) updateSharedNotebook: (NSString *) authenticationToken sharedNotebook: (EDAMSharedNotebook *) sharedNotebook
{
  [ENTProtocolUtil sendMessage:@"updateSharedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"sharedNotebook" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]], sharedNotebook, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateSharedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (int32_t) setSharedNotebookRecipientSettings: (NSString *) authenticationToken sharedNotebookId: (int64_t) sharedNotebookId recipientSettings: (EDAMSharedNotebookRecipientSettings *) recipientSettings
{
  [ENTProtocolUtil sendMessage:@"setSharedNotebookRecipientSettings"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_I64 optional:NO name:@"sharedNotebookId"], @(sharedNotebookId), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"recipientSettings" valueType:TType_STRUCT valueClass:[EDAMSharedNotebookRecipientSettings class]], recipientSettings, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"setSharedNotebookRecipientSettings"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (EDAMNotebook *) setNotebookRecipientSettings: (NSString *) authenticationToken notebookGuid: (NSString *) notebookGuid recipientSettings: (EDAMNotebookRecipientSettings *) recipientSettings
{
  [ENTProtocolUtil sendMessage:@"setNotebookRecipientSettings"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"recipientSettings" valueType:TType_STRUCT valueClass:[EDAMNotebookRecipientSettings class]], recipientSettings, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"setNotebookRecipientSettings"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) sendMessageToSharedNotebookMembers: (NSString *) authenticationToken notebookGuid: (EDAMGuid) notebookGuid messageText: (NSString *) messageText recipients: (NSArray *) recipients
{
  [ENTProtocolUtil sendMessage:@"sendMessageToSharedNotebookMembers"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"messageText"], messageText, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_LIST optional:NO name:@"recipients" valueType:TType_STRING valueClass:NULL], recipients, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"sendMessageToSharedNotebookMembers"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (NSArray *) listSharedNotebooks: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listSharedNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listSharedNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) expungeSharedNotebooks: (NSString *) authenticationToken sharedNotebookIds: (NSArray *) sharedNotebookIds
{
  [ENTProtocolUtil sendMessage:@"expungeSharedNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_LIST optional:NO name:@"sharedNotebookIds" valueType:TType_I64 valueClass:NULL], sharedNotebookIds, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeSharedNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (EDAMLinkedNotebook *) createLinkedNotebook: (NSString *) authenticationToken linkedNotebook: (EDAMLinkedNotebook *) linkedNotebook
{
  [ENTProtocolUtil sendMessage:@"createLinkedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"linkedNotebook" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]], linkedNotebook, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createLinkedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) updateLinkedNotebook: (NSString *) authenticationToken linkedNotebook: (EDAMLinkedNotebook *) linkedNotebook
{
  [ENTProtocolUtil sendMessage:@"updateLinkedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"linkedNotebook" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]], linkedNotebook, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"updateLinkedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (NSArray *) listLinkedNotebooks: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"listLinkedNotebooks"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"listLinkedNotebooks"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMLinkedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) expungeLinkedNotebook: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"expungeLinkedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"expungeLinkedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]] intValue];
}

- (EDAMAuthenticationResult *) authenticateToSharedNotebook: (NSString *) shareKeyOrGlobalId authenticationToken: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"authenticateToSharedNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"shareKeyOrGlobalId"], shareKeyOrGlobalId, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"authenticateToSharedNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMAuthenticationResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSharedNotebook *) getSharedNotebookByAuth: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"getSharedNotebookByAuth"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getSharedNotebookByAuth"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (void) emailNote: (NSString *) authenticationToken parameters: (EDAMNoteEmailParameters *) parameters
{
  [ENTProtocolUtil sendMessage:@"emailNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"parameters" valueType:TType_STRUCT valueClass:[EDAMNoteEmailParameters class]], parameters, nil],
                            ]];
  [ENTProtocolUtil readMessage:@"emailNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSString *) shareNote: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"shareNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"shareNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRING optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (void) stopSharingNote: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"stopSharingNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  [ENTProtocolUtil readMessage:@"stopSharingNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (void) stopSharingNoteWithRecipients: (NSString *) authenticationToken guid: (EDAMGuid) guid
{
  [ENTProtocolUtil sendMessage:@"stopSharingNoteWithRecipients"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                            ]];
  [ENTProtocolUtil readMessage:@"stopSharingNoteWithRecipients"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMAuthenticationResult *) authenticateToSharedNote: (NSString *) guid noteKey: (NSString *) noteKey authenticationToken: (NSString *) authenticationToken
{
  [ENTProtocolUtil sendMessage:@"authenticateToSharedNote"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"guid"], guid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteKey"], noteKey, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"authenticateToSharedNote"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMAuthenticationResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSArray *) createOrUpdateSharedNotes: (NSString *) authenticationToken shareTemplate: (EDAMSharedNoteTemplate *) shareTemplate
{
  [ENTProtocolUtil sendMessage:@"createOrUpdateSharedNotes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"shareTemplate" valueType:TType_STRUCT valueClass:[EDAMSharedNoteTemplate class]], shareTemplate, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"createOrUpdateSharedNotes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNote class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:4 type:TType_STRUCT optional:NO name:@"invalidContactsException" valueType:TType_STRUCT valueClass:[EDAMInvalidContactsException class]],
                              ]];
}

- (EDAMRelatedResult *) findRelated: (NSString *) authenticationToken query: (EDAMRelatedQuery *) query resultSpec: (EDAMRelatedResultSpec *) resultSpec
{
  [ENTProtocolUtil sendMessage:@"findRelated"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"query" valueType:TType_STRUCT valueClass:[EDAMRelatedQuery class]], query, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"resultSpec" valueType:TType_STRUCT valueClass:[EDAMRelatedResultSpec class]], resultSpec, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findRelated"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMRelatedResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMSearchSuggestionResult *) findSearchSuggestions: (NSString *) authenticationToken query: (EDAMSearchSuggestionQuery *) query resultSpec: (EDAMSearchSuggestionResultSpec *) resultSpec
{
  [ENTProtocolUtil sendMessage:@"findSearchSuggestions"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"query" valueType:TType_STRUCT valueClass:[EDAMSearchSuggestionQuery class]], query, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"resultSpec" valueType:TType_STRUCT valueClass:[EDAMSearchSuggestionResultSpec class]], resultSpec, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findSearchSuggestions"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSearchSuggestionResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (void) updateUserSetting: (NSString *) authenticationToken setting: (int) setting value: (NSString *) value
{
  [ENTProtocolUtil sendMessage:@"updateUserSetting"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_I32 optional:NO name:@"setting"], @(setting), nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_STRING optional:NO name:@"value"], value, nil],
                            ]];
  [ENTProtocolUtil readMessage:@"updateUserSetting"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSArray *) findTimeZones: (NSString *) authenticationToken timeZoneSpec: (EDAMTimeZoneSpec *) timeZoneSpec maxTimeZones: (int32_t) maxTimeZones
{
  [ENTProtocolUtil sendMessage:@"findTimeZones"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"timeZoneSpec" valueType:TType_STRUCT valueClass:[EDAMTimeZoneSpec class]], timeZoneSpec, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"maxTimeZones"], @(maxTimeZones), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findTimeZones"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMTimeZone class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSArray *) findContacts: (NSString *) authenticationToken query: (EDAMContactsQuery *) query
{
  [ENTProtocolUtil sendMessage:@"findContacts"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"query" valueType:TType_STRUCT valueClass:[EDAMContactsQuery class]], query, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findContacts"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_LIST optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMContact class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMBusinessQueryResult *) findInBusiness: (NSString *) authenticationToken query: (EDAMBusinessQuery *) query
{
  [ENTProtocolUtil sendMessage:@"findInBusiness"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"query" valueType:TType_STRUCT valueClass:[EDAMBusinessQuery class]], query, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"findInBusiness"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMBusinessQueryResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (int32_t) shareNoteWithBusiness: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid
{
  [ENTProtocolUtil sendMessage:@"shareNoteWithBusiness"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"shareNoteWithBusiness"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (int32_t) stopSharingNoteWithBusiness: (NSString *) authenticationToken noteGuid: (EDAMGuid) noteGuid
{
  [ENTProtocolUtil sendMessage:@"stopSharingNoteWithBusiness"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [[ENTProtocolUtil readMessage:@"stopSharingNoteWithBusiness"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_I32 optional:NO name:@"success"],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]] intValue];
}

- (void) requestAccessToNotebook: (NSString *) authToken notebookGuid: (NSString *) notebookGuid privilegeLevel: (int) privilegeLevel
{
  [ENTProtocolUtil sendMessage:@"requestAccessToNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authToken"], authToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_I32 optional:NO name:@"privilegeLevel"], @(privilegeLevel), nil],
                            ]];
  [ENTProtocolUtil readMessage:@"requestAccessToNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (EDAMNoteLockStatus *) getNoteLockStatus: (NSString *) authenticationToken noteGuid: (NSString *) noteGuid
{
  [ENTProtocolUtil sendMessage:@"getNoteLockStatus"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteLockStatus"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteLockStatus class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNoteLockStatus *) acquireNoteLock: (NSString *) authenticationToken noteGuid: (NSString *) noteGuid
{
  [ENTProtocolUtil sendMessage:@"acquireNoteLock"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"acquireNoteLock"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteLockStatus class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNoteLockStatus *) releaseNoteLock: (NSString *) authenticationToken noteGuid: (NSString *) noteGuid
{
  [ENTProtocolUtil sendMessage:@"releaseNoteLock"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"releaseNoteLock"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteLockStatus class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (NSDictionary *) getViewersForNotes: (NSString *) authenticationToken noteGuids: (NSArray *) noteGuids
{
  [ENTProtocolUtil sendMessage:@"getViewersForNotes"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_LIST optional:NO name:@"noteGuids" valueType:TType_STRING valueClass:NULL], noteGuids, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getViewersForNotes"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_MAP optional:NO name:@"success" keyType:TType_STRING keyClass:NULL valueType:TType_STRING valueClass:NULL],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMUpdateNoteIfUsnMatchesResult *) updateNoteIfUsnMatches: (NSString *) authenticationToken note: (EDAMNote *) note
{
  [ENTProtocolUtil sendMessage:@"updateNoteIfUsnMatches"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"note" valueType:TType_STRUCT valueClass:[EDAMNote class]], note, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"updateNoteIfUsnMatches"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMUpdateNoteIfUsnMatchesResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMManageNotebookSharesResult *) manageNotebookShares: (NSString *) authenticationToken parameters: (EDAMManageNotebookSharesParameters *) parameters
{
  [ENTProtocolUtil sendMessage:@"manageNotebookShares"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"parameters" valueType:TType_STRUCT valueClass:[EDAMManageNotebookSharesParameters class]], parameters, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"manageNotebookShares"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMManageNotebookSharesResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMShareRelationships *) getNotebookShares: (NSString *) authenticationToken notebookGuid: (NSString *) notebookGuid
{
  [ENTProtocolUtil sendMessage:@"getNotebookShares"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNotebookShares"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMShareRelationships class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMNoteShareRelationships *) getNoteShares: (NSString *) authenticationToken noteGuid: (NSString *) noteGuid
{
  [ENTProtocolUtil sendMessage:@"getNoteShares"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"noteGuid"], noteGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNoteShares"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMNoteShareRelationships class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMManageNoteSharesResult *) manageNoteShares: (NSString *) authenticationToken parameters: (EDAMManageNoteSharesParameters *) parameters
{
  [ENTProtocolUtil sendMessage:@"manageNoteShares"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"parameters" valueType:TType_STRUCT valueClass:[EDAMManageNoteSharesParameters class]], parameters, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"manageNoteShares"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMManageNoteSharesResult class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (EDAMSharedNotebook *) joinPublishedBusinessNotebook: (NSString *) authenticationToken notebookGuid: (NSString *) notebookGuid
{
  [ENTProtocolUtil sendMessage:@"joinPublishedBusinessNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"joinPublishedBusinessNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_STRUCT optional:NO name:@"success" valueType:TType_STRUCT valueClass:[EDAMSharedNotebook class]],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

- (void) unpublishNotebook: (NSString *) authenticationToken notebookGuid: (NSString *) notebookGuid convertGroupSharesToIndividual: (BOOL) convertGroupSharesToIndividual
{
  [ENTProtocolUtil sendMessage:@"unpublishNotebook"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_BOOL optional:NO name:@"convertGroupSharesToIndividual"], @(convertGroupSharesToIndividual), nil],
                            ]];
  [ENTProtocolUtil readMessage:@"unpublishNotebook"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              ]];
}

- (NSSet *) getNotebookSharesEmailAddresses: (NSString *) authenticationToken notebookGuid: (NSString *) notebookGuid identities: (NSArray *) identities skipUnknownUserIdentities: (BOOL) skipUnknownUserIdentities
{
  [ENTProtocolUtil sendMessage:@"getNotebookSharesEmailAddresses"
                  toProtocol:_outProtocol
                withArgPairs:@[
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:1 type:TType_STRING optional:NO name:@"authenticationToken"], authenticationToken, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:2 type:TType_STRING optional:NO name:@"notebookGuid"], notebookGuid, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:3 type:TType_LIST optional:NO name:@"identities" valueType:TType_STRUCT valueClass:[EDAMUserIdentity class]], identities, nil],
                               [NSArray arrayWithObjects:[FATField fieldWithIndex:4 type:TType_BOOL optional:NO name:@"skipUnknownUserIdentities"], @(skipUnknownUserIdentities), nil],
                            ]];
  return [ENTProtocolUtil readMessage:@"getNotebookSharesEmailAddresses"
                fromProtocol:_inProtocol
           withResponseTypes:@[
                              [FATField fieldWithIndex:0 type:TType_SET optional:NO name:@"success" valueType:TType_STRING valueClass:NULL],
                              [FATField fieldWithIndex:1 type:TType_STRUCT optional:NO name:@"userException" valueType:TType_STRUCT valueClass:[EDAMUserException class]],
                              [FATField fieldWithIndex:2 type:TType_STRUCT optional:NO name:@"notFoundException" valueType:TType_STRUCT valueClass:[EDAMNotFoundException class]],
                              [FATField fieldWithIndex:3 type:TType_STRUCT optional:NO name:@"systemException" valueType:TType_STRUCT valueClass:[EDAMSystemException class]],
                              ]];
}

@end

