googleapis
Version:
Google APIs Client Library for Node.js
362 lines • 13 kB
JavaScript
"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 });
var apirequest_1 = require("../../lib/apirequest");
// TODO: We will eventually get the `any` in here cleared out, but in the
// interim we want to turn on no-implicit-any.
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
/**
* Stackdriver Debugger API
*
* Examines the call stack and variables of a running application without
* stopping or slowing it down.
*
* @example
* const google = require('googleapis');
* const clouddebugger = google.clouddebugger('v2');
*
* @namespace clouddebugger
* @type {Function}
* @version v2
* @variation v2
* @param {object=} options Options for Clouddebugger
*/
var Clouddebugger = /** @class */ (function () {
function Clouddebugger(options, google) {
this.root = this;
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.controller = new Resource$Controller(this);
this.debugger = new Resource$Debugger(this);
}
Clouddebugger.prototype.getRoot = function () {
return this.root;
};
return Clouddebugger;
}());
exports.Clouddebugger = Clouddebugger;
var Resource$Controller = /** @class */ (function () {
function Resource$Controller(root) {
this.root = root;
this.getRoot.bind(this);
this.debuggees = new Resource$Controller$Debuggees(root);
}
Resource$Controller.prototype.getRoot = function () {
return this.root;
};
return Resource$Controller;
}());
exports.Resource$Controller = Resource$Controller;
var Resource$Controller$Debuggees = /** @class */ (function () {
function Resource$Controller$Debuggees(root) {
this.root = root;
this.getRoot.bind(this);
this.breakpoints = new Resource$Controller$Debuggees$Breakpoints(root);
}
Resource$Controller$Debuggees.prototype.getRoot = function () {
return this.root;
};
Resource$Controller$Debuggees.prototype.register = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl + '/v2/controller/debuggees/register')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
return Resource$Controller$Debuggees;
}());
exports.Resource$Controller$Debuggees = Resource$Controller$Debuggees;
var Resource$Controller$Debuggees$Breakpoints = /** @class */ (function () {
function Resource$Controller$Debuggees$Breakpoints(root) {
this.root = root;
this.getRoot.bind(this);
}
Resource$Controller$Debuggees$Breakpoints.prototype.getRoot = function () {
return this.root;
};
Resource$Controller$Debuggees$Breakpoints.prototype.list = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl + '/v2/controller/debuggees/{debuggeeId}/breakpoints')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['debuggeeId'],
pathParams: ['debuggeeId'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
Resource$Controller$Debuggees$Breakpoints.prototype.update = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl +
'/v2/controller/debuggees/{debuggeeId}/breakpoints/{id}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT'
}, options),
params: params,
requiredParams: ['debuggeeId', 'id'],
pathParams: ['debuggeeId', 'id'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
return Resource$Controller$Debuggees$Breakpoints;
}());
exports.Resource$Controller$Debuggees$Breakpoints = Resource$Controller$Debuggees$Breakpoints;
var Resource$Debugger = /** @class */ (function () {
function Resource$Debugger(root) {
this.root = root;
this.getRoot.bind(this);
this.debuggees = new Resource$Debugger$Debuggees(root);
}
Resource$Debugger.prototype.getRoot = function () {
return this.root;
};
return Resource$Debugger;
}());
exports.Resource$Debugger = Resource$Debugger;
var Resource$Debugger$Debuggees = /** @class */ (function () {
function Resource$Debugger$Debuggees(root) {
this.root = root;
this.getRoot.bind(this);
this.breakpoints = new Resource$Debugger$Debuggees$Breakpoints(root);
}
Resource$Debugger$Debuggees.prototype.getRoot = function () {
return this.root;
};
Resource$Debugger$Debuggees.prototype.list = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl + '/v2/debugger/debuggees')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: [],
pathParams: [],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
return Resource$Debugger$Debuggees;
}());
exports.Resource$Debugger$Debuggees = Resource$Debugger$Debuggees;
var Resource$Debugger$Debuggees$Breakpoints = /** @class */ (function () {
function Resource$Debugger$Debuggees$Breakpoints(root) {
this.root = root;
this.getRoot.bind(this);
}
Resource$Debugger$Debuggees$Breakpoints.prototype.getRoot = function () {
return this.root;
};
Resource$Debugger$Debuggees$Breakpoints.prototype.delete = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl +
'/v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE'
}, options),
params: params,
requiredParams: ['debuggeeId', 'breakpointId'],
pathParams: ['breakpointId', 'debuggeeId'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
Resource$Debugger$Debuggees$Breakpoints.prototype.get = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl +
'/v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['debuggeeId', 'breakpointId'],
pathParams: ['breakpointId', 'debuggeeId'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
Resource$Debugger$Debuggees$Breakpoints.prototype.list = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl + '/v2/debugger/debuggees/{debuggeeId}/breakpoints')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'GET'
}, options),
params: params,
requiredParams: ['debuggeeId'],
pathParams: ['debuggeeId'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
Resource$Debugger$Debuggees$Breakpoints.prototype.set = function (params, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
if (typeof params === 'function') {
callback = params;
params = {};
}
options = options || {};
var rootUrl = options.rootUrl || 'https://clouddebugger.googleapis.com/';
var parameters = {
options: Object.assign({
url: (rootUrl +
'/v2/debugger/debuggees/{debuggeeId}/breakpoints/set')
.replace(/([^:]\/)\/+/g, '$1'),
method: 'POST'
}, options),
params: params,
requiredParams: ['debuggeeId'],
pathParams: ['debuggeeId'],
context: this.getRoot()
};
if (callback) {
apirequest_1.createAPIRequest(parameters, callback);
}
else {
return apirequest_1.createAPIRequest(parameters);
}
};
return Resource$Debugger$Debuggees$Breakpoints;
}());
exports.Resource$Debugger$Debuggees$Breakpoints = Resource$Debugger$Debuggees$Breakpoints;
//# sourceMappingURL=v2.js.map