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.
   */
  var apirequest_1 = require("../../lib/apirequest");
  /**
   * 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
   */
  function Identitytoolkit(options) {
      var self = this;
      self._options = options || {};
      self.relyingparty = {
          /**
           * identitytoolkit.relyingparty.createAuthUri
           * @desc Creates the URI used by the IdP to authenticate the user.
           * @alias identitytoolkit.relyingparty.createAuthUri
           * @memberOf! identitytoolkit(v3)
           *
           * @param {object} params Parameters for request
           * @param {identitytoolkit(v3).IdentitytoolkitRelyingpartyCreateAuthUriRequest} params.resource Request body data
           * @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
           * @param {callback} callback The callback that handles the response.
           * @return {object} Request object
           */
          createAuthUri: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/createAuthUri')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          deleteAccount: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/deleteAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          downloadAccount: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/downloadAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          emailLinkSignin: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/emailLinkSignin')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          getAccountInfo: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/getAccountInfo')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          getOobConfirmationCode: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getOobConfirmationCode')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          getProjectConfig: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getProjectConfig')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          getPublicKeys: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/publicKeys')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          getRecaptchaParam: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/getRecaptchaParam')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          resetPassword: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/resetPassword')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          sendVerificationCode: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/sendVerificationCode')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          setAccountInfo: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/setAccountInfo')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          setProjectConfig: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/setProjectConfig')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          signOutUser: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/signOutUser')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          signupNewUser: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/signupNewUser')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          uploadAccount: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/uploadAccount')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          verifyAssertion: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/verifyAssertion')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          verifyCustomToken: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/verifyCustomToken')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          verifyPassword: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/identitytoolkit/v3/relyingparty/verifyPassword')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          },
          verifyPhoneNumber: function (params, options, callback) {
              if (typeof options === 'function') {
                  callback = options;
                  options = {};
              }
              options = options || {};
              var rootUrl = options.rootUrl || 'https://www.googleapis.com/';
              var parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/identitytoolkit/v3/relyingparty/verifyPhoneNumber')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params: params,
                  requiredParams: [],
                  pathParams: [],
                  context: self
              };
              return apirequest_1.createAPIRequest(parameters, callback);
          }
      };
  }
  module.exports = Identitytoolkit;
  //# sourceMappingURL=v3.js.map