///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
/// Auto-generated by Stone, do not modify.
///

#import "DBAUTHRouteObjects.h"
#import "DBAUTHAppAuthRoutes.h"
#import "DBAUTHTokenFromOAuth1Error.h"
#import "DBAUTHTokenFromOAuth1Result.h"
#import "DBAUTHUserAuthRoutes.h"
#import "DBRequestErrors.h"
#import "DBStoneBase.h"

@implementation DBAUTHRouteObjects

static DBRoute *DBAUTHTokenFromOauth1;
static DBRoute *DBAUTHTokenRevoke;

static NSObject *lockObj = nil;
+ (void)initialize {
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    lockObj = [[NSObject alloc] init];
  });
}

+ (DBRoute *)DBAUTHTokenFromOauth1 {
  @synchronized(lockObj) {
    if (!DBAUTHTokenFromOauth1) {
      DBAUTHTokenFromOauth1 = [[DBRoute alloc] init:@"token/from_oauth1"
                                         namespace_:@"auth"
                                         deprecated:@YES
                                         resultType:[DBAUTHTokenFromOAuth1Result class]
                                          errorType:[DBAUTHTokenFromOAuth1Error class]
                                              attrs:@{@"auth" : @"app", @"host" : @"api", @"style" : @"rpc"}
                              dataStructSerialBlock:nil
                            dataStructDeserialBlock:nil];
    }
    return DBAUTHTokenFromOauth1;
  }
}

+ (DBRoute *)DBAUTHTokenRevoke {
  @synchronized(lockObj) {
    if (!DBAUTHTokenRevoke) {
      DBAUTHTokenRevoke = [[DBRoute alloc] init:@"token/revoke"
                                     namespace_:@"auth"
                                     deprecated:@NO
                                     resultType:nil
                                      errorType:nil
                                          attrs:@{@"auth" : @"user", @"host" : @"api", @"style" : @"rpc"}
                          dataStructSerialBlock:nil
                        dataStructDeserialBlock:nil];
    }
    return DBAUTHTokenRevoke;
  }
}

@end
