// NOTE: This file was generated by the ServiceGenerator.

// ----------------------------------------------------------------------------
// API:
//   Google Sheets API (sheets/v4)
// Description:
//   Reads and writes Google Sheets.
// Documentation:
//   https://developers.google.com/sheets/

#import <GoogleAPIClientForREST/GTLRSheetsQuery.h>

// ----------------------------------------------------------------------------
// Constants

// dateTimeRenderOption
NSString * const kGTLRSheetsDateTimeRenderOptionFormattedString = @"FORMATTED_STRING";
NSString * const kGTLRSheetsDateTimeRenderOptionSerialNumber   = @"SERIAL_NUMBER";

// insertDataOption
NSString * const kGTLRSheetsInsertDataOptionInsertRows = @"INSERT_ROWS";
NSString * const kGTLRSheetsInsertDataOptionOverwrite  = @"OVERWRITE";

// majorDimension
NSString * const kGTLRSheetsMajorDimensionColumns              = @"COLUMNS";
NSString * const kGTLRSheetsMajorDimensionDimensionUnspecified = @"DIMENSION_UNSPECIFIED";
NSString * const kGTLRSheetsMajorDimensionRows                 = @"ROWS";

// responseDateTimeRenderOption
NSString * const kGTLRSheetsResponseDateTimeRenderOptionFormattedString = @"FORMATTED_STRING";
NSString * const kGTLRSheetsResponseDateTimeRenderOptionSerialNumber = @"SERIAL_NUMBER";

// responseValueRenderOption
NSString * const kGTLRSheetsResponseValueRenderOptionFormattedValue = @"FORMATTED_VALUE";
NSString * const kGTLRSheetsResponseValueRenderOptionFormula   = @"FORMULA";
NSString * const kGTLRSheetsResponseValueRenderOptionUnformattedValue = @"UNFORMATTED_VALUE";

// valueInputOption
NSString * const kGTLRSheetsValueInputOptionInputValueOptionUnspecified = @"INPUT_VALUE_OPTION_UNSPECIFIED";
NSString * const kGTLRSheetsValueInputOptionRaw                = @"RAW";
NSString * const kGTLRSheetsValueInputOptionUserEntered        = @"USER_ENTERED";

// valueRenderOption
NSString * const kGTLRSheetsValueRenderOptionFormattedValue   = @"FORMATTED_VALUE";
NSString * const kGTLRSheetsValueRenderOptionFormula          = @"FORMULA";
NSString * const kGTLRSheetsValueRenderOptionUnformattedValue = @"UNFORMATTED_VALUE";

// ----------------------------------------------------------------------------
// Query Classes
//

@implementation GTLRSheetsQuery

@dynamic fields;

@end

@implementation GTLRSheetsQuery_SpreadsheetsBatchUpdate

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchUpdateSpreadsheetRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}:batchUpdate";
  GTLRSheetsQuery_SpreadsheetsBatchUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchUpdateSpreadsheetResponse class];
  query.loggingName = @"sheets.spreadsheets.batchUpdate";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsCreate

+ (instancetype)queryWithObject:(GTLRSheets_Spreadsheet *)object {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSString *pathURITemplate = @"v4/spreadsheets";
  GTLRSheetsQuery_SpreadsheetsCreate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:nil];
  query.bodyObject = object;
  query.expectedObjectClass = [GTLRSheets_Spreadsheet class];
  query.loggingName = @"sheets.spreadsheets.create";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsDeveloperMetadataGet

@dynamic metadataId, spreadsheetId;

+ (instancetype)queryWithSpreadsheetId:(NSString *)spreadsheetId
                            metadataId:(NSInteger)metadataId {
  NSArray *pathParams = @[
    @"metadataId", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}";
  GTLRSheetsQuery_SpreadsheetsDeveloperMetadataGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.spreadsheetId = spreadsheetId;
  query.metadataId = metadataId;
  query.expectedObjectClass = [GTLRSheets_DeveloperMetadata class];
  query.loggingName = @"sheets.spreadsheets.developerMetadata.get";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsDeveloperMetadataSearch

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_SearchDeveloperMetadataRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/developerMetadata:search";
  GTLRSheetsQuery_SpreadsheetsDeveloperMetadataSearch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_SearchDeveloperMetadataResponse class];
  query.loggingName = @"sheets.spreadsheets.developerMetadata.search";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsGet

@dynamic includeGridData, ranges, spreadsheetId;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"ranges" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithSpreadsheetId:(NSString *)spreadsheetId {
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}";
  GTLRSheetsQuery_SpreadsheetsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_Spreadsheet class];
  query.loggingName = @"sheets.spreadsheets.get";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsGetByDataFilter

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_GetSpreadsheetByDataFilterRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}:getByDataFilter";
  GTLRSheetsQuery_SpreadsheetsGetByDataFilter *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_Spreadsheet class];
  query.loggingName = @"sheets.spreadsheets.getByDataFilter";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsSheetsCopyTo

@dynamic sheetId, spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_CopySheetToAnotherSpreadsheetRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId
                        sheetId:(NSInteger)sheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"sheetId", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo";
  GTLRSheetsQuery_SpreadsheetsSheetsCopyTo *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.sheetId = sheetId;
  query.expectedObjectClass = [GTLRSheets_SheetProperties class];
  query.loggingName = @"sheets.spreadsheets.sheets.copyTo";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesAppend

@dynamic includeValuesInResponse, insertDataOption, range,
         responseDateTimeRenderOption, responseValueRenderOption, spreadsheetId,
         valueInputOption;

+ (instancetype)queryWithObject:(GTLRSheets_ValueRange *)object
                  spreadsheetId:(NSString *)spreadsheetId
                          range:(NSString *)range {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"range", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values/{range}:append";
  GTLRSheetsQuery_SpreadsheetsValuesAppend *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.range = range;
  query.expectedObjectClass = [GTLRSheets_AppendValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.append";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchClear

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchClearValuesRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchClear";
  GTLRSheetsQuery_SpreadsheetsValuesBatchClear *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchClearValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchClear";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchClearByDataFilter

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchClearValuesByDataFilterRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter";
  GTLRSheetsQuery_SpreadsheetsValuesBatchClearByDataFilter *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchClearValuesByDataFilterResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchClearByDataFilter";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchGet

@dynamic dateTimeRenderOption, majorDimension, ranges, spreadsheetId,
         valueRenderOption;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"ranges" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithSpreadsheetId:(NSString *)spreadsheetId {
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchGet";
  GTLRSheetsQuery_SpreadsheetsValuesBatchGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchGetValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchGet";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchGetByDataFilter

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchGetValuesByDataFilterRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter";
  GTLRSheetsQuery_SpreadsheetsValuesBatchGetByDataFilter *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchGetValuesByDataFilterResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchGetByDataFilter";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchUpdate

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchUpdateValuesRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchUpdate";
  GTLRSheetsQuery_SpreadsheetsValuesBatchUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchUpdateValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchUpdate";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesBatchUpdateByDataFilter

@dynamic spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_BatchUpdateValuesByDataFilterRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"spreadsheetId" ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter";
  GTLRSheetsQuery_SpreadsheetsValuesBatchUpdateByDataFilter *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.expectedObjectClass = [GTLRSheets_BatchUpdateValuesByDataFilterResponse class];
  query.loggingName = @"sheets.spreadsheets.values.batchUpdateByDataFilter";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesClear

@dynamic range, spreadsheetId;

+ (instancetype)queryWithObject:(GTLRSheets_ClearValuesRequest *)object
                  spreadsheetId:(NSString *)spreadsheetId
                          range:(NSString *)range {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"range", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values/{range}:clear";
  GTLRSheetsQuery_SpreadsheetsValuesClear *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.range = range;
  query.expectedObjectClass = [GTLRSheets_ClearValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.clear";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesGet

@dynamic dateTimeRenderOption, majorDimension, range, spreadsheetId,
         valueRenderOption;

+ (instancetype)queryWithSpreadsheetId:(NSString *)spreadsheetId
                                 range:(NSString *)range {
  NSArray *pathParams = @[
    @"range", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values/{range}";
  GTLRSheetsQuery_SpreadsheetsValuesGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.spreadsheetId = spreadsheetId;
  query.range = range;
  query.expectedObjectClass = [GTLRSheets_ValueRange class];
  query.loggingName = @"sheets.spreadsheets.values.get";
  return query;
}

@end

@implementation GTLRSheetsQuery_SpreadsheetsValuesUpdate

@dynamic includeValuesInResponse, range, responseDateTimeRenderOption,
         responseValueRenderOption, spreadsheetId, valueInputOption;

+ (instancetype)queryWithObject:(GTLRSheets_ValueRange *)object
                  spreadsheetId:(NSString *)spreadsheetId
                          range:(NSString *)range {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"range", @"spreadsheetId"
  ];
  NSString *pathURITemplate = @"v4/spreadsheets/{spreadsheetId}/values/{range}";
  GTLRSheetsQuery_SpreadsheetsValuesUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.spreadsheetId = spreadsheetId;
  query.range = range;
  query.expectedObjectClass = [GTLRSheets_UpdateValuesResponse class];
  query.loggingName = @"sheets.spreadsheets.values.update";
  return query;
}

@end
