googleapis
Version:
Google APIs Client Library for Node.js
1,180 lines • 583 kB
JavaScript
"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 compute_v1;
(function (compute_v1) {
/**
* Compute Engine API
*
* Creates and runs virtual machines on Google Cloud Platform.
*
* @example
* const {google} = require('googleapis');
* const compute = google.compute('v1');
*
* @namespace compute
* @type {Function}
* @version v1
* @variation v1
* @param {object=} options Options for Compute
*/
class Compute {
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.acceleratorTypes = new Resource$Acceleratortypes(this.context);
this.addresses = new Resource$Addresses(this.context);
this.autoscalers = new Resource$Autoscalers(this.context);
this.backendBuckets = new Resource$Backendbuckets(this.context);
this.backendServices = new Resource$Backendservices(this.context);
this.disks = new Resource$Disks(this.context);
this.diskTypes = new Resource$Disktypes(this.context);
this.firewalls = new Resource$Firewalls(this.context);
this.forwardingRules = new Resource$Forwardingrules(this.context);
this.globalAddresses = new Resource$Globaladdresses(this.context);
this.globalForwardingRules = new Resource$Globalforwardingrules(this.context);
this.globalOperations = new Resource$Globaloperations(this.context);
this.healthChecks = new Resource$Healthchecks(this.context);
this.httpHealthChecks = new Resource$Httphealthchecks(this.context);
this.httpsHealthChecks = new Resource$Httpshealthchecks(this.context);
this.images = new Resource$Images(this.context);
this.instanceGroupManagers = new Resource$Instancegroupmanagers(this.context);
this.instanceGroups = new Resource$Instancegroups(this.context);
this.instances = new Resource$Instances(this.context);
this.instanceTemplates = new Resource$Instancetemplates(this.context);
this.interconnectAttachments = new Resource$Interconnectattachments(this.context);
this.interconnectLocations = new Resource$Interconnectlocations(this.context);
this.interconnects = new Resource$Interconnects(this.context);
this.licenseCodes = new Resource$Licensecodes(this.context);
this.licenses = new Resource$Licenses(this.context);
this.machineTypes = new Resource$Machinetypes(this.context);
this.networkEndpointGroups = new Resource$Networkendpointgroups(this.context);
this.networks = new Resource$Networks(this.context);
this.nodeGroups = new Resource$Nodegroups(this.context);
this.nodeTemplates = new Resource$Nodetemplates(this.context);
this.nodeTypes = new Resource$Nodetypes(this.context);
this.projects = new Resource$Projects(this.context);
this.regionAutoscalers = new Resource$Regionautoscalers(this.context);
this.regionBackendServices = new Resource$Regionbackendservices(this.context);
this.regionCommitments = new Resource$Regioncommitments(this.context);
this.regionDisks = new Resource$Regiondisks(this.context);
this.regionDiskTypes = new Resource$Regiondisktypes(this.context);
this.regionInstanceGroupManagers = new Resource$Regioninstancegroupmanagers(this.context);
this.regionInstanceGroups = new Resource$Regioninstancegroups(this.context);
this.regionOperations = new Resource$Regionoperations(this.context);
this.regions = new Resource$Regions(this.context);
this.reservations = new Resource$Reservations(this.context);
this.resourcePolicies = new Resource$Resourcepolicies(this.context);
this.routers = new Resource$Routers(this.context);
this.routes = new Resource$Routes(this.context);
this.securityPolicies = new Resource$Securitypolicies(this.context);
this.snapshots = new Resource$Snapshots(this.context);
this.sslCertificates = new Resource$Sslcertificates(this.context);
this.sslPolicies = new Resource$Sslpolicies(this.context);
this.subnetworks = new Resource$Subnetworks(this.context);
this.targetHttpProxies = new Resource$Targethttpproxies(this.context);
this.targetHttpsProxies = new Resource$Targethttpsproxies(this.context);
this.targetInstances = new Resource$Targetinstances(this.context);
this.targetPools = new Resource$Targetpools(this.context);
this.targetSslProxies = new Resource$Targetsslproxies(this.context);
this.targetTcpProxies = new Resource$Targettcpproxies(this.context);
this.targetVpnGateways = new Resource$Targetvpngateways(this.context);
this.urlMaps = new Resource$Urlmaps(this.context);
this.vpnTunnels = new Resource$Vpntunnels(this.context);
this.zoneOperations = new Resource$Zoneoperations(this.context);
this.zones = new Resource$Zones(this.context);
}
}
compute_v1.Compute = Compute;
class Resource$Acceleratortypes {
constructor(context) {
this.context = context;
}
aggregatedList(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 +
'/compute/v1/projects/{project}/aggregated/acceleratorTypes').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'zone', 'acceleratorType'],
pathParams: ['acceleratorType', 'project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/acceleratorTypes').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'zone'],
pathParams: ['project', 'zone'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
compute_v1.Resource$Acceleratortypes = Resource$Acceleratortypes;
class Resource$Addresses {
constructor(context) {
this.context = context;
}
aggregatedList(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 + '/compute/v1/projects/{project}/aggregated/addresses').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/regions/{region}/addresses/{address}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['project', 'region', 'address'],
pathParams: ['address', 'project', 'region'],
context: this.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 +
'/compute/v1/projects/{project}/regions/{region}/addresses/{address}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'region', 'address'],
pathParams: ['address', 'project', 'region'],
context: this.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 +
'/compute/v1/projects/{project}/regions/{region}/addresses').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'region'],
pathParams: ['project', 'region'],
context: this.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 +
'/compute/v1/projects/{project}/regions/{region}/addresses').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'region'],
pathParams: ['project', 'region'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
compute_v1.Resource$Addresses = Resource$Addresses;
class Resource$Autoscalers {
constructor(context) {
this.context = context;
}
aggregatedList(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 + '/compute/v1/projects/{project}/aggregated/autoscalers').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers/{autoscaler}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['project', 'zone', 'autoscaler'],
pathParams: ['autoscaler', 'project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers/{autoscaler}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'zone', 'autoscaler'],
pathParams: ['autoscaler', 'project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'zone'],
pathParams: ['project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'zone'],
pathParams: ['project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['project', 'zone'],
pathParams: ['project', 'zone'],
context: this.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 +
'/compute/v1/projects/{project}/zones/{zone}/autoscalers').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['project', 'zone'],
pathParams: ['project', 'zone'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
compute_v1.Resource$Autoscalers = Resource$Autoscalers;
class Resource$Backendbuckets {
constructor(context) {
this.context = context;
}
addSignedUrlKey(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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendBucket'],
pathParams: ['backendBucket', 'project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['project', 'backendBucket'],
pathParams: ['backendBucket', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
deleteSignedUrlKey(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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendBucket', 'keyName'],
pathParams: ['backendBucket', 'project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'backendBucket'],
pathParams: ['backendBucket', 'project'],
context: this.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 + '/compute/v1/projects/{project}/global/backendBuckets').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 + '/compute/v1/projects/{project}/global/backendBuckets').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['project', 'backendBucket'],
pathParams: ['backendBucket', 'project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendBuckets/{backendBucket}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PUT',
}, options),
params,
requiredParams: ['project', 'backendBucket'],
pathParams: ['backendBucket', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
}
compute_v1.Resource$Backendbuckets = Resource$Backendbuckets;
class Resource$Backendservices {
constructor(context) {
this.context = context;
}
addSignedUrlKey(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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}/addSignedUrlKey').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
aggregatedList(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 +
'/compute/v1/projects/{project}/aggregated/backendServices').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
deleteSignedUrlKey(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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendService', 'keyName'],
pathParams: ['backendService', 'project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
getHealth(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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}/getHealth').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.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 + '/compute/v1/projects/{project}/global/backendServices').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 + '/compute/v1/projects/{project}/global/backendServices').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
}, options),
params,
requiredParams: ['project'],
pathParams: ['project'],
context: this.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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parameters);
}
}
setSecurityPolicy(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 +
'/compute/v1/projects/{project}/global/backendServices/{backendService}/setSecurityPolicy').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
}, options),
params,
requiredParams: ['project', 'backendService'],
pathParams: ['backendService', 'project'],
context: this.context,
};
if (callback) {
googleapis_common_1.createAPIRequest(parameters, callback);
}
else {
return googleapis_common_1.createAPIRequest(parame