text: "use strict";
  /**
   * Copyright 2019 Google LLC
   *
   * 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 sqladmin_v1beta4;
  (function (sqladmin_v1beta4) {
      let context;
      /**
       * Cloud SQL Admin API
       *
       * Creates and manages Cloud SQL instances, which provide fully managed MySQL
       * or PostgreSQL databases.
       *
       * @example
       * const {google} = require('googleapis');
       * const sqladmin = google.sqladmin('v1beta4');
       *
       * @namespace sqladmin
       * @type {Function}
       * @version v1beta4
       * @variation v1beta4
       * @param {object=} options Options for Sqladmin
       */
      class Sqladmin {
          constructor(options, google) {
              context = { _options: options || {}, google };
              this.backupRuns = new Resource$Backupruns();
              this.databases = new Resource$Databases();
              this.flags = new Resource$Flags();
              this.instances = new Resource$Instances();
              this.operations = new Resource$Operations();
              this.sslCerts = new Resource$Sslcerts();
              this.tiers = new Resource$Tiers();
              this.users = new Resource$Users();
          }
      }
      sqladmin_v1beta4.Sqladmin = Sqladmin;
      class Resource$Backupruns {
          constructor() { }
          delete(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'id'],
                  pathParams: ['id', 'instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'id'],
                  pathParams: ['id', 'instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          insert(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/backupRuns')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Backupruns = Resource$Backupruns;
      class Resource$Databases {
          constructor() { }
          delete(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'database'],
                  pathParams: ['database', 'instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'database'],
                  pathParams: ['database', 'instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          insert(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          patch(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PATCH'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'database'],
                  pathParams: ['database', 'instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'database'],
                  pathParams: ['database', 'instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Databases = Resource$Databases;
      class Resource$Flags {
          constructor() { }
          list(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 + '/sql/v1beta4/flags')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Flags = Resource$Flags;
      class Resource$Instances {
          constructor() { }
          addServerCa(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/addServerCa')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          clone(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/clone')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          delete(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          demoteMaster(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          export(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/export')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          failover(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/failover')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          import(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 + '/sql/v1beta4/projects/{project}/instances/{instance}/import').replace(/([^:]\/)\/+/g, '$1'), method: 'POST' }, options), params, requiredParams: ['project', 'instance'], pathParams: ['instance', 'project'], context };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          insert(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 + '/sql/v1beta4/projects/{project}/instances')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project'],
                  pathParams: ['project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 + '/sql/v1beta4/projects/{project}/instances')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project'],
                  pathParams: ['project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          listServerCas(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/listServerCas')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          patch(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PATCH'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          promoteReplica(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          resetSslConfig(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          restart(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/restart')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          restoreBackup(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          rotateServerCa(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          startReplica(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/startReplica')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          stopReplica(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/stopReplica')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          truncateLog(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/truncateLog')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Instances = Resource$Instances;
      class Resource$Operations {
          constructor() { }
          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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/operations/{operation}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'operation'],
                  pathParams: ['operation', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 + '/sql/v1beta4/projects/{project}/operations')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Operations = Resource$Operations;
      class Resource$Sslcerts {
          constructor() { }
          createEphemeral(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          delete(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'sha1Fingerprint'],
                  pathParams: ['instance', 'project', 'sha1Fingerprint'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'sha1Fingerprint'],
                  pathParams: ['instance', 'project', 'sha1Fingerprint'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          insert(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/sslCerts')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Sslcerts = Resource$Sslcerts;
      class Resource$Tiers {
          constructor() { }
          list(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 + '/sql/v1beta4/projects/{project}/tiers')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project'],
                  pathParams: ['project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Tiers = Resource$Tiers;
      class Resource$Users {
          constructor() { }
          delete(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/users')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'host', 'name'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          insert(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/users')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          list(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 +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/users')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance'],
                  pathParams: ['instance', 'project'],
                  context
              };
              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://www.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl +
                          '/sql/v1beta4/projects/{project}/instances/{instance}/users')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['project', 'instance', 'name'],
                  pathParams: ['instance', 'project'],
                  context
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      sqladmin_v1beta4.Resource$Users = Resource$Users;
  })(sqladmin_v1beta4 = exports.sqladmin_v1beta4 || (exports.sqladmin_v1beta4 = {}));
  //# sourceMappingURL=v1beta4.js.map