/*
 * 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 "EDAMTypes.h"
#import "EDAMErrors.h"

@interface EDAMPublicUserInfo : FATObject 
@property (nonatomic, strong) NSNumber * userId; // EDAMUserID
@property (nonatomic, strong) NSString * shardId;
@property (nonatomic, strong) NSNumber * privilege; // int
@property (nonatomic, strong) NSString * username;
@property (nonatomic, strong) NSString * noteStoreUrl;
@property (nonatomic, strong) NSString * webApiUrlPrefix;
@end

@interface EDAMUserUrls : FATObject 
@property (nonatomic, strong) NSString * noteStoreUrl;
@property (nonatomic, strong) NSString * webApiUrlPrefix;
@property (nonatomic, strong) NSString * userStoreUrl;
@property (nonatomic, strong) NSString * utilityUrl;
@property (nonatomic, strong) NSString * messageStoreUrl;
@property (nonatomic, strong) NSString * userWebSocketUrl;
@end

@interface EDAMAuthenticationResult : FATObject 
@property (nonatomic, strong) NSNumber * currentTime; // EDAMTimestamp
@property (nonatomic, strong) NSString * authenticationToken;
@property (nonatomic, strong) NSNumber * expiration; // EDAMTimestamp
@property (nonatomic, strong) EDAMUser * user;
@property (nonatomic, strong) EDAMPublicUserInfo * publicUserInfo;
@property (nonatomic, strong) NSString * noteStoreUrl;
@property (nonatomic, strong) NSString * webApiUrlPrefix;
@property (nonatomic, strong) NSNumber * secondFactorRequired; // BOOL
@property (nonatomic, strong) NSString * secondFactorDeliveryHint;
@property (nonatomic, strong) EDAMUserUrls * urls;
@end

@interface EDAMBootstrapSettings : FATObject 
@property (nonatomic, strong) NSString * serviceHost;
@property (nonatomic, strong) NSString * marketingUrl;
@property (nonatomic, strong) NSString * supportUrl;
@property (nonatomic, strong) NSString * accountEmailDomain;
@property (nonatomic, strong) NSString * cardscanUrl;
@property (nonatomic, strong) NSString * announcementsUrl;
@property (nonatomic, strong) NSNumber * enableFacebookSharing; // BOOL
@property (nonatomic, strong) NSNumber * enableGiftSubscriptions; // BOOL
@property (nonatomic, strong) NSNumber * enableSupportTickets; // BOOL
@property (nonatomic, strong) NSNumber * enableSharedNotebooks; // BOOL
@property (nonatomic, strong) NSNumber * enableSingleNoteSharing; // BOOL
@property (nonatomic, strong) NSNumber * enableSponsoredAccounts; // BOOL
@property (nonatomic, strong) NSNumber * enableTwitterSharing; // BOOL
@property (nonatomic, strong) NSNumber * enableLinkedInSharing; // BOOL
@property (nonatomic, strong) NSNumber * enablePublicNotebooks; // BOOL
@property (nonatomic, strong) NSNumber * enableGoogle; // BOOL
@end

@interface EDAMBootstrapProfile : FATObject 
@property (nonatomic, strong) NSString * name;
@property (nonatomic, strong) EDAMBootstrapSettings * settings;
@end

@interface EDAMBootstrapInfo : FATObject 
@property (nonatomic, strong) NSArray * profiles;
@end

@interface EDAMPushNotificationCredentials : FATObject 
@property (nonatomic, strong) NSData * iosDeviceToken;
@property (nonatomic, strong) NSString * gcmRegistrationId;
@end

@interface EDAMRegisterForSyncPushNotificationsResult : FATObject 
@property (nonatomic, strong) NSData * sharedSecret;
@end

@protocol EDAMUserStore <NSObject>
- (BOOL) checkVersion: (NSString *) clientName edamVersionMajor: (int16_t) edamVersionMajor edamVersionMinor: (int16_t) edamVersionMinor;  // throws TException
- (EDAMBootstrapInfo *) getBootstrapInfo: (NSString *) locale;  // throws TException
- (EDAMAuthenticationResult *) authenticate: (NSString *) username password: (NSString *) password consumerKey: (NSString *) consumerKey consumerSecret: (NSString *) consumerSecret supportsTwoFactor: (BOOL) supportsTwoFactor;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMAuthenticationResult *) authenticateLongSession: (NSString *) username password: (NSString *) password consumerKey: (NSString *) consumerKey consumerSecret: (NSString *) consumerSecret deviceIdentifier: (NSString *) deviceIdentifier deviceDescription: (NSString *) deviceDescription supportsTwoFactor: (BOOL) supportsTwoFactor;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMAuthenticationResult *) completeTwoFactorAuthentication: (NSString *) authenticationToken oneTimeCode: (NSString *) oneTimeCode deviceIdentifier: (NSString *) deviceIdentifier deviceDescription: (NSString *) deviceDescription;  // throws EDAMUserException *, EDAMSystemException *, TException
- (void) revokeLongSession: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMAuthenticationResult *) authenticateToBusiness: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMAuthenticationResult *) refreshAuthentication: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMUser *) getUser: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMPublicUserInfo *) getPublicUserInfo: (NSString *) username;  // throws EDAMNotFoundException *, EDAMSystemException *, EDAMUserException *, TException
- (EDAMPremiumInfo *) getPremiumInfo: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (NSString *) getNoteStoreUrl: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMUserUrls *) getUserUrls: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (void) inviteToBusiness: (NSString *) authenticationToken emailAddress: (NSString *) emailAddress;  // throws EDAMUserException *, EDAMSystemException *, TException
- (void) removeFromBusiness: (NSString *) authenticationToken emailAddress: (NSString *) emailAddress;  // throws EDAMUserException *, EDAMSystemException *, EDAMNotFoundException *, TException
- (void) updateBusinessUserIdentifier: (NSString *) authenticationToken oldEmailAddress: (NSString *) oldEmailAddress newEmailAddress: (NSString *) newEmailAddress;  // throws EDAMUserException *, EDAMSystemException *, EDAMNotFoundException *, TException
- (NSArray *) listBusinessUsers: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, TException
- (NSArray *) listBusinessInvitations: (NSString *) authenticationToken includeRequestedInvitations: (BOOL) includeRequestedInvitations;  // throws EDAMUserException *, EDAMSystemException *, TException
- (EDAMRegisterForSyncPushNotificationsResult *) registerForSyncPushNotifications: (NSString *) authenticationToken credentials: (EDAMPushNotificationCredentials *) credentials;  // throws EDAMUserException *, EDAMSystemException *, EDAMNotFoundException *, TException
- (void) unregisterForSyncPushNotifications: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, EDAMNotFoundException *, TException
- (NSString *) createSessionAuthenticationToken: (NSString *) authenticationToken;  // throws EDAMUserException *, EDAMSystemException *, EDAMNotFoundException *, TException
@end

@interface EDAMUserStoreClient : NSObject <EDAMUserStore> 
- (id) initWithProtocol: (id <ENTProtocol>) protocol;
- (id) initWithInProtocol: (id <ENTProtocol>) inProtocol outProtocol: (id <ENTProtocol>) outProtocol;
@end

@interface EDAMUserStoreConstants : NSObject 
+ (int16_t) EDAM_VERSION_MAJOR;
+ (int16_t) EDAM_VERSION_MINOR;
@end
