text: "use strict";
  /**
   * Copyright 2015 Google Inc. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  const googleapis_common_1 = require("googleapis-common");
  // tslint:disable: no-any
  // tslint:disable: class-name
  // tslint:disable: variable-name
  // tslint:disable: jsdoc-format
  // tslint:disable: no-namespace
  var sheets_v4;
  (function (sheets_v4) {
      /**
       * Google Sheets API
       *
       * Reads and writes Google Sheets.
       *
       * @example
       * const {google} = require('googleapis');
       * const sheets = google.sheets('v4');
       *
       * @namespace sheets
       * @type {Function}
       * @version v4
       * @variation v4
       * @param {object=} options Options for Sheets
       */
      class Sheets {
          constructor(options, google) {
              this.root = this;
              this._options = options || {};
              this.google = google;
              this.getRoot.bind(this);
              this.spreadsheets = new Resource$Spreadsheets(this);
          }
          getRoot() {
              return this.root;
          }
      }
      sheets_v4.Sheets = Sheets;
      class Resource$Spreadsheets {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
              this.developerMetadata =
                  new Resource$Spreadsheets$Developermetadata(root);
              this.sheets = new Resource$Spreadsheets$Sheets(root);
              this.values = new Resource$Spreadsheets$Values(root);
          }
          getRoot() {
              return this.root;
          }
          batchUpdate(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}:batchUpdate')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          create(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets').replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          get(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          getByDataFilter(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}:getByDataFilter')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sheets_v4.Resource$Spreadsheets = Resource$Spreadsheets;
      class Resource$Spreadsheets$Developermetadata {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          get(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'metadataId'],
                  pathParams: ['metadataId', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          search(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/developerMetadata:search')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sheets_v4.Resource$Spreadsheets$Developermetadata = Resource$Spreadsheets$Developermetadata;
      class Resource$Spreadsheets$Sheets {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          copyTo(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'sheetId'],
                  pathParams: ['sheetId', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sheets_v4.Resource$Spreadsheets$Sheets = Resource$Spreadsheets$Sheets;
      class Resource$Spreadsheets$Values {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          append(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values/{range}:append')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'range'],
                  pathParams: ['range', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchClear(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values:batchClear')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchClearByDataFilter(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchGet(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}/values:batchGet')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchGetByDataFilter(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchUpdate(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values:batchUpdate')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          batchUpdateByDataFilter(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId'],
                  pathParams: ['spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          clear(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/v4/spreadsheets/{spreadsheetId}/values/{range}:clear')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'range'],
                  pathParams: ['range', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          get(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}/values/{range}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'range'],
                  pathParams: ['range', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          update(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://sheets.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v4/spreadsheets/{spreadsheetId}/values/{range}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['spreadsheetId', 'range'],
                  pathParams: ['range', 'spreadsheetId'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sheets_v4.Resource$Spreadsheets$Values = Resource$Spreadsheets$Values;
  })(sheets_v4 = exports.sheets_v4 || (exports.sheets_v4 = {}));
  //# sourceMappingURL=v4.js.map