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 src_1 = require("../../shared/src");
  // tslint:disable: no-any
  // tslint:disable: class-name
  // tslint:disable: variable-name
  // tslint:disable: jsdoc-format
  // tslint:disable: no-namespace
  var identitytoolkit_v3;
  (function (identitytoolkit_v3) {
      /**
       * Google Identity Toolkit API
       *
       * Help the third party sites to implement federated login.
       *
       * @example
       * const {google} = require('googleapis');
       * const identitytoolkit = google.identitytoolkit('v3');
       *
       * @namespace identitytoolkit
       * @type {Function}
       * @version v3
       * @variation v3
       * @param {object=} options Options for Identitytoolkit
       */
      class Identitytoolkit {
          constructor(options, google) {
              this.root = this;
              this._options = options || {};
              this.google = google;
              this.getRoot.bind(this);
              this.relyingparty = new Resource$Relyingparty(this);
          }
          getRoot() {
              return this.root;
          }
      }
      identitytoolkit_v3.Identitytoolkit = Identitytoolkit;
      class Resource$Relyingparty {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          createAuthUri(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/createAuthUri')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          deleteAccount(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/deleteAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          downloadAccount(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/downloadAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          emailLinkSignin(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/emailLinkSignin')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          getAccountInfo(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/getAccountInfo')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          getOobConfirmationCode(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getOobConfirmationCode')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          getProjectConfig(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getProjectConfig')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          getPublicKeys(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/publicKeys')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          getRecaptchaParam(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getRecaptchaParam')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          resetPassword(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/resetPassword')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          sendVerificationCode(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/sendVerificationCode')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          setAccountInfo(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/setAccountInfo')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          setProjectConfig(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/setProjectConfig')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          signOutUser(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/signOutUser')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          signupNewUser(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/signupNewUser')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          uploadAccount(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/uploadAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          verifyAssertion(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/verifyAssertion')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          verifyCustomToken(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/verifyCustomToken')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          verifyPassword(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/verifyPassword')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
          verifyPhoneNumber(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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/verifyPhoneNumber')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  src_1.createAPIRequest(parameters, callback);
              }
              else {
                  return src_1.createAPIRequest(parameters);
              }
          }
      }
      identitytoolkit_v3.Resource$Relyingparty = Resource$Relyingparty;
  })(identitytoolkit_v3 = exports.identitytoolkit_v3 || (exports.identitytoolkit_v3 = {}));
  //# sourceMappingURL=v3.js.map