googleapis
Version:
Google APIs Client Library for Node.js
1,224 lines (1,223 loc) • 1.09 MB
JavaScript
"use strict";
// Copyright 2020 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 });
exports.aiplatform_v1beta1 = void 0;
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-interface */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable no-irregular-whitespace */
const googleapis_common_1 = require("googleapis-common");
var aiplatform_v1beta1;
(function (aiplatform_v1beta1) {
/**
* Vertex AI API
*
* Train high-quality custom machine learning models with minimal machine learning expertise and effort.
*
* @example
* ```js
* const {google} = require('googleapis');
* const aiplatform = google.aiplatform('v1beta1');
* ```
*/
class Aiplatform {
context;
batchPredictionJobs;
datasets;
endpoints;
media;
projects;
publishers;
reasoningEngines;
constructor(options, google) {
this.context = {
_options: options || {},
google,
};
this.batchPredictionJobs = new Resource$Batchpredictionjobs(this.context);
this.datasets = new Resource$Datasets(this.context);
this.endpoints = new Resource$Endpoints(this.context);
this.media = new Resource$Media(this.context);
this.projects = new Resource$Projects(this.context);
this.publishers = new Resource$Publishers(this.context);
this.reasoningEngines = new Resource$Reasoningengines(this.context);
}
}
aiplatform_v1beta1.Aiplatform = Aiplatform;
class Resource$Batchpredictionjobs {
context;
constructor(context) {
this.context = context;
}
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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/batchPredictionJobs').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/batchPredictionJobs').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Batchpredictionjobs = Resource$Batchpredictionjobs;
class Resource$Datasets {
context;
datasetVersions;
constructor(context) {
this.context = context;
this.datasetVersions = new Resource$Datasets$Datasetversions(this.context);
}
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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/datasets').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/datasets').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: [],
pathParams: [],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Datasets = Resource$Datasets;
class Resource$Datasets$Datasetversions {
context;
constructor(context) {
this.context = context;
}
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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/datasetVersions').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'DELETE',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/datasetVersions').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, 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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
restore(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:restore').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Datasets$Datasetversions = Resource$Datasets$Datasetversions;
class Resource$Endpoints {
context;
chat;
constructor(context) {
this.context = context;
this.chat = new Resource$Endpoints$Chat(this.context);
}
computeTokens(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}:computeTokens').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
countTokens(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}:countTokens').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
fetchPredictOperation(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}:fetchPredictOperation').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
generateContent(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+model}:generateContent').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['model'],
pathParams: ['model'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
predict(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}:predict').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
predictLongRunning(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}:predictLongRunning').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
streamGenerateContent(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+model}:streamGenerateContent').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['model'],
pathParams: ['model'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Endpoints = Resource$Endpoints;
class Resource$Endpoints$Chat {
context;
constructor(context) {
this.context = context;
}
completions(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+endpoint}/chat/completions').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['endpoint'],
pathParams: ['endpoint'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Endpoints$Chat = Resource$Endpoints$Chat;
class Resource$Media {
context;
constructor(context) {
this.context = context;
}
upload(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}/ragFiles:upload').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
mediaUrl: (rootUrl + '/upload/v1beta1/{+parent}/ragFiles:upload').replace(/([^:]\/)\/+/g, '$1'),
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Media = Resource$Media;
class Resource$Projects {
context;
locations;
modelGardenEula;
constructor(context) {
this.context = context;
this.locations = new Resource$Projects$Locations(this.context);
this.modelGardenEula = new Resource$Projects$Modelgardeneula(this.context);
}
fetchPublisherModelConfig(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:fetchPublisherModelConfig').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
getCacheConfig(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'GET',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
setPublisherModelConfig(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}:setPublisherModelConfig').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
updateCacheConfig(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+name}').replace(/([^:]\/)\/+/g, '$1'),
method: 'PATCH',
apiVersion: '',
}, options),
params,
requiredParams: ['name'],
pathParams: ['name'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
}
aiplatform_v1beta1.Resource$Projects = Resource$Projects;
class Resource$Projects$Locations {
context;
agents;
apps;
batchPredictionJobs;
cachedContents;
customJobs;
dataLabelingJobs;
datasets;
deploymentResourcePools;
edgeDevices;
endpoints;
evaluationItems;
evaluationRuns;
evaluationSets;
evaluationTasks;
exampleStores;
extensionControllers;
extensions;
featureGroups;
featureOnlineStores;
featurestores;
hyperparameterTuningJobs;
indexEndpoints;
indexes;
metadataStores;
migratableResources;
modelDeploymentMonitoringJobs;
modelMonitors;
models;
nasJobs;
notebookExecutionJobs;
notebookRuntimes;
notebookRuntimeTemplates;
operations;
persistentResources;
pipelineJobs;
publishers;
ragCorpora;
ragEngineConfig;
reasoningEngines;
schedules;
solvers;
specialistPools;
studies;
tensorboards;
trainingPipelines;
tuningJobs;
constructor(context) {
this.context = context;
this.agents = new Resource$Projects$Locations$Agents(this.context);
this.apps = new Resource$Projects$Locations$Apps(this.context);
this.batchPredictionJobs =
new Resource$Projects$Locations$Batchpredictionjobs(this.context);
this.cachedContents = new Resource$Projects$Locations$Cachedcontents(this.context);
this.customJobs = new Resource$Projects$Locations$Customjobs(this.context);
this.dataLabelingJobs = new Resource$Projects$Locations$Datalabelingjobs(this.context);
this.datasets = new Resource$Projects$Locations$Datasets(this.context);
this.deploymentResourcePools =
new Resource$Projects$Locations$Deploymentresourcepools(this.context);
this.edgeDevices = new Resource$Projects$Locations$Edgedevices(this.context);
this.endpoints = new Resource$Projects$Locations$Endpoints(this.context);
this.evaluationItems = new Resource$Projects$Locations$Evaluationitems(this.context);
this.evaluationRuns = new Resource$Projects$Locations$Evaluationruns(this.context);
this.evaluationSets = new Resource$Projects$Locations$Evaluationsets(this.context);
this.evaluationTasks = new Resource$Projects$Locations$Evaluationtasks(this.context);
this.exampleStores = new Resource$Projects$Locations$Examplestores(this.context);
this.extensionControllers =
new Resource$Projects$Locations$Extensioncontrollers(this.context);
this.extensions = new Resource$Projects$Locations$Extensions(this.context);
this.featureGroups = new Resource$Projects$Locations$Featuregroups(this.context);
this.featureOnlineStores =
new Resource$Projects$Locations$Featureonlinestores(this.context);
this.featurestores = new Resource$Projects$Locations$Featurestores(this.context);
this.hyperparameterTuningJobs =
new Resource$Projects$Locations$Hyperparametertuningjobs(this.context);
this.indexEndpoints = new Resource$Projects$Locations$Indexendpoints(this.context);
this.indexes = new Resource$Projects$Locations$Indexes(this.context);
this.metadataStores = new Resource$Projects$Locations$Metadatastores(this.context);
this.migratableResources =
new Resource$Projects$Locations$Migratableresources(this.context);
this.modelDeploymentMonitoringJobs =
new Resource$Projects$Locations$Modeldeploymentmonitoringjobs(this.context);
this.modelMonitors = new Resource$Projects$Locations$Modelmonitors(this.context);
this.models = new Resource$Projects$Locations$Models(this.context);
this.nasJobs = new Resource$Projects$Locations$Nasjobs(this.context);
this.notebookExecutionJobs =
new Resource$Projects$Locations$Notebookexecutionjobs(this.context);
this.notebookRuntimes = new Resource$Projects$Locations$Notebookruntimes(this.context);
this.notebookRuntimeTemplates =
new Resource$Projects$Locations$Notebookruntimetemplates(this.context);
this.operations = new Resource$Projects$Locations$Operations(this.context);
this.persistentResources =
new Resource$Projects$Locations$Persistentresources(this.context);
this.pipelineJobs = new Resource$Projects$Locations$Pipelinejobs(this.context);
this.publishers = new Resource$Projects$Locations$Publishers(this.context);
this.ragCorpora = new Resource$Projects$Locations$Ragcorpora(this.context);
this.ragEngineConfig = new Resource$Projects$Locations$Ragengineconfig(this.context);
this.reasoningEngines = new Resource$Projects$Locations$Reasoningengines(this.context);
this.schedules = new Resource$Projects$Locations$Schedules(this.context);
this.solvers = new Resource$Projects$Locations$Solvers(this.context);
this.specialistPools = new Resource$Projects$Locations$Specialistpools(this.context);
this.studies = new Resource$Projects$Locations$Studies(this.context);
this.tensorboards = new Resource$Projects$Locations$Tensorboards(this.context);
this.trainingPipelines =
new Resource$Projects$Locations$Trainingpipelines(this.context);
this.tuningJobs = new Resource$Projects$Locations$Tuningjobs(this.context);
}
augmentPrompt(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}:augmentPrompt').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
corroborateContent(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+parent}:corroborateContent').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['parent'],
pathParams: ['parent'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
deploy(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+destination}:deploy').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['destination'],
pathParams: ['destination'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
deployPublisherModel(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://aiplatform.googleapis.com/';
const parameters = {
options: Object.assign({
url: (rootUrl + '/v1beta1/{+destination}:deployPublisherModel').replace(/([^:]\/)\/+/g, '$1'),
method: 'POST',
apiVersion: '',
}, options),
params,
requiredParams: ['destination'],
pathParams: ['destination'],
context: this.context,
};
if (callback) {
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
}
else {
return (0, googleapis_common_1.createAPIRequest)(parameters);
}
}
evaluateDataset(paramsOrCallback, optionsOrCallback, callback) {
let params = (paramsOrCallback ||
{});
let options = (optionsOrCallback || {});
if (typeof paramsOrCallback === 'function') {
callback = paramsOrCallback;
params = {};
options = {};
}
if (typeof optionsOrCallback === 'function') {
callback = optionsOrCallback;
options = {};
}