text: "use strict";
  /**
   * Copyright 2015 Google Inc. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *      http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  Object.defineProperty(exports, "__esModule", { value: true });
  const googleapis_common_1 = require("googleapis-common");
  // tslint:disable: no-any
  // tslint:disable: class-name
  // tslint:disable: variable-name
  // tslint:disable: jsdoc-format
  // tslint:disable: no-namespace
  var logging_v2beta1;
  (function (logging_v2beta1) {
      /**
       * Stackdriver Logging API
       *
       * Writes log entries and manages your Logging configuration.
       *
       * @example
       * const {google} = require('googleapis');
       * const logging = google.logging('v2beta1');
       *
       * @namespace logging
       * @type {Function}
       * @version v2beta1
       * @variation v2beta1
       * @param {object=} options Options for Logging
       */
      class Logging {
          constructor(options, google) {
              this.root = this;
              this._options = options || {};
              this.google = google;
              this.getRoot.bind(this);
              this.entries = new Resource$Entries(this);
              this.monitoredResourceDescriptors =
                  new Resource$Monitoredresourcedescriptors(this);
              this.projects = new Resource$Projects(this);
          }
          getRoot() {
              return this.root;
          }
      }
      logging_v2beta1.Logging = Logging;
      class Resource$Entries {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/entries:list')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          write(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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/entries:write')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      logging_v2beta1.Resource$Entries = Resource$Entries;
      class Resource$Monitoredresourcedescriptors {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/monitoredResourceDescriptors')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: [],
                  pathParams: [],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      logging_v2beta1.Resource$Monitoredresourcedescriptors = Resource$Monitoredresourcedescriptors;
      class Resource$Projects {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
              this.metrics = new Resource$Projects$Metrics(root);
              this.sinks = new Resource$Projects$Sinks(root);
          }
          getRoot() {
              return this.root;
          }
      }
      logging_v2beta1.Resource$Projects = Resource$Projects;
      class Resource$Projects$Metrics {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          create(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+parent}/metrics')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['parent'],
                  pathParams: ['parent'],
                  context: this.getRoot()
              };
              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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+metricName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['metricName'],
                  pathParams: ['metricName'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          get(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+metricName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['metricName'],
                  pathParams: ['metricName'],
                  context: this.getRoot()
              };
              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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+parent}/metrics')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['parent'],
                  pathParams: ['parent'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          update(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+metricName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['metricName'],
                  pathParams: ['metricName'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      logging_v2beta1.Resource$Projects$Metrics = Resource$Projects$Metrics;
      class Resource$Projects$Sinks {
          constructor(root) {
              this.root = root;
              this.getRoot.bind(this);
          }
          getRoot() {
              return this.root;
          }
          create(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+parent}/sinks')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'POST'
                  }, options),
                  params,
                  requiredParams: ['parent'],
                  pathParams: ['parent'],
                  context: this.getRoot()
              };
              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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+sinkName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'DELETE'
                  }, options),
                  params,
                  requiredParams: ['sinkName'],
                  pathParams: ['sinkName'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          get(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+sinkName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['sinkName'],
                  pathParams: ['sinkName'],
                  context: this.getRoot()
              };
              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://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+parent}/sinks')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'GET'
                  }, options),
                  params,
                  requiredParams: ['parent'],
                  pathParams: ['parent'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
          update(paramsOrCallback, optionsOrCallback, callback) {
              let params = (paramsOrCallback || {});
              let options = (optionsOrCallback || {});
              if (typeof paramsOrCallback === 'function') {
                  callback = paramsOrCallback;
                  params = {};
                  options = {};
              }
              if (typeof optionsOrCallback === 'function') {
                  callback = optionsOrCallback;
                  options = {};
              }
              const rootUrl = options.rootUrl || 'https://logging.googleapis.com/';
              const parameters = {
                  options: Object.assign({
                      url: (rootUrl + '/v2beta1/{+sinkName}')
                          .replace(/([^:]\/)\/+/g, '$1'),
                      method: 'PUT'
                  }, options),
                  params,
                  requiredParams: ['sinkName'],
                  pathParams: ['sinkName'],
                  context: this.getRoot()
              };
              if (callback) {
                  googleapis_common_1.createAPIRequest(parameters, callback);
              }
              else {
                  return googleapis_common_1.createAPIRequest(parameters);
              }
          }
      }
      logging_v2beta1.Resource$Projects$Sinks = Resource$Projects$Sinks;
  })(logging_v2beta1 = exports.logging_v2beta1 || (exports.logging_v2beta1 = {}));
  //# sourceMappingURL=v2beta1.js.map