Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var metricsServiceV2Stub = gaxGrpc.createStub(
protos.google.logging.v2.MetricsServiceV2,
opts
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
var metricsServiceV2StubMethods = [
'listLogMetrics',
'getLogMetric',
'createLogMetric',
'updateLogMetric',
'deleteLogMetric',
];
for (let methodName of metricsServiceV2StubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
metricsServiceV2Stub.then(
stub =>
function() {
var args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
}
),
defaults[methodName],
this._descriptors.page[methodName]
);
}
}
var loggingServiceV2Stub = gaxGrpc.createStub(
protos.google.logging.v2.LoggingServiceV2,
opts
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
var loggingServiceV2StubMethods = [
'deleteLog',
'writeLogEntries',
'listLogEntries',
'listMonitoredResourceDescriptors',
'listLogs',
];
for (let methodName of loggingServiceV2StubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
loggingServiceV2Stub.then(
stub =>
function() {
var args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
}
),
defaults[methodName],
this._descriptors.page[methodName] ||
this._descriptors.batching[methodName]
);
}
}
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
var dlpServiceStubMethods = [
'inspectContent',
'redactContent',
'deidentifyContent',
'analyzeDataSourceRisk',
'createInspectOperation',
'listInspectFindings',
'listInfoTypes',
'listRootCategories',
];
for (let methodName of dlpServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
dlpServiceStub.then(
stub =>
function() {
var args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
}
),
defaults[methodName],
this._descriptors.longrunning[methodName]
);
}
}
// Iterate over each of the methods that the service provides
// and create an API call method for each.
var configServiceV2StubMethods = [
'listSinks',
'getSink',
'createSink',
'updateSink',
'deleteSink',
'listExclusions',
'getExclusion',
'createExclusion',
'updateExclusion',
'deleteExclusion',
];
for (let methodName of configServiceV2StubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
configServiceV2Stub.then(
stub =>
function() {
var args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
}
),
defaults[methodName],
this._descriptors.page[methodName]
);
}
}
const metricsServiceV2Stub = gaxGrpc.createStub(
protos.google.logging.v2.MetricsServiceV2,
opts
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const metricsServiceV2StubMethods = [
'listLogMetrics',
'getLogMetric',
'createLogMetric',
'updateLogMetric',
'deleteLogMetric',
];
for (const methodName of metricsServiceV2StubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
metricsServiceV2Stub.then(
stub =>
function() {
const args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
},
err =>
function() {
throw err;
}
),
defaults[methodName],
this._descriptors.page[methodName]
);
}
}
// of calling the API is handled in `google-gax`, with this code
// merely providing the destination and request information.
this._innerApiCalls = {};
// Put together the "service stub" for
// google.cloud.talent.v4beta1.ResumeService.
const resumeServiceStub = gaxGrpc.createStub(
protos.google.cloud.talent.v4beta1.ResumeService,
opts
);
// Iterate over each of the methods that the service provides
// and create an API call method for each.
const resumeServiceStubMethods = ['parseResume'];
for (const methodName of resumeServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
resumeServiceStub.then(
stub =>
function() {
const args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
},
err =>
function() {
throw err;
}
),
defaults[methodName],
null
);
}
}
databaseAdminStubMethods.forEach(function(methodName) {
self['_' + methodName] = gax.createApiCall(
databaseAdminStub.then(function(databaseAdminStub) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return databaseAdminStub[methodName].apply(databaseAdminStub, args);
};
}),
defaults[methodName],
PAGE_DESCRIPTORS[methodName] || self.longrunningDescriptors[methodName]);
});
}
languageServiceStubMethods.forEach(function(methodName) {
self['_' + methodName] = gax.createApiCall(
languageServiceStub.then(function(languageServiceStub) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return languageServiceStub[methodName].apply(languageServiceStub, args);
};
}),
defaults[methodName],
null);
});
}
firestoreStubMethods.forEach(function(methodName) {
self['_' + methodName] = gax.createApiCall(
firestoreStub.then(function(firestoreStub) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
return firestoreStub[methodName].apply(firestoreStub, args);
};
}),
defaults[methodName],
PAGE_DESCRIPTORS[methodName] || STREAM_DESCRIPTORS[methodName]
);
});
}
'getDlpJob',
'deleteDlpJob',
'cancelDlpJob',
'listJobTriggers',
'getJobTrigger',
'deleteJobTrigger',
'updateJobTrigger',
'createJobTrigger',
'createStoredInfoType',
'updateStoredInfoType',
'getStoredInfoType',
'listStoredInfoTypes',
'deleteStoredInfoType',
];
for (const methodName of dlpServiceStubMethods) {
this._innerApiCalls[methodName] = gax.createApiCall(
dlpServiceStub.then(
stub =>
function() {
const args = Array.prototype.slice.call(arguments, 0);
return stub[methodName].apply(stub, args);
},
err =>
function() {
throw err;
}
),
defaults[methodName],
this._descriptors.page[methodName]
);
}
}