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

#import "DBFILEPROPERTIESUserAuthRoutes.h"
#import "DBFILEPROPERTIESAddPropertiesArg.h"
#import "DBFILEPROPERTIESAddPropertiesError.h"
#import "DBFILEPROPERTIESAddTemplateArg.h"
#import "DBFILEPROPERTIESAddTemplateResult.h"
#import "DBFILEPROPERTIESGetTemplateArg.h"
#import "DBFILEPROPERTIESGetTemplateResult.h"
#import "DBFILEPROPERTIESInvalidPropertyGroupError.h"
#import "DBFILEPROPERTIESListTemplateResult.h"
#import "DBFILEPROPERTIESLookUpPropertiesError.h"
#import "DBFILEPROPERTIESLookupError.h"
#import "DBFILEPROPERTIESModifyTemplateError.h"
#import "DBFILEPROPERTIESOverwritePropertyGroupArg.h"
#import "DBFILEPROPERTIESPropertiesError.h"
#import "DBFILEPROPERTIESPropertiesSearchArg.h"
#import "DBFILEPROPERTIESPropertiesSearchContinueArg.h"
#import "DBFILEPROPERTIESPropertiesSearchContinueError.h"
#import "DBFILEPROPERTIESPropertiesSearchError.h"
#import "DBFILEPROPERTIESPropertiesSearchMatch.h"
#import "DBFILEPROPERTIESPropertiesSearchQuery.h"
#import "DBFILEPROPERTIESPropertiesSearchResult.h"
#import "DBFILEPROPERTIESPropertyFieldTemplate.h"
#import "DBFILEPROPERTIESPropertyGroup.h"
#import "DBFILEPROPERTIESPropertyGroupTemplate.h"
#import "DBFILEPROPERTIESPropertyGroupUpdate.h"
#import "DBFILEPROPERTIESRemovePropertiesArg.h"
#import "DBFILEPROPERTIESRemovePropertiesError.h"
#import "DBFILEPROPERTIESRemoveTemplateArg.h"
#import "DBFILEPROPERTIESRouteObjects.h"
#import "DBFILEPROPERTIESTemplateError.h"
#import "DBFILEPROPERTIESTemplateFilter.h"
#import "DBFILEPROPERTIESUpdatePropertiesArg.h"
#import "DBFILEPROPERTIESUpdatePropertiesError.h"
#import "DBFILEPROPERTIESUpdateTemplateArg.h"
#import "DBFILEPROPERTIESUpdateTemplateResult.h"
#import "DBRequestErrors.h"
#import "DBStoneBase.h"
#import "DBTransportClientProtocol.h"

@implementation DBFILEPROPERTIESUserAuthRoutes

- (instancetype)init:(id<DBTransportClient>)client {
  self = [super init];
  if (self) {
    _client = client;
  }
  return self;
}

- (DBRpcTask *)propertiesAdd:(NSString *)path
              propertyGroups:(NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesAdd;
  DBFILEPROPERTIESAddPropertiesArg *arg =
      [[DBFILEPROPERTIESAddPropertiesArg alloc] initWithPath:path propertyGroups:propertyGroups];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesOverwrite:(NSString *)path
                    propertyGroups:(NSArray<DBFILEPROPERTIESPropertyGroup *> *)propertyGroups {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesOverwrite;
  DBFILEPROPERTIESOverwritePropertyGroupArg *arg =
      [[DBFILEPROPERTIESOverwritePropertyGroupArg alloc] initWithPath:path propertyGroups:propertyGroups];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesRemove:(NSString *)path propertyTemplateIds:(NSArray<NSString *> *)propertyTemplateIds {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesRemove;
  DBFILEPROPERTIESRemovePropertiesArg *arg =
      [[DBFILEPROPERTIESRemovePropertiesArg alloc] initWithPath:path propertyTemplateIds:propertyTemplateIds];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesSearch:(NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesSearch;
  DBFILEPROPERTIESPropertiesSearchArg *arg = [[DBFILEPROPERTIESPropertiesSearchArg alloc] initWithQueries:queries];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesSearch:(NSArray<DBFILEPROPERTIESPropertiesSearchQuery *> *)queries
                 templateFilter:(DBFILEPROPERTIESTemplateFilter *)templateFilter {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesSearch;
  DBFILEPROPERTIESPropertiesSearchArg *arg =
      [[DBFILEPROPERTIESPropertiesSearchArg alloc] initWithQueries:queries templateFilter:templateFilter];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesSearchContinue:(NSString *)cursor {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesSearchContinue;
  DBFILEPROPERTIESPropertiesSearchContinueArg *arg =
      [[DBFILEPROPERTIESPropertiesSearchContinueArg alloc] initWithCursor:cursor];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)propertiesUpdate:(NSString *)path
           updatePropertyGroups:(NSArray<DBFILEPROPERTIESPropertyGroupUpdate *> *)updatePropertyGroups {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESPropertiesUpdate;
  DBFILEPROPERTIESUpdatePropertiesArg *arg =
      [[DBFILEPROPERTIESUpdatePropertiesArg alloc] initWithPath:path updatePropertyGroups:updatePropertyGroups];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)templatesAddForUser:(NSString *)name
                      description_:(NSString *)description_
                            fields:(NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)fields {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesAddForUser;
  DBFILEPROPERTIESAddTemplateArg *arg =
      [[DBFILEPROPERTIESAddTemplateArg alloc] initWithName:name description_:description_ fields:fields];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)templatesGetForUser:(NSString *)templateId {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesGetForUser;
  DBFILEPROPERTIESGetTemplateArg *arg = [[DBFILEPROPERTIESGetTemplateArg alloc] initWithTemplateId:templateId];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)templatesListForUser {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesListForUser;
  return [self.client requestRpc:route arg:nil];
}

- (DBRpcTask *)templatesRemoveForUser:(NSString *)templateId {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesRemoveForUser;
  DBFILEPROPERTIESRemoveTemplateArg *arg = [[DBFILEPROPERTIESRemoveTemplateArg alloc] initWithTemplateId:templateId];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)templatesUpdateForUser:(NSString *)templateId {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesUpdateForUser;
  DBFILEPROPERTIESUpdateTemplateArg *arg = [[DBFILEPROPERTIESUpdateTemplateArg alloc] initWithTemplateId:templateId];
  return [self.client requestRpc:route arg:arg];
}

- (DBRpcTask *)templatesUpdateForUser:(NSString *)templateId
                                 name:(NSString *)name
                         description_:(NSString *)description_
                            addFields:(NSArray<DBFILEPROPERTIESPropertyFieldTemplate *> *)addFields {
  DBRoute *route = DBFILEPROPERTIESRouteObjects.DBFILEPROPERTIESTemplatesUpdateForUser;
  DBFILEPROPERTIESUpdateTemplateArg *arg = [[DBFILEPROPERTIESUpdateTemplateArg alloc] initWithTemplateId:templateId
                                                                                                    name:name
                                                                                            description_:description_
                                                                                               addFields:addFields];
  return [self.client requestRpc:route arg:arg];
}

@end
