'use strict';

//
// Autogenerated by Thrift Compiler (0.6.0-en-exported)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//


// Define types and services

var Thrift = require('../thrift');
var Limits = require('./Limits');

module.exports.PrivilegeLevel = {
  'NORMAL': 1,
  'PREMIUM': 3,
  'VIP': 5,
  'MANAGER': 7,
  'SUPPORT': 8,
  'ADMIN': 9
};

module.exports.ServiceLevel = {
  'BASIC': 1,
  'PLUS': 2,
  'PREMIUM': 3
};

module.exports.QueryFormat = {
  'USER': 1,
  'SEXP': 2
};

module.exports.NoteSortOrder = {
  'CREATED': 1,
  'UPDATED': 2,
  'RELEVANCE': 3,
  'UPDATE_SEQUENCE_NUMBER': 4,
  'TITLE': 5
};

module.exports.PremiumOrderStatus = {
  'NONE': 0,
  'PENDING': 1,
  'ACTIVE': 2,
  'FAILED': 3,
  'CANCELLATION_PENDING': 4,
  'CANCELED': 5
};

module.exports.SharedNotebookPrivilegeLevel = {
  'READ_NOTEBOOK': 0,
  'MODIFY_NOTEBOOK_PLUS_ACTIVITY': 1,
  'READ_NOTEBOOK_PLUS_ACTIVITY': 2,
  'GROUP': 3,
  'FULL_ACCESS': 4,
  'BUSINESS_FULL_ACCESS': 5
};

module.exports.SharedNotePrivilegeLevel = {
  'READ_NOTE': 0,
  'MODIFY_NOTE': 1,
  'FULL_ACCESS': 2
};

module.exports.SponsoredGroupRole = {
  'GROUP_MEMBER': 1,
  'GROUP_ADMIN': 2,
  'GROUP_OWNER': 3
};

module.exports.BusinessUserRole = {
  'ADMIN': 1,
  'NORMAL': 2
};

module.exports.SharedNotebookInstanceRestrictions = {
  'ASSIGNED': 1,
  'NO_SHARED_NOTEBOOKS': 2
};

module.exports.ReminderEmailConfig = {
  'DO_NOT_SEND': 1,
  'SEND_DAILY_EMAIL': 2
};

module.exports.BusinessInvitationStatus = {
  'APPROVED': 0,
  'REQUESTED': 1,
  'REDEEMED': 2
};

module.exports.ContactType = {
  'EVERNOTE': 1,
  'SMS': 2,
  'FACEBOOK': 3,
  'EMAIL': 4,
  'TWITTER': 5,
  'LINKEDIN': 6
};

module.exports.RelatedContentType = {
  'NEWS_ARTICLE': 1,
  'PROFILE_PERSON': 2,
  'PROFILE_ORGANIZATION': 3,
  'REFERENCE_MATERIAL': 4
};

module.exports.RelatedContentAccess = {
  'NOT_ACCESSIBLE': 0,
  'DIRECT_LINK_ACCESS_OK': 1,
  'DIRECT_LINK_LOGIN_REQUIRED': 2,
  'DIRECT_LINK_EMBEDDED_VIEW': 3
};

module.exports.UserIdentityType = {
  'EVERNOTE_USERID': 1,
  'EMAIL': 2,
  'IDENTITYID': 3
};

module.exports.CLASSIFICATION_RECIPE_USER_NON_RECIPE = '000';

module.exports.CLASSIFICATION_RECIPE_USER_RECIPE = '001';

module.exports.CLASSIFICATION_RECIPE_SERVICE_RECIPE = '002';

module.exports.EDAM_NOTE_SOURCE_WEB_CLIP = 'web.clip';

module.exports.EDAM_NOTE_SOURCE_WEB_CLIP_SIMPLIFIED = 'Clearly';

module.exports.EDAM_NOTE_SOURCE_MAIL_CLIP = 'mail.clip';

module.exports.EDAM_NOTE_SOURCE_MAIL_SMTP_GATEWAY = 'mail.smtp';

module.exports.Data = Thrift.Struct.define('Data', {
  1: { alias: 'bodyHash', type: Thrift.Type.BINARY },
  2: { alias: 'size', type: Thrift.Type.I32 },
  3: { alias: 'body', type: Thrift.Type.BINARY }
});

module.exports.UserAttributes = Thrift.Struct.define('UserAttributes', {
  1: { alias: 'defaultLocationName', type: Thrift.Type.STRING },
  2: { alias: 'defaultLatitude', type: Thrift.Type.DOUBLE },
  3: { alias: 'defaultLongitude', type: Thrift.Type.DOUBLE },
  4: { alias: 'preactivation', type: Thrift.Type.BOOL },
  5: { alias: 'viewedPromotions', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRING) },
  6: { alias: 'incomingEmailAddress', type: Thrift.Type.STRING },
  7: { alias: 'recentMailedAddresses', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRING) },
  9: { alias: 'comments', type: Thrift.Type.STRING },
  11: { alias: 'dateAgreedToTermsOfService', type: Thrift.Type.I64 },
  12: { alias: 'maxReferrals', type: Thrift.Type.I32 },
  13: { alias: 'referralCount', type: Thrift.Type.I32 },
  14: { alias: 'refererCode', type: Thrift.Type.STRING },
  15: { alias: 'sentEmailDate', type: Thrift.Type.I64 },
  16: { alias: 'sentEmailCount', type: Thrift.Type.I32 },
  17: { alias: 'dailyEmailLimit', type: Thrift.Type.I32 },
  18: { alias: 'emailOptOutDate', type: Thrift.Type.I64 },
  19: { alias: 'partnerEmailOptInDate', type: Thrift.Type.I64 },
  20: { alias: 'preferredLanguage', type: Thrift.Type.STRING },
  21: { alias: 'preferredCountry', type: Thrift.Type.STRING },
  22: { alias: 'clipFullPage', type: Thrift.Type.BOOL },
  23: { alias: 'twitterUserName', type: Thrift.Type.STRING },
  24: { alias: 'twitterId', type: Thrift.Type.STRING },
  25: { alias: 'groupName', type: Thrift.Type.STRING },
  26: { alias: 'recognitionLanguage', type: Thrift.Type.STRING },
  28: { alias: 'referralProof', type: Thrift.Type.STRING },
  29: { alias: 'educationalDiscount', type: Thrift.Type.BOOL },
  30: { alias: 'businessAddress', type: Thrift.Type.STRING },
  31: { alias: 'hideSponsorBilling', type: Thrift.Type.BOOL },
  32: { alias: 'taxExempt', type: Thrift.Type.BOOL },
  33: { alias: 'useEmailAutoFiling', type: Thrift.Type.BOOL },
  34: { alias: 'reminderEmailConfig', type: Thrift.Type.I32 },
  35: { alias: 'emailAddressLastConfirmed', type: Thrift.Type.I64 },
  36: { alias: 'passwordUpdated', type: Thrift.Type.I64 },
  37: { alias: 'salesforcePushEnabled', type: Thrift.Type.BOOL },
  38: { alias: 'shouldLogClientEvent', type: Thrift.Type.BOOL }
});

module.exports.BusinessUserAttributes = Thrift.Struct.define('BusinessUserAttributes', {
  1: { alias: 'title', type: Thrift.Type.STRING },
  2: { alias: 'location', type: Thrift.Type.STRING },
  3: { alias: 'department', type: Thrift.Type.STRING },
  4: { alias: 'mobilePhone', type: Thrift.Type.STRING },
  5: { alias: 'linkedInProfileUrl', type: Thrift.Type.STRING },
  6: { alias: 'workPhone', type: Thrift.Type.STRING },
  7: { alias: 'companyStartDate', type: Thrift.Type.I64 }
});

module.exports.Accounting = Thrift.Struct.define('Accounting', {
  2: { alias: 'uploadLimitEnd', type: Thrift.Type.I64 },
  3: { alias: 'uploadLimitNextMonth', type: Thrift.Type.I64 },
  4: { alias: 'premiumServiceStatus', type: Thrift.Type.I32 },
  5: { alias: 'premiumOrderNumber', type: Thrift.Type.STRING },
  6: { alias: 'premiumCommerceService', type: Thrift.Type.STRING },
  7: { alias: 'premiumServiceStart', type: Thrift.Type.I64 },
  8: { alias: 'premiumServiceSKU', type: Thrift.Type.STRING },
  9: { alias: 'lastSuccessfulCharge', type: Thrift.Type.I64 },
  10: { alias: 'lastFailedCharge', type: Thrift.Type.I64 },
  11: { alias: 'lastFailedChargeReason', type: Thrift.Type.STRING },
  12: { alias: 'nextPaymentDue', type: Thrift.Type.I64 },
  13: { alias: 'premiumLockUntil', type: Thrift.Type.I64 },
  14: { alias: 'updated', type: Thrift.Type.I64 },
  16: { alias: 'premiumSubscriptionNumber', type: Thrift.Type.STRING },
  17: { alias: 'lastRequestedCharge', type: Thrift.Type.I64 },
  18: { alias: 'currency', type: Thrift.Type.STRING },
  19: { alias: 'unitPrice', type: Thrift.Type.I32 },
  20: { alias: 'businessId', type: Thrift.Type.I32 },
  21: { alias: 'businessName', type: Thrift.Type.STRING },
  22: { alias: 'businessRole', type: Thrift.Type.I32 },
  23: { alias: 'unitDiscount', type: Thrift.Type.I32 },
  24: { alias: 'nextChargeDate', type: Thrift.Type.I64 },
  25: { alias: 'availablePoints', type: Thrift.Type.I32 }
});

module.exports.BusinessUserInfo = Thrift.Struct.define('BusinessUserInfo', {
  1: { alias: 'businessId', type: Thrift.Type.I32 },
  2: { alias: 'businessName', type: Thrift.Type.STRING },
  3: { alias: 'role', type: Thrift.Type.I32 },
  4: { alias: 'email', type: Thrift.Type.STRING },
  5: { alias: 'updated', type: Thrift.Type.I64 }
});

module.exports.AccountLimits = Thrift.Struct.define('AccountLimits', {
  1: { alias: 'userMailLimitDaily', type: Thrift.Type.I32 },
  2: { alias: 'noteSizeMax', type: Thrift.Type.I64 },
  3: { alias: 'resourceSizeMax', type: Thrift.Type.I64 },
  4: { alias: 'userLinkedNotebookMax', type: Thrift.Type.I32 },
  5: { alias: 'uploadLimit', type: Thrift.Type.I64 },
  6: { alias: 'userNoteCountMax', type: Thrift.Type.I32 },
  7: { alias: 'userNotebookCountMax', type: Thrift.Type.I32 },
  8: { alias: 'userTagCountMax', type: Thrift.Type.I32 },
  9: { alias: 'noteTagCountMax', type: Thrift.Type.I32 },
  10: { alias: 'userSavedSearchesMax', type: Thrift.Type.I32 },
  11: { alias: 'noteResourceCountMax', type: Thrift.Type.I32 }
});

module.exports.PremiumInfo = Thrift.Struct.define('PremiumInfo', {
  1: { alias: 'currentTime', type: Thrift.Type.I64 },
  2: { alias: 'premium', type: Thrift.Type.BOOL },
  3: { alias: 'premiumRecurring', type: Thrift.Type.BOOL },
  4: { alias: 'premiumExpirationDate', type: Thrift.Type.I64 },
  5: { alias: 'premiumExtendable', type: Thrift.Type.BOOL },
  6: { alias: 'premiumPending', type: Thrift.Type.BOOL },
  7: { alias: 'premiumCancellationPending', type: Thrift.Type.BOOL },
  8: { alias: 'canPurchaseUploadAllowance', type: Thrift.Type.BOOL },
  11: { alias: 'premiumUpgradable', type: Thrift.Type.BOOL }
});

module.exports.User = Thrift.Struct.define('User', {
  1: { alias: 'id', type: Thrift.Type.I32 },
  2: { alias: 'username', type: Thrift.Type.STRING },
  3: { alias: 'email', type: Thrift.Type.STRING },
  4: { alias: 'name', type: Thrift.Type.STRING },
  6: { alias: 'timezone', type: Thrift.Type.STRING },
  7: { alias: 'privilege', type: Thrift.Type.I32 },
  21: { alias: 'serviceLevel', type: Thrift.Type.I32 },
  9: { alias: 'created', type: Thrift.Type.I64 },
  10: { alias: 'updated', type: Thrift.Type.I64 },
  11: { alias: 'deleted', type: Thrift.Type.I64 },
  13: { alias: 'active', type: Thrift.Type.BOOL },
  14: { alias: 'shardId', type: Thrift.Type.STRING },
  15: { alias: 'attributes', type: Thrift.Type.STRUCT, def: module.exports.UserAttributes },
  16: { alias: 'accounting', type: Thrift.Type.STRUCT, def: module.exports.Accounting },
  18: { alias: 'businessUserInfo', type: Thrift.Type.STRUCT, def: module.exports.BusinessUserInfo },
  19: { alias: 'photoUrl', type: Thrift.Type.STRING },
  20: { alias: 'photoLastUpdated', type: Thrift.Type.I64 },
  22: { alias: 'accountLimits', type: Thrift.Type.STRUCT, def: module.exports.AccountLimits }
});

module.exports.Contact = Thrift.Struct.define('Contact', {
  1: { alias: 'name', type: Thrift.Type.STRING },
  2: { alias: 'id', type: Thrift.Type.STRING },
  3: { alias: 'type', type: Thrift.Type.I32 },
  4: { alias: 'photoUrl', type: Thrift.Type.STRING },
  5: { alias: 'photoLastUpdated', type: Thrift.Type.I64 },
  6: { alias: 'messagingPermit', type: Thrift.Type.BINARY },
  7: { alias: 'messagingPermitExpires', type: Thrift.Type.I64 }
});

module.exports.Identity = Thrift.Struct.define('Identity', {
  1: { alias: 'id', type: Thrift.Type.I64 },
  2: { alias: 'contact', type: Thrift.Type.STRUCT, def: module.exports.Contact },
  3: { alias: 'userId', type: Thrift.Type.I32 },
  4: { alias: 'deactivated', type: Thrift.Type.BOOL },
  5: { alias: 'sameBusiness', type: Thrift.Type.BOOL },
  6: { alias: 'blocked', type: Thrift.Type.BOOL },
  7: { alias: 'userConnected', type: Thrift.Type.BOOL },
  8: { alias: 'eventId', type: Thrift.Type.I64 }
});

module.exports.Tag = Thrift.Struct.define('Tag', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'name', type: Thrift.Type.STRING },
  3: { alias: 'parentGuid', type: Thrift.Type.STRING },
  4: { alias: 'updateSequenceNum', type: Thrift.Type.I32 }
});

module.exports.LazyMap = Thrift.Struct.define('LazyMap', {
  1: { alias: 'keysOnly', type: Thrift.Type.SET, def: Thrift.Set.define(Thrift.Type.STRING) },
  2: { alias: 'fullMap', type: Thrift.Type.MAP, def: Thrift.Map.define(Thrift.Type.STRING, Thrift.Type.STRING) }
});

module.exports.ResourceAttributes = Thrift.Struct.define('ResourceAttributes', {
  1: { alias: 'sourceURL', type: Thrift.Type.STRING },
  2: { alias: 'timestamp', type: Thrift.Type.I64 },
  3: { alias: 'latitude', type: Thrift.Type.DOUBLE },
  4: { alias: 'longitude', type: Thrift.Type.DOUBLE },
  5: { alias: 'altitude', type: Thrift.Type.DOUBLE },
  6: { alias: 'cameraMake', type: Thrift.Type.STRING },
  7: { alias: 'cameraModel', type: Thrift.Type.STRING },
  8: { alias: 'clientWillIndex', type: Thrift.Type.BOOL },
  9: { alias: 'recoType', type: Thrift.Type.STRING },
  10: { alias: 'fileName', type: Thrift.Type.STRING },
  11: { alias: 'attachment', type: Thrift.Type.BOOL },
  12: { alias: 'applicationData', type: Thrift.Type.STRUCT, def: module.exports.LazyMap }
});

module.exports.Resource = Thrift.Struct.define('Resource', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'noteGuid', type: Thrift.Type.STRING },
  3: { alias: 'data', type: Thrift.Type.STRUCT, def: module.exports.Data },
  4: { alias: 'mime', type: Thrift.Type.STRING },
  5: { alias: 'width', type: Thrift.Type.I16 },
  6: { alias: 'height', type: Thrift.Type.I16 },
  7: { alias: 'duration', type: Thrift.Type.I16 },
  8: { alias: 'active', type: Thrift.Type.BOOL },
  9: { alias: 'recognition', type: Thrift.Type.STRUCT, def: module.exports.Data },
  11: { alias: 'attributes', type: Thrift.Type.STRUCT, def: module.exports.ResourceAttributes },
  12: { alias: 'updateSequenceNum', type: Thrift.Type.I32 },
  13: { alias: 'alternateData', type: Thrift.Type.STRUCT, def: module.exports.Data }
});

module.exports.NoteAttributes = Thrift.Struct.define('NoteAttributes', {
  1: { alias: 'subjectDate', type: Thrift.Type.I64 },
  10: { alias: 'latitude', type: Thrift.Type.DOUBLE },
  11: { alias: 'longitude', type: Thrift.Type.DOUBLE },
  12: { alias: 'altitude', type: Thrift.Type.DOUBLE },
  13: { alias: 'author', type: Thrift.Type.STRING },
  14: { alias: 'source', type: Thrift.Type.STRING },
  15: { alias: 'sourceURL', type: Thrift.Type.STRING },
  16: { alias: 'sourceApplication', type: Thrift.Type.STRING },
  17: { alias: 'shareDate', type: Thrift.Type.I64 },
  18: { alias: 'reminderOrder', type: Thrift.Type.I64 },
  19: { alias: 'reminderDoneTime', type: Thrift.Type.I64 },
  20: { alias: 'reminderTime', type: Thrift.Type.I64 },
  21: { alias: 'placeName', type: Thrift.Type.STRING },
  22: { alias: 'contentClass', type: Thrift.Type.STRING },
  23: { alias: 'applicationData', type: Thrift.Type.STRUCT, def: module.exports.LazyMap },
  24: { alias: 'lastEditedBy', type: Thrift.Type.STRING },
  26: { alias: 'classifications', type: Thrift.Type.MAP, def: Thrift.Map.define(Thrift.Type.STRING, Thrift.Type.STRING) },
  27: { alias: 'creatorId', type: Thrift.Type.I32 },
  28: { alias: 'lastEditorId', type: Thrift.Type.I32 },
  29: { alias: 'sharedWithBusiness', type: Thrift.Type.BOOL },
  30: { alias: 'conflictSourceNoteGuid', type: Thrift.Type.STRING },
  31: { alias: 'noteTitleQuality', type: Thrift.Type.I32 }
});

module.exports.SharedNote = Thrift.Struct.define('SharedNote', {
  1: { alias: 'sharerUserID', type: Thrift.Type.I32 },
  2: { alias: 'recipientIdentity', type: Thrift.Type.STRUCT, def: module.exports.Identity },
  3: { alias: 'privilege', type: Thrift.Type.I32 },
  4: { alias: 'serviceCreated', type: Thrift.Type.I64 },
  5: { alias: 'serviceUpdated', type: Thrift.Type.I64 },
  6: { alias: 'serviceAssigned', type: Thrift.Type.I64 }
});

module.exports.NoteRestrictions = Thrift.Struct.define('NoteRestrictions', {
  1: { alias: 'noUpdateTitle', type: Thrift.Type.BOOL },
  2: { alias: 'noUpdateContent', type: Thrift.Type.BOOL },
  3: { alias: 'noEmail', type: Thrift.Type.BOOL },
  4: { alias: 'noShare', type: Thrift.Type.BOOL },
  5: { alias: 'noSharePublicly', type: Thrift.Type.BOOL }
});

module.exports.NoteLimits = Thrift.Struct.define('NoteLimits', {
  1: { alias: 'noteResourceCountMax', type: Thrift.Type.I32 },
  2: { alias: 'uploadLimit', type: Thrift.Type.I64 },
  3: { alias: 'resourceSizeMax', type: Thrift.Type.I64 },
  4: { alias: 'noteSizeMax', type: Thrift.Type.I64 },
  5: { alias: 'uploaded', type: Thrift.Type.I64 }
});

module.exports.Note = Thrift.Struct.define('Note', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'title', type: Thrift.Type.STRING },
  3: { alias: 'content', type: Thrift.Type.STRING },
  4: { alias: 'contentHash', type: Thrift.Type.BINARY },
  5: { alias: 'contentLength', type: Thrift.Type.I32 },
  6: { alias: 'created', type: Thrift.Type.I64 },
  7: { alias: 'updated', type: Thrift.Type.I64 },
  8: { alias: 'deleted', type: Thrift.Type.I64 },
  9: { alias: 'active', type: Thrift.Type.BOOL },
  10: { alias: 'updateSequenceNum', type: Thrift.Type.I32 },
  11: { alias: 'notebookGuid', type: Thrift.Type.STRING },
  12: { alias: 'tagGuids', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRING) },
  13: { alias: 'resources', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRUCT, module.exports.Resource) },
  14: { alias: 'attributes', type: Thrift.Type.STRUCT, def: module.exports.NoteAttributes },
  15: { alias: 'tagNames', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRING) },
  16: { alias: 'sharedNotes', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRUCT, module.exports.SharedNote) },
  17: { alias: 'restrictions', type: Thrift.Type.STRUCT, def: module.exports.NoteRestrictions },
  18: { alias: 'limits', type: Thrift.Type.STRUCT, def: module.exports.NoteLimits }
});

module.exports.Publishing = Thrift.Struct.define('Publishing', {
  1: { alias: 'uri', type: Thrift.Type.STRING },
  2: { alias: 'order', type: Thrift.Type.I32 },
  3: { alias: 'ascending', type: Thrift.Type.BOOL },
  4: { alias: 'publicDescription', type: Thrift.Type.STRING }
});

module.exports.BusinessNotebook = Thrift.Struct.define('BusinessNotebook', {
  1: { alias: 'notebookDescription', type: Thrift.Type.STRING },
  2: { alias: 'privilege', type: Thrift.Type.I32 },
  3: { alias: 'recommended', type: Thrift.Type.BOOL }
});

module.exports.SavedSearchScope = Thrift.Struct.define('SavedSearchScope', {
  1: { alias: 'includeAccount', type: Thrift.Type.BOOL },
  2: { alias: 'includePersonalLinkedNotebooks', type: Thrift.Type.BOOL },
  3: { alias: 'includeBusinessLinkedNotebooks', type: Thrift.Type.BOOL }
});

module.exports.SavedSearch = Thrift.Struct.define('SavedSearch', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'name', type: Thrift.Type.STRING },
  3: { alias: 'query', type: Thrift.Type.STRING },
  4: { alias: 'format', type: Thrift.Type.I32 },
  5: { alias: 'updateSequenceNum', type: Thrift.Type.I32 },
  6: { alias: 'scope', type: Thrift.Type.STRUCT, def: module.exports.SavedSearchScope }
});

module.exports.Ad = Thrift.Struct.define('Ad', {
  1: { alias: 'id', type: Thrift.Type.I32 },
  2: { alias: 'width', type: Thrift.Type.I16 },
  3: { alias: 'height', type: Thrift.Type.I16 },
  4: { alias: 'advertiserName', type: Thrift.Type.STRING },
  5: { alias: 'imageUrl', type: Thrift.Type.STRING },
  6: { alias: 'destinationUrl', type: Thrift.Type.STRING },
  7: { alias: 'displaySeconds', type: Thrift.Type.I16 },
  8: { alias: 'score', type: Thrift.Type.DOUBLE },
  9: { alias: 'image', type: Thrift.Type.BINARY },
  10: { alias: 'imageMime', type: Thrift.Type.STRING },
  11: { alias: 'html', type: Thrift.Type.STRING },
  12: { alias: 'displayFrequency', type: Thrift.Type.DOUBLE },
  13: { alias: 'openInTrunk', type: Thrift.Type.BOOL }
});

module.exports.SharedNotebookRecipientSettings = Thrift.Struct.define('SharedNotebookRecipientSettings', {
  1: { alias: 'reminderNotifyEmail', type: Thrift.Type.BOOL },
  2: { alias: 'reminderNotifyInApp', type: Thrift.Type.BOOL }
});

module.exports.NotebookRecipientSettings = Thrift.Struct.define('NotebookRecipientSettings', {
  1: { alias: 'reminderNotifyEmail', type: Thrift.Type.BOOL },
  2: { alias: 'reminderNotifyInApp', type: Thrift.Type.BOOL },
  3: { alias: 'inMyList', type: Thrift.Type.BOOL },
  4: { alias: 'stack', type: Thrift.Type.STRING }
});

module.exports.SharedNotebook = Thrift.Struct.define('SharedNotebook', {
  1: { alias: 'id', type: Thrift.Type.I64 },
  2: { alias: 'userId', type: Thrift.Type.I32 },
  3: { alias: 'notebookGuid', type: Thrift.Type.STRING },
  4: { alias: 'email', type: Thrift.Type.STRING },
  18: { alias: 'recipientIdentityId', type: Thrift.Type.I64 },
  5: { alias: 'notebookModifiable', type: Thrift.Type.BOOL },
  7: { alias: 'serviceCreated', type: Thrift.Type.I64 },
  10: { alias: 'serviceUpdated', type: Thrift.Type.I64 },
  8: { alias: 'globalId', type: Thrift.Type.STRING },
  9: { alias: 'username', type: Thrift.Type.STRING },
  11: { alias: 'privilege', type: Thrift.Type.I32 },
  13: { alias: 'recipientSettings', type: Thrift.Type.STRUCT, def: module.exports.SharedNotebookRecipientSettings },
  14: { alias: 'sharerUserId', type: Thrift.Type.I32 },
  15: { alias: 'recipientUsername', type: Thrift.Type.STRING },
  17: { alias: 'recipientUserId', type: Thrift.Type.I32 },
  16: { alias: 'serviceAssigned', type: Thrift.Type.I64 }
});

module.exports.NotebookRestrictions = Thrift.Struct.define('NotebookRestrictions', {
  1: { alias: 'noReadNotes', type: Thrift.Type.BOOL },
  2: { alias: 'noCreateNotes', type: Thrift.Type.BOOL },
  3: { alias: 'noUpdateNotes', type: Thrift.Type.BOOL },
  4: { alias: 'noExpungeNotes', type: Thrift.Type.BOOL },
  5: { alias: 'noShareNotes', type: Thrift.Type.BOOL },
  6: { alias: 'noEmailNotes', type: Thrift.Type.BOOL },
  7: { alias: 'noSendMessageToRecipients', type: Thrift.Type.BOOL },
  8: { alias: 'noUpdateNotebook', type: Thrift.Type.BOOL },
  9: { alias: 'noExpungeNotebook', type: Thrift.Type.BOOL },
  10: { alias: 'noSetDefaultNotebook', type: Thrift.Type.BOOL },
  11: { alias: 'noSetNotebookStack', type: Thrift.Type.BOOL },
  12: { alias: 'noPublishToPublic', type: Thrift.Type.BOOL },
  13: { alias: 'noPublishToBusinessLibrary', type: Thrift.Type.BOOL },
  14: { alias: 'noCreateTags', type: Thrift.Type.BOOL },
  15: { alias: 'noUpdateTags', type: Thrift.Type.BOOL },
  16: { alias: 'noExpungeTags', type: Thrift.Type.BOOL },
  17: { alias: 'noSetParentTag', type: Thrift.Type.BOOL },
  18: { alias: 'noCreateSharedNotebooks', type: Thrift.Type.BOOL },
  19: { alias: 'updateWhichSharedNotebookRestrictions', type: Thrift.Type.I32 },
  20: { alias: 'expungeWhichSharedNotebookRestrictions', type: Thrift.Type.I32 },
  21: { alias: 'noShareNotesWithBusiness', type: Thrift.Type.BOOL },
  22: { alias: 'noRenameNotebook', type: Thrift.Type.BOOL }
});

module.exports.Notebook = Thrift.Struct.define('Notebook', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'name', type: Thrift.Type.STRING },
  5: { alias: 'updateSequenceNum', type: Thrift.Type.I32 },
  6: { alias: 'defaultNotebook', type: Thrift.Type.BOOL },
  7: { alias: 'serviceCreated', type: Thrift.Type.I64 },
  8: { alias: 'serviceUpdated', type: Thrift.Type.I64 },
  10: { alias: 'publishing', type: Thrift.Type.STRUCT, def: module.exports.Publishing },
  11: { alias: 'published', type: Thrift.Type.BOOL },
  12: { alias: 'stack', type: Thrift.Type.STRING },
  13: { alias: 'sharedNotebookIds', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.I64) },
  14: { alias: 'sharedNotebooks', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRUCT, module.exports.SharedNotebook) },
  15: { alias: 'businessNotebook', type: Thrift.Type.STRUCT, def: module.exports.BusinessNotebook },
  16: { alias: 'contact', type: Thrift.Type.STRUCT, def: module.exports.User },
  17: { alias: 'restrictions', type: Thrift.Type.STRUCT, def: module.exports.NotebookRestrictions },
  18: { alias: 'recipientSettings', type: Thrift.Type.STRUCT, def: module.exports.NotebookRecipientSettings }
});

module.exports.LinkedNotebook = Thrift.Struct.define('LinkedNotebook', {
  2: { alias: 'shareName', type: Thrift.Type.STRING },
  3: { alias: 'username', type: Thrift.Type.STRING },
  4: { alias: 'shardId', type: Thrift.Type.STRING },
  5: { alias: 'sharedNotebookGlobalId', type: Thrift.Type.STRING },
  6: { alias: 'uri', type: Thrift.Type.STRING },
  7: { alias: 'guid', type: Thrift.Type.STRING },
  8: { alias: 'updateSequenceNum', type: Thrift.Type.I32 },
  9: { alias: 'noteStoreUrl', type: Thrift.Type.STRING },
  10: { alias: 'webApiUrlPrefix', type: Thrift.Type.STRING },
  11: { alias: 'stack', type: Thrift.Type.STRING },
  12: { alias: 'businessId', type: Thrift.Type.I32 }
});

module.exports.NotebookDescriptor = Thrift.Struct.define('NotebookDescriptor', {
  1: { alias: 'guid', type: Thrift.Type.STRING },
  2: { alias: 'notebookDisplayName', type: Thrift.Type.STRING },
  3: { alias: 'contactName', type: Thrift.Type.STRING },
  4: { alias: 'hasSharedNotebook', type: Thrift.Type.BOOL },
  5: { alias: 'joinedUserCount', type: Thrift.Type.I32 }
});

module.exports.UserProfile = Thrift.Struct.define('UserProfile', {
  1: { alias: 'id', type: Thrift.Type.I32 },
  2: { alias: 'name', type: Thrift.Type.STRING },
  3: { alias: 'email', type: Thrift.Type.STRING },
  4: { alias: 'username', type: Thrift.Type.STRING },
  5: { alias: 'attributes', type: Thrift.Type.STRUCT, def: module.exports.BusinessUserAttributes },
  6: { alias: 'joined', type: Thrift.Type.I64 },
  7: { alias: 'photoLastUpdated', type: Thrift.Type.I64 },
  8: { alias: 'photoUrl', type: Thrift.Type.STRING },
  9: { alias: 'role', type: Thrift.Type.I32 }
});

module.exports.RelatedContentImage = Thrift.Struct.define('RelatedContentImage', {
  1: { alias: 'url', type: Thrift.Type.STRING },
  2: { alias: 'width', type: Thrift.Type.I32 },
  3: { alias: 'height', type: Thrift.Type.I32 },
  4: { alias: 'pixelRatio', type: Thrift.Type.DOUBLE },
  5: { alias: 'fileSize', type: Thrift.Type.I32 }
});

module.exports.RelatedContent = Thrift.Struct.define('RelatedContent', {
  1: { alias: 'contentId', type: Thrift.Type.STRING },
  2: { alias: 'title', type: Thrift.Type.STRING },
  3: { alias: 'url', type: Thrift.Type.STRING },
  4: { alias: 'sourceId', type: Thrift.Type.STRING },
  5: { alias: 'sourceUrl', type: Thrift.Type.STRING },
  6: { alias: 'sourceFaviconUrl', type: Thrift.Type.STRING },
  7: { alias: 'sourceName', type: Thrift.Type.STRING },
  8: { alias: 'date', type: Thrift.Type.I64 },
  9: { alias: 'teaser', type: Thrift.Type.STRING },
  10: { alias: 'thumbnails', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRUCT, module.exports.RelatedContentImage) },
  11: { alias: 'contentType', type: Thrift.Type.I32 },
  12: { alias: 'accessType', type: Thrift.Type.I32 },
  13: { alias: 'visibleUrl', type: Thrift.Type.STRING },
  14: { alias: 'clipUrl', type: Thrift.Type.STRING },
  15: { alias: 'contact', type: Thrift.Type.STRUCT, def: module.exports.Contact },
  16: { alias: 'authors', type: Thrift.Type.LIST, def: Thrift.List.define(Thrift.Type.STRING) }
});

module.exports.BusinessInvitation = Thrift.Struct.define('BusinessInvitation', {
  1: { alias: 'businessId', type: Thrift.Type.I32 },
  2: { alias: 'email', type: Thrift.Type.STRING },
  3: { alias: 'role', type: Thrift.Type.I32 },
  4: { alias: 'status', type: Thrift.Type.I32 },
  5: { alias: 'requesterId', type: Thrift.Type.I32 },
  6: { alias: 'fromWorkChat', type: Thrift.Type.BOOL },
  7: { alias: 'created', type: Thrift.Type.I64 }
});

module.exports.UserIdentity = Thrift.Struct.define('UserIdentity', {
  1: { alias: 'type', type: Thrift.Type.I32 },
  2: { alias: 'stringIdentifier', type: Thrift.Type.STRING },
  3: { alias: 'longIdentifier', type: Thrift.Type.I64 }
});